File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/model Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 5050import org .rascalmpl .vscode .lsp .util .concurrent .ReplaceableFuture ;
5151import org .rascalmpl .vscode .lsp .util .locations .Locations ;
5252
53+ import io .usethesource .vallang .IConstructor ;
5354import io .usethesource .vallang .ISourceLocation ;
5455
5556public class FileFacts {
@@ -155,12 +156,11 @@ public ActualFileFact(ISourceLocation file, Executor exec) {
155156 InterruptibleFuture .completedFuture (new SummaryBridge (), exec ),
156157 r -> {
157158 r .interrupt ();
158- var summaryCalc = rascal .getSummary (file , confs .lookupConfig (file ))
159- .<@ Nullable SummaryBridge >thenApply (s -> s == null ? null : new SummaryBridge (file , s , cm ));
160- // only run get summary after the typechecker for this file is done running
159+ // only run get summary after the typechecker for this file is done running, because it needs the TPL
161160 // (we cannot now global running type checkers, that is a different subject)
162- var mergedCalc = typeCheckResults .get ().<@ Nullable SummaryBridge >thenCompose (o -> summaryCalc .get ());
163- return new InterruptibleFuture <>(mergedCalc , summaryCalc ::interrupt );
161+ return InterruptibleFuture .flatten (typeCheckResults .get ()
162+ .<InterruptibleFuture <@ Nullable IConstructor >>thenApply (o -> rascal .getSummary (file , confs .lookupConfig (file ))), exec )
163+ .<@ Nullable SummaryBridge >thenApply (s -> s == null ? null : new SummaryBridge (file , s , cm ));
164164 });
165165 }
166166
You can’t perform that action at this time.
0 commit comments