File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ interface VersionResult {
12
12
export interface CliFeatures {
13
13
featuresInVersionResult ?: boolean ;
14
14
mrvaPackCreate ?: boolean ;
15
+ generateSummarySymbolMap ?: boolean ;
15
16
}
16
17
17
18
export interface VersionAndFeatures {
Original file line number Diff line number Diff line change @@ -1211,10 +1211,15 @@ export class CodeQLCliServer implements Disposable {
1211
1211
outputPath : string ,
1212
1212
endSummaryPath : string ,
1213
1213
) : Promise < string > {
1214
+ const supportsGenerateSummarySymbolMap =
1215
+ await this . cliConstraints . supportsGenerateSummarySymbolMap ( ) ;
1214
1216
const subcommandArgs = [
1215
1217
"--format=text" ,
1216
1218
`--end-summary=${ endSummaryPath } ` ,
1217
1219
"--sourcemap" ,
1220
+ ...( supportsGenerateSummarySymbolMap
1221
+ ? [ "--summary-symbol-map" , "--minify-output" ]
1222
+ : [ ] ) ,
1218
1223
inputPath ,
1219
1224
outputPath ,
1220
1225
] ;
@@ -1953,4 +1958,8 @@ export class CliVersionConstraint {
1953
1958
async supportsMrvaPackCreate ( ) : Promise < boolean > {
1954
1959
return ( await this . cli . getFeatures ( ) ) . mrvaPackCreate === true ;
1955
1960
}
1961
+
1962
+ async supportsGenerateSummarySymbolMap ( ) : Promise < boolean > {
1963
+ return ( await this . cli . getFeatures ( ) ) . generateSummarySymbolMap === true ;
1964
+ }
1956
1965
}
Original file line number Diff line number Diff line change @@ -544,9 +544,16 @@ export async function generateEvalLogSummaries(
544
544
await cliServer . generateJsonLogSummary ( log , jsonSummary ) ;
545
545
546
546
if ( humanReadableSummary !== undefined ) {
547
- progress ( progressUpdate ( 3 , 3 , "Generating summary symbols file" ) ) ;
548
547
summarySymbols = outputDir . evalLogSummarySymbolsPath ;
549
- await generateSummarySymbolsFile ( humanReadableSummary , summarySymbols ) ;
548
+ if (
549
+ ! ( await cliServer . cliConstraints . supportsGenerateSummarySymbolMap ( ) )
550
+ ) {
551
+ // We're using an old CLI that cannot generate the summary symbols file while generating the
552
+ // human-readable log summary. As a fallback, create it by parsing the human-readable
553
+ // summary.
554
+ progress ( progressUpdate ( 3 , 3 , "Generating summary symbols file" ) ) ;
555
+ await generateSummarySymbolsFile ( humanReadableSummary , summarySymbols ) ;
556
+ }
550
557
}
551
558
}
552
559
You can’t perform that action at this time.
0 commit comments