-
Notifications
You must be signed in to change notification settings - Fork 319
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
Output path to preload_tracer in env file #360
Conversation
@p0, thanks for your suggestion to use |
Yes, that would be safe enough. |
The variable is called Why do we need to prefix things with the |
Thanks. You're right. I've changed it to use that value. |
src/runner.ts
Outdated
codeqlDist, | ||
"tools", | ||
codeqlPlatform, | ||
"preload_tracer" |
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.
@p0 Wouldn't it be better to use the runner
instead. It is available for all platforms including windows so we simply populate an env variable like CODEQL_RUNNER
for all platforms. The advantage is that things keep on working in case a user tries to run the CI job on various platforms (or copy pastes the "$CODEQL_PRELOAD_TRACER" ./build-command.sh
command line into a linux job). This could lead to unexpected problems due to undefined or empty environment variables.
I've switched over to using the |
src/runner.ts
Outdated
tracerConfig.env["CODEQL_DIST"], | ||
"tools", | ||
tracerConfig.env["CODEQL_PLATFORM"], | ||
"runner" |
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.
On windows the binary is called runner.exe
. I think it is fine to leave off the .exe
extension on Windows, but you might want to add it just in case.
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. I was just looking at this. May as well add on the extension.
I also note there are runner-linux
, runner-win.exe
, and runner-osx
. They appear to maybe be duplicates of the non-suffixed versions. Should these be ignored?
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 think these are left-overs of the legacy tools.
I've added the |
@aibaars or @adityasharad do you mind having another quick look over this and make sure I haven't done anything stupid since it was last reviewed? |
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.
Looks good to me.
When building code on macos with SIP enabled it's necessary to prefix your build command with
preload_tracer
, so to make that easy we output a path to that executable in the env that you need to source. This means you should be able to run$CODEQL_PRELOAD_TRACER ./my-build-command.sh
.Merge / deployment checklist