GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Rust: remove shipped feature flag by redsun82 · Pull Request #2960 · github/codeql-action Conversation
|
| // this point, if they want rust support they should chose a version which supports it | ||
| // publicly. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This might break Rust analysis for users who have pinned v3 (or similar) of the Action as well as a CodeQL CLI >= 2.19.3 && < 2.22.1 and who used CODEQL_ENABLE_EXPERIMENTAL_FEATURES. I agree that it's not unreasonable to ask users to upgrade to a newer CLI version in that case, but perhaps we should give them some warning first before breaking their workflows over night when the next Action release happens? That said, it's not clear to me that a warning in the output would necessarily be noticed. I don't know if we have any data to know how many people would be affected.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
in that situation (version 2.19.3..2.22.1 and CODEQL_ENABLE_EXPERIMENTAL_FEATURES=true) codeql resolve languages does give rust, which means that (await codeql.resolveLanguages()).rust is not undefined. The only change then is that users lose the Experimental Rust analysis enabled log line, but no functional change happens.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
uh, actually, now I see that that log line was dead code anyway!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Clarify comments regarding rust support in codeql versions
|
#3014 should ease the merge conflict in compiled code pain here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(Though we'll have to do the merge first, to get the updated workflow in the branch) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've noticed that #2914 duplicated the rust specific bock before |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As I wrote elsewhere, I am a bit concerned that we have gone through a few iterations of the logic here, approved it, and then changed our minds about how this should work.
That signals to me that we:
< 2.19.3, >= 2.19.3 && < 2.22.1, and >= 2.22.1)? Or perhaps a combination of unit tests (to check the general logic of this) and PR check (to check that the analysis for Rust works when it should).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Set CODEQL_ENABLE_EXPERIMENTAL_FEATURES for Rust. We need to set this environment | ||
| // variable before initializing the config, otherwise Rust analysis will not be | ||
| // enabled. | ||
| // Set CODEQL_ENABLE_EXPERIMENTAL_FEATURES for Rust if between 2.19.3 and 2.22.1 (excluded) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is slightly ambiguous: does the "(excluded)" refer to both 2.19.3 and 2.22.1 or only the latter?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // We need to set this environment variable before initializing the config, otherwise Rust | ||
| // analysis will not be enabled. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could you add a small bit to this comment to remind us why it will not be enabled otherwise? I.e. is the logic for that elsewhere in the Action, the CLI, the extractor, ...?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Set CODEQL_ENABLE_EXPERIMENTAL_FEATURES for Rust if between 2.19.3 and 2.22.1 (excluded) | ||
| // We need to set this environment variable before initializing the config, otherwise Rust | ||
| // analysis will not be enabled. | ||
| // Initially this was driven by a feature flag which has been rolled out already. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Minor: This can probably be removed. I don't see much value in documenting what used to be the case here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Also run the `rust` checks on "milestone" CLI releases, to ensure we remain backward compatible with those versions. This was prompted by #2960 (review) Running this on current `main` and then on that PR should improve our confidence we remain backward compatible. It also turns out a probable `ruamel.yaml` update was changing a lot of generated workflows, so I've: * fixed the `ruamel.yaml` version to the latest in `sync.sh` * added `yaml.width = 120` in `sync.py` to minimize (but not entirely remove) the number of changes * checked in the workflows whose formatting was changed by the new `ruamel.yaml` version
| /** | ||
| * Whether to enable experimental extractors for CodeQL. | ||
| */ | ||
| EXPERIMENTAL_FEATURES = "CODEQL_ACTION_EXPERIMENTAL_FEATURES", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
ha, well, I should have double checked what copilot was writing here. Good thing someone suggested to put in more testing 😉
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
(this was causing a failure in the 2.19.3 case, which is now fixed)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the extra test cases added in #3023. One minor point, but it's not blocking this PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| logger.info("Experimental rust analysis enabled"); | ||
| if (semver.lt(actualVer, publicPreview)) { | ||
| core.exportVariable(EnvVar.EXPERIMENTAL_FEATURES, "true"); | ||
| logger.info("Experimental rust analysis enabled"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Minor: Should "rust" be capitalised here?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Makes sense
Sorry, something went wrong.
There was an error while loading. Please reload this page.
162e9ba to
939a13f
Compare
939a13f to
df1ceac
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.