-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to run main of different files in parallel #1479
Conversation
@@ -76,10 +76,10 @@ async function runMain(main: ExtendedScalaRunMain): Promise<boolean> { | |||
}, | |||
{} | |||
); | |||
|
|||
const file = currentFile(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might prove problematic if we run but the file is not focused 🤔
Actually, we can already make it better via main.class
which will be the name of the class being run, which should be unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. testing it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -79,7 +79,7 @@ async function runMain(main: ExtendedScalaRunMain): Promise<boolean> { | |||
|
|||
const shellOptions = { ...platformSpecificOptions(), env }; | |||
const task = new Task( | |||
{ type: "scala", task: "run" }, | |||
{ type: "scala " + main.data.class, task: "run" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ type: "scala " + main.data.class, task: "run" }, | |
{ type: "scala", task: "run", class: main.data.class }, |
I read the API for Task and it seems type
should stay as "scala" and we can just add another property which looks to be working. If we ever need to use https://code.visualstudio.com/api/extension-guides/task-provider#task-definition then we would avoid weird issue.
I should have thought of it in the first place, thanks for working on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
No description provided.