-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CodeQL emits error when binlog does not contain compilation #17981
Comments
The other modes (traced, build-mode: none) of the extraction also fail if no source code was seen during the extraction, so I'm somewhat hesitant to do this. What is the reason that you'd like this to succeed and to get an empty database? |
I'm using the |
@DmitriyShepelev I checked what happens if we treat empty binlog extraction a success in the extractor: #17992. In this case, the extractor is returning a success code, but the parent process, the CodeQL CLI does some extra validation on the produced DB, and finds that the DB is empty, which is not considered a success overall. So from your point of view not much changes: the exit code is now 32 instead of the previous 2. Could you tell me more about your use-case? I have the feeling that you anyways need to handle error cases. |
My use-case involves creating CodeQL database creation processes per |
I think #17992 would help you in combination with #17955. The latter allows you to pass all the binlog files into a single |
Yep, should work. Thank you very much for your help - I really appreciate it. :) |
Description of the issue
An error is emitted when creating a database with the
-Obinlog
option using abinlog
file that does not contain any compilation.Repro steps:
global.json
andNoTargetsProject.csproj
) to some directory.msbuild.exe /t:restore;build /bl
.codeql.exe database create <database-directory> --language=csharp --build-mode=none -Obinlog=msbuild.binlog
Can this scenario be treated as a no-op, with just a message emitted that no compilations were found in the binlog?
cc: @tamasvajk
The text was updated successfully, but these errors were encountered: