GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Mark Swift incompatible OS as configuration error by henrymercer · Pull Request #3801 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Reduce monitor noise by treating the incompatible OS error on Swift as a configuration error rather than an issue with the CodeQL Action.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
Mark Swift incompatible OS as configuration error
5f323ca
@henrymercer
henrymercer requested a review from a team as a code owner April 2, 2026 17:48
Copilot AI review requested due to automatic review settings April 2, 2026 17:48
@github-actions github-actions Bot added the size/XS Should be very easy to review label Apr 2, 2026
Copilot started reviewing on behalf of henrymercer April 2, 2026 17:49
View session
Copilot AI reviewed Apr 2, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces monitoring noise by classifying CodeQL CLI’s “Swift analysis is only supported on macOS” / [incompatible-os] failure as a configuration error (so it’s treated as a user/workflow issue rather than an action failure).

Changes:

  • Added a new CliConfigErrorCategory.SwiftIncompatibleOs and matching patterns to recognize the Swift incompatible-OS error.
  • Added an AVA test to ensure the incompatible-OS Swift error is wrapped into a ConfigurationError.
  • Updated generated lib/ artifacts to reflect the TypeScript changes.

Reviewed changes

Copilot reviewed 2 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/cli-errors.ts Adds SwiftIncompatibleOs category and regex candidates so the error is treated as a configuration error.
src/cli-errors.test.ts Adds coverage asserting Swift incompatible-OS stderr is wrapped as ConfigurationError.
lib/upload-sarif-action.js Generated bundle update reflecting new CLI error category.
lib/upload-sarif-action-post.js Generated bundle update reflecting new CLI error category.
lib/upload-lib.js Generated bundle update reflecting new CLI error category.
lib/start-proxy-action-post.js Generated bundle update reflecting new CLI error category.
lib/setup-codeql-action.js Generated bundle update reflecting new CLI error category.
lib/resolve-environment-action.js Generated bundle update reflecting new CLI error category.
lib/init-action.js Generated bundle update reflecting new CLI error category.
lib/init-action-post.js Generated bundle update reflecting new CLI error category.
lib/autobuild-action.js Generated bundle update reflecting new CLI error category.
lib/analyze-action.js Generated bundle update reflecting new CLI error category.
lib/analyze-action-post.js Generated bundle update reflecting new CLI error category.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mbg
mbg previously approved these changes Apr 2, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but couldn't we catch this earlier on / before we ever invoke the CLI? Or is this specifically to catch the case where there's no languages input but we are running on macOS and there's Swift code in the repo?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer

henrymercer commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

This looks good to me, but couldn't we catch this earlier on / before we ever invoke the CLI? Or is this specifically to catch the case where there's no languages input but we are running on macOS and there's Swift code in the repo?

We could, but AFAICT the information about compatible OSes is not machine readable, so this would mean duplicating the knowledge about incompatible OSes between the CLI and the Action.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbg

mbg commented Apr 8, 2026

Copy link
Copy Markdown
Member

We could, but AFAICT the information about compatible OSes is not machine readable, so this would mean duplicating the knowledge about incompatible OSes between the CLI and the Action.

Isn't Swift just a special case in that regard or do we have other language/OS pairs that are not compatible? If it's just a special case for Swift, then I wouldn't be overly opposed to adding a check for that in the Action so that we can fail earlier.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer

henrymercer commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Looks like we already taught the Action about it, but it was a warning rather than a configuration error. Let's update that.

mbg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Throw error early rather than warning
e452857
@henrymercer
henrymercer dismissed mbg’s stale review via e452857 April 8, 2026 15:34
@github-actions github-actions Bot added size/S Should be easy to review and removed size/XS Should be very easy to review labels Apr 8, 2026
henrymercer added 2 commits April 8, 2026 16:38
@henrymercer
Update language aliases test
808513f
@henrymercer
Do not run Swift in debug artifacts after failure check
43d8420
mbg
mbg previously approved these changes Apr 9, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding that! One comment about that change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/init-action.ts
Comment on lines +392 to +399
if (
config.languages.includes(KnownLanguage.swift) &&
process.platform === "linux"
) {
throw new ConfigurationError(
`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner.`,
);
}

@mbg mbg Apr 9, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if someone tries to analyse Swift on Windows? Should that also result in an error here? I imagine that the warning was specifically because we used to support Swift analysis on Linux. Now that we are turning this into an error to fail an analysis early, should we include Windows as well?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@henrymercer henrymercer Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we might as well :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mbg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@henrymercer
Throw error on Windows too
5a17511
@henrymercer
henrymercer dismissed mbg’s stale review via 5a17511 April 9, 2026 15:53
mbg
mbg approved these changes Apr 9, 2026
View reviewed changes
@henrymercer
henrymercer added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 597e12a Apr 9, 2026
225 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer deleted the henrymercer/swift-incompatible-os branch April 9, 2026 17:48
This was referenced Apr 15, 2026
Merge main into releases/v4 #3824
Merged
Merge releases/v4 into releases/v3 #3826
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mbg mbg mbg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/S Should be easy to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@henrymercer @mbg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.