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 {
1212export interface CliFeatures {
1313 featuresInVersionResult ?: boolean ;
1414 mrvaPackCreate ?: boolean ;
15+ generateSummarySymbolMap ?: boolean ;
1516}
1617
1718export interface VersionAndFeatures {
Original file line number Diff line number Diff line change @@ -1211,10 +1211,15 @@ export class CodeQLCliServer implements Disposable {
12111211 outputPath : string ,
12121212 endSummaryPath : string ,
12131213 ) : Promise < string > {
1214+ const supportsGenerateSummarySymbolMap =
1215+ await this . cliConstraints . supportsGenerateSummarySymbolMap ( ) ;
12141216 const subcommandArgs = [
12151217 "--format=text" ,
12161218 `--end-summary=${ endSummaryPath } ` ,
12171219 "--sourcemap" ,
1220+ ...( supportsGenerateSummarySymbolMap
1221+ ? [ "--summary-symbol-map" , "--minify-output" ]
1222+ : [ ] ) ,
12181223 inputPath ,
12191224 outputPath ,
12201225 ] ;
@@ -1953,4 +1958,8 @@ export class CliVersionConstraint {
19531958 async supportsMrvaPackCreate ( ) : Promise < boolean > {
19541959 return ( await this . cli . getFeatures ( ) ) . mrvaPackCreate === true ;
19551960 }
1961+
1962+ async supportsGenerateSummarySymbolMap ( ) : Promise < boolean > {
1963+ return ( await this . cli . getFeatures ( ) ) . generateSummarySymbolMap === true ;
1964+ }
19561965}
Original file line number Diff line number Diff line change @@ -544,9 +544,16 @@ export async function generateEvalLogSummaries(
544544 await cliServer . generateJsonLogSummary ( log , jsonSummary ) ;
545545
546546 if ( humanReadableSummary !== undefined ) {
547- progress ( progressUpdate ( 3 , 3 , "Generating summary symbols file" ) ) ;
548547 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+ }
550557 }
551558 }
552559
You can’t perform that action at this time.
0 commit comments