-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Shared: Add stubs for identify-environment
scripts
#13211
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
Conversation
If the Go identify-environment doesn't want to update the environment currently it outputs |
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 scripts should be optional for languages that do not care about them. Same as other non-essential scripts such as pre-finalize.sh
or qltest.sh
. This also ensures compatibility for externally developed extractors.
If we insist on those scripts to be mandatory, I'd like the default output to be echo '{}'
.
In addition I think it is a little strange that the language name is part of the JSON output. It is not really a big deal, but it feels superfluous because the scripts are per-language already.
I don't know anything in particular about this work, but I'd be interested in knowing how the set of languages that need this new |
I think it applies to all languages, but JS, Java, C, and Python scripts ( |
Are you intending to add these scripts for java? |
@MathiasVP and @owen-mc: indeed as @aibaars notes, the other languages are not in this repo so there'll be a separate PR for that. |
ffb9fc9
to
3cf3549
Compare
@@ -14,7 +14,7 @@ CODEQL_PLATFORM = osx64 | |||
endif | |||
endif | |||
|
|||
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh tracing-config.lua) | |||
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh identify-environment.cmd identify-environment.sh tracing-config.lua) |
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.
Do these scripts exist? I'd expected them to be added in this PR.
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.
They already exist, but the Makefile
wasn't changed when they were added (I had mentioned this in this PR's description).
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.
They already exist. They were added in this PR. It was an oversight that I didn't update the Makefile at the same time.
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.
Ah my bad, I looked in the tools
folder instead of the codeql-tools
one? Is the tools
folder still used in any way?
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.
Following recent conversations, I think the output format should be changed to remove the outer { "configuration": {"go": ... } }
, and the CLI will add them in https://github.com/github/semmle-code/pull/46143.
The spec changed after this was implemented and merged
03d4dc5
to
631ba65
Compare
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.
The forthcoming
resolve environment
command in the CLI invokes these scripts. Currently only Go supports this fully and already has such a script (although it was left out of the distribution until now), while this PR adds stubs for the other languages.