You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Executing "Force Java compilation" from the command palette shows confusing error message #437
I get a Command 'Java: Force Java compilation' can not be run from here. error dialog when I execute force Java Compilation on a multi-root project. Although it looks like the compilation seems to execute.
Ok so this is not a multi-root problem. The problem is caused by the server build failing , eg. due to compilation errors, then the promise is rejected L197:
setTimeout(()=>{// set a timeout so user would still see the message when build time is short
if(res===CompileWorkspaceStatus.SUCCEED){
resolve(res);
}else{
reject(res);
}
},humanVisibleDelay);
});
});
});
When the command results fails, when launched from the command palette, vscode reports it couldn't run the command. When launched from a shortcut, rejected promise is ignored. Not sure what the best way is to deal with that. @ansyral any idea?
changed the title [-]Force compilation error on multi-root workspaces[/-][+]Executing "Force Java compilation" from the command palette shows confusing error message[/+]on Feb 15, 2018
This looks fixed by (#4032). I ran Java: Force Java Compilation → Full on a project with a compile error, in both single-folder and multi-root workspaces, and the "can not be run from here" error no longer appears.
Activity
fbricon commentedon Feb 13, 2018
I guess we need to change the scope of the command to something workspace friendly
fbricon commentedon Feb 15, 2018
Alt+Shift+B works for me, how did you run the command?
gorkem commentedon Feb 15, 2018
command palette of course
fbricon commentedon Feb 15, 2018
Ok so this is not a multi-root problem. The problem is caused by the server build failing , eg. due to compilation errors, then the promise is rejected L197:
vscode-java/src/extension.ts
Lines 181 to 202 in 2a993d3
When the command results fails, when launched from the command palette, vscode reports it couldn't run the command. When launched from a shortcut, rejected promise is ignored. Not sure what the best way is to deal with that. @ansyral any idea?
[-]Force compilation error on multi-root workspaces[/-][+]Executing "Force Java compilation" from the command palette shows confusing error message[/+]mojo2012 commentedon Jun 5, 2018
It should be made more obvious, that there was a build error. Because I never thought of that. I though my installation is messed up
MeherSru commentedon Sep 29, 2026
This looks fixed by (#4032). I ran Java: Force Java Compilation → Full on a project with a compile error, in both single-folder and multi-root workspaces, and the "can not be run from here" error no longer appears.