You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address PR #235 review comments for codeql_query_compile DIL persistence:
- Reorder path imports alphabetically (basename, delimiter, dirname, ...)
- Update logDir description to match pattern used by query-run, test-run,
and database-analyze (mentions CODEQL_QUERY_LOG_DIR and default path)
- Defer compile log directory creation to post-execution so failed
compilations do not leave empty directories behind
- Make DIL file test hermetic by controlling CODEQL_QUERY_LOG_DIR via a
test-scoped temp directory and restoring it in a finally block
- Add test verifying no empty log directory on compilation failure
- Add test verifying logDir description matches other CLI tools
result += String.fromCharCode(Number.parseInt(str2[idx + 1] + str2[idx + 2], 16));
38566
+
idx += 2;
38567
+
} else {
38568
+
result += str2[idx];
38569
+
}
38570
+
}
38571
+
return result;
38572
+
}
38528
38573
}
38529
38574
});
38530
38575
@@ -40392,7 +40437,7 @@ var require_main = __commonJS({
40392
40437
lastError = e;
40393
40438
}
40394
40439
}
40395
-
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`// tip: ${_getRandomTip()}`)}`);
40440
+
_log(`injected env (${keysCount}) from ${shortPaths.join(",")} ${dim(`// tip: ${_getRandomTip()}`)}`);
40396
40441
}
40397
40442
if (lastError) {
40398
40443
return { parsed: parsedAll, error: lastError };
@@ -190955,7 +191000,7 @@ function cacheDatabaseAnalyzeResults(params, logger2) {
190955
191000
// src/lib/cli-tool-registry.ts
190956
191001
init_package_paths();
190957
191002
import { existsSync as existsSync6, mkdirSync as mkdirSync8, realpathSync, rmSync, writeFileSync as writeFileSync4 } from "fs";
190958
-
import { delimiter as delimiter5, dirname as dirname5, basename as basename5, isAbsolute as isAbsolute4, join as join10, resolve as resolve4 } from "path";
191003
+
import { basename as basename5, delimiter as delimiter5, dirname as dirname5, isAbsolute as isAbsolute4, join as join10, resolve as resolve4 } from "path";
190959
191004
190960
191005
// ../node_modules/js-yaml/dist/js-yaml.mjs
190961
191006
function isNothing(subject) {
@@ -193921,14 +193966,11 @@ function registerCLITool(server, definition) {
@@ -196107,7 +196151,7 @@ var codeqlQueryCompileTool = {
196107
196151
database: external_exports.string().optional().describe("Path to the CodeQL database"),
196108
196152
"dump-dil": external_exports.boolean().optional().describe("Print the optimized DIL intermediate representation to standard output while compiling. Enabled by default; pass false or --no-dump-dil to disable."),
196109
196153
library: external_exports.string().optional().describe("Path to query library"),
196110
-
logDir: external_exports.string().optional().describe("Directory to write the .dil file. If not provided, a unique log directory is created automatically."),
196154
+
logDir: external_exports.string().optional().describe("Custom directory for compilation DIL output (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>"),
.describe('Print the optimized DIL intermediate representation to standard output while compiling. Enabled by default; pass false or --no-dump-dil to disable.'),
18
18
library: z.string().optional().describe('Path to query library'),
19
19
logDir: z.string().optional()
20
-
.describe('Directory to write the .dil file. If not provided, a unique log directory is created automatically.'),
20
+
.describe('Custom directory for compilation DIL output (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>'),
0 commit comments