Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source files mysteriously no longer found after update from 2.10.2 to 2.10.3 #131

Closed
andyleejordan opened this issue Sep 1, 2022 · 4 comments
Labels

Comments

@andyleejordan
Copy link

Hi there,

Our CodeQL analysis in the PowerShell Editor Services project has suddenly started failing, with the analysis step complaining that it cannot find the sources any more. It was working fine, and it appears the sudden breakage happened after the binary used by the GitHub action updated from 2.10.2 to 2.10.3. I'm at a loss, as there wasn't a change on our side as far as I can tell. It's now erroring like this:

Run github/codeql-action/analyze@v2
[48](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:49)
/opt/hostedtoolcache/CodeQL/0.0.0-20220811/x64/codeql/codeql version --format=terse
[49](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:50)
2.10.3
[50](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:51)
Finalizing csharp
[51](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:52)
  /opt/hostedtoolcache/CodeQL/0.0.0-20220811/x64/codeql/codeql database finalize --finalize-dataset --threads=2 /home/runner/work/_temp/codeql_databases/csharp --ram=5919
[52](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:53)
  No source code was seen and extracted to /home/runner/work/_temp/codeql_databases/csharp.
[53](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:54)
  This can occur if the specified build commands failed to compile or process any code.
[54](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:55)
   - Confirm that there is some source code for the specified language in the project.
[55](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:56)
   - For codebases written in Go, JavaScript, TypeScript, and Python, do not specify 
[56](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:57)
     an explicit --command.
[57](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:58)
   - For other languages, the --command must specify a "clean" build which compiles 
[58](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:59)
     all the source code files without reusing existing build artefacts.
[59](https://github.com/PowerShell/PowerShellEditorServices/runs/8141145938?check_suite_focus=true#step:5:60)
  Error: No code found during the build.
@github-actions github-actions bot added the CLI label Sep 1, 2022
@andyleejordan
Copy link
Author

Here's a run with debug logging enabled: https://github.com/PowerShell/PowerShellEditorServices/actions/runs/2973534864

The sources are definitely there and the build is running as it was previously.

@hvitved
Copy link

hvitved commented Sep 2, 2022

Hi.

This is indeed a bug in the latest release, and it should be fixed by github/codeql#10277. As a workaround, until the PR above is released, you can add /p:UseSharedCompilation=false to all dotnet publish calls in https://github.com/PowerShell/PowerShellEditorServices/blob/main/PowerShellEditorServices.build.ps1.

Sorry for the inconvenience.

@andyleejordan
Copy link
Author

Thank you, and no worries at all!

@andyleejordan
Copy link
Author

Thanks, all fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants