| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Now that Swift analysis is on by default, we are autodetecting Swift, but Swift is not set up in this workflow. This change adds the Swift setup workflow.
We now can (and need to) to run these steps without the environment variable being set in the other PR checks.
|
Oh no, the step is now failing on past CLI versions. I'll simply pass the environment variable to the failing test then, and we can do The Right Thing when we remove the experimental flag for new versions. |
Sorry, something went wrong.
We cannot remove the conditional in the `setup-swift` workflow because it will fail to find the Swift extractor in prior versions without the experimental flag set. For now we replace the conditional and pass the experimental flag to the failing PR check.
There was a problem hiding this comment.
How about:
This should handle the case where Swift is enabled by default in nightly-latest. Once 2.13.3 is released, we can remove latest from the list in "Set environment variable for Swift enablement".
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for making the changes, I think it made sense to do the work of updating the PR checks now. I think the only remaining piece is to update multi-language-autodetect.yml to check language autodetection for Swift on nightly-latest too. This is the only remaining read of CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT I found in the codebase.
Sorry, something went wrong.
| - uses: ./../action/.github/actions/setup-swift | ||
| if: matrix.version == 'nightly-latest' | ||
| with: | ||
| codeql-path: ${{ steps.init.outputs.codeql-path }} |
There was a problem hiding this comment.
Nice, I think we just need to add id: init to the init step to make this work.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah... I was wondering what the failure was coming from. Thanks.
Sorry, something went wrong.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Nice find — I've modified it to check on nightly-latest when the platform isn't Windows, in addition to when the experimental flag is set. |
Sorry, something went wrong.
|
|
||
| - name: Check language autodetect for Swift | ||
| if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' | ||
| if: >- |
There was a problem hiding this comment.
This looks good, but I'm slightly surprised to see us using env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' for Ruby too — that seems like a subset. I'm good with us addressing this separately though to unblock PR checks.
Sorry, something went wrong.
There was a problem hiding this comment.
Oh yes, I noticed this as well. I wonder if it's because we had previously set the CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT variable globally, but then moved it individually to specific steps. I'll open a follow-up PR.
Sorry, something went wrong.
There was a problem hiding this comment.
PR at #1699
Sorry, something went wrong.
| # Specify 5.7.0, otherwise setup Action will default to latest minor version. | ||
| if [ $VERSION = "5.7" ]; then | ||
| VERSION="5.7.0" | ||
| if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then |
There was a problem hiding this comment.
Not critical here, but for the future we should quote variables to prevent problems with word splitting.
Sorry, something went wrong.
| CODEQL_PATH: ${{ inputs.codeql-path }} | ||
| run: | | ||
| if [ $RUNNER_OS = "macOS" ]; then | ||
| if [[ $RUNNER_OS = "macOS" ]]; then |
There was a problem hiding this comment.
Nit: we should probably pick one of (single brace, double brace) and (single equals, double equals) and run with it. I think for our purposes here they will behave the same though.
Sorry, something went wrong.
There was a problem hiding this comment.
I agree! I actually changed it to double brace here to match the other instances of $RUNNER_OS.
I think the bash I've seen so far in the workflow uses single equals for equality, but the Actions syntax outside of the bash scripts use double equals. That's what I've been following at least 😅
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Now that Swift analysis is on by default in the latest nightly CLI version, we are autodetecting Swift, but Swift is not set up in this workflow. This change fixes the Swift setup workflow to unblock CI by:
Once CLI v2.13.3 is released, we can stop setting the experimental flag for latest.
Merge / deployment checklist