Skip to content

Conversation

lefou
Copy link
Member

@lefou lefou commented Jul 2, 2025

Fix #5208

@lefou
Copy link
Member Author

lefou commented Jul 4, 2025

This change breaks BSP support, since when we try to invoke the run command from an annonymous task, we get the error message:

Task.Anon@53839a78(mill.scalalib.bsp.BspRunModule.EmbeddableBspRunModule#internalBspRunModule.bspRun)
Non-exclusive task Task.Anon@53839a78(mill.scalalib.bsp.BspRunModule.EmbeddableBspRunModule#internalBspRunModule.bspRun) 
cannot depend on exclusive task app.run

@lefou
Copy link
Member Author

lefou commented Jul 4, 2025

That also means, BSP will always break if users have exclusive=true run-tasks. Ideally, we handle the exclusive flag differently when running from BSP.

@lefou lefou mentioned this pull request Jul 4, 2025
@lihaoyi
Copy link
Member

lihaoyi commented Jul 7, 2025

One option is to do what we did with bspClean, which is avoid depending on the exclusive def clean command and instead depend on a def cleanTask anonymous task. A similar refactor could be done for the def run commands to allow the anonymous task implementations to be used by BSP

@lefou lefou force-pushed the tr-run-exclusive branch from ef16744 to f867544 Compare July 9, 2025 09:32
@lihaoyi lihaoyi force-pushed the main branch 2 times, most recently from 1d3b959 to 3ba698a Compare July 10, 2025 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conside exclusive-mode by default for RunModule.run.

2 participants