File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,8 @@ protected boolean hasSeenCode() {
446
446
public int run () throws IOException {
447
447
startThreadPool ();
448
448
try {
449
- extractSource ();
449
+ CompletableFuture <?> sourceFuture = extractSource ();
450
+ sourceFuture .join (); // wait for source extraction to complete
450
451
if (hasSeenCode ()) { // don't bother with the externs if no code was seen
451
452
extractExterns ();
452
453
}
@@ -589,7 +590,7 @@ public FileType fileType(Path f) {
589
590
}
590
591
591
592
/** Extract all supported candidate files that pass the filters. */
592
- private void extractSource () throws IOException {
593
+ private CompletableFuture <?> extractSource () throws IOException {
593
594
// default extractor
594
595
FileExtractor defaultExtractor =
595
596
new FileExtractor (mkExtractorConfig (), outputConfig , trapCache );
@@ -636,7 +637,7 @@ private void extractSource() throws IOException {
636
637
boolean hasTypeScriptFiles = extractedFiles .size () > 0 ;
637
638
638
639
// extract remaining files
639
- extractFiles (
640
+ return extractFiles (
640
641
filesToExtract , extractedFiles , extractors ,
641
642
f -> !(hasTypeScriptFiles && isFileDerivedFromTypeScriptFile (f , extractedFiles )));
642
643
}
You can’t perform that action at this time.
0 commit comments