Skip to content
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

Support multiple separate build targets #3126

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

MaciejG604
Copy link
Contributor

Had some time to fix a big problem in the way of #3085 - #3112.

After that is gone, moving from the PoC to its basic, still exciting version was very tempting. And so here we are.

This PR introduces support for multiple build targets in the BSP mode. Build targets are not in any way related, their classpath and project configuration should be totally separate, except of course for options passed from CLI which will be applied to all.

Setting up of build targets can be done with a .toml file where we define all build targets together with their roots - which corresponds to how all Scala CLI projects start their preprocessing - args from CLI. The rest is just for looping over the build targets doing the same stuff we always do.

The toml looks like this:

[modules.core]

[modules.utils]
roots = ["Utils.scala", "Utils2.scala"]

Where no roots is defined the name is picked and so the root of module core will be core/ in the project workspace.

Nit:Remove maybeUpdateProjectTargetUri as ProjectName always has targetUriOpt set

Nit: Add named arguments to a buildOnce call
- copy HasGeneratedSources.scala into ManagesBuildTargets.scala
- copy HasGeneratedSourcesImpl.scala into ManagesBuildTargetsImpl.scala.
Use ProjectName class instead of plain String
…inputs for further processing

Implement a new trait Inputs, that aggregates ModuleInputs

Use InputsComposer in Bsp and SetupIde

Add method for picking the highest version of JVM from BuildOptions
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.

1 participant