File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -946,32 +946,11 @@ async function getCodeQLForCmd(
946946 await new toolrunner . ToolRunner ( cmd , args ) . exec ( ) ;
947947 } ,
948948 async resolveExtractor ( language : Language ) : Promise < string > {
949- // Request it using `format=json` so we don't need to strip the trailing new line generated by
950- // the CLI.
951- let extractorPath = "" ;
952- await new toolrunner . ToolRunner (
953- cmd ,
954- [
955- "resolve" ,
956- "extractor" ,
957- "--format=json" ,
958- `--language=${ language } ` ,
959- "--extractor-include-aliases" ,
960- ...getExtraOptionsFromEnv ( [ "resolve" , "extractor" ] ) ,
961- ] ,
962- {
963- silent : true ,
964- listeners : {
965- stdout : ( data ) => {
966- extractorPath += data . toString ( ) ;
967- } ,
968- stderr : ( data ) => {
969- process . stderr . write ( data ) ;
970- } ,
971- } ,
972- } ,
973- ) . exec ( ) ;
974- return JSON . parse ( extractorPath ) as string ;
949+ // A previous implementation executed `codeql resolve extractor`.
950+ // This can be a bit slow due to the JVM startup cost. Instead, get
951+ // the extractor path from resolveLanguages(), which caches its output.
952+ const extractors = await this . resolveLanguages ( ) ;
953+ return extractors [ language ] [ 0 ] ;
975954 } ,
976955 async resolveQueriesStartingPacks ( queries : string [ ] ) : Promise < string [ ] > {
977956 const codeqlArgs = [
You can’t perform that action at this time.
0 commit comments