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

Run Lua tracing for Go on Windows in CLI 2.10.4+ #1229

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions src/codeql.ts
Original file line number Diff line number Diff line change
@@ -251,6 +251,7 @@ const CODEQL_VERSION_CUSTOM_QUERY_HELP = "2.7.1";
export const CODEQL_VERSION_ML_POWERED_QUERIES = "2.7.5";
const CODEQL_VERSION_LUA_TRACER_CONFIG = "2.10.0";
export const CODEQL_VERSION_CONFIG_FILES = "2.10.1";
const CODEQL_VERSION_LUA_TRACING_GO_WINDOWS_FIXED = "2.10.4";

/**
* This variable controls using the new style of tracing from the CodeQL
@@ -795,14 +796,16 @@ async function getCodeQLForCmd(
) {
if (
(await featureFlags.getValue(FeatureFlag.LuaTracerConfigEnabled)) &&
// There's a bug in Lua tracing for Go on Windows in versions 2.10.3 and earlier,
// so don't use Lua tracing when tracing Go on Windows.
// Once we've released a fix, we should add a version gate based on the fixed version.
!(
config.languages.includes(Language.go) &&
isTracedLanguage(Language.go, logger) &&
process.platform === "win32"
)
// There's a bug in Lua tracing for Go on Windows in versions earlier than
// `CODEQL_VERSION_LUA_TRACING_GO_WINDOWS_FIXED`, so don't use Lua tracing
// when tracing Go on Windows on these CodeQL versions.
(!config.languages.includes(Language.go) ||
!isTracedLanguage(Language.go, logger) ||
process.platform !== "win32" ||
(await util.codeQlVersionAbove(
this,
CODEQL_VERSION_LUA_TRACING_GO_WINDOWS_FIXED
)))
) {
extraArgs.push("--internal-use-lua-tracing");
} else {