Mill BSP returns the same base directory for targets in different platforms #2902
Replies: 1 comment 4 replies
-
Hi @azdrojowa123, thanks for reaching out.
If all these sub-modules share the same sources and resources, it make much sense to me to let them have the same base directory. The BSP spec does not prohibit this scenario. Yes, I'm aware, that IJ has issues with multiple modules sharing the same directory, but I thought, this limitation does not exists in it's BSP support, only when using the classic Java / Scala setup. (Fun fact: In our non-BSP IDEA project generator, we have some option to override the base directory specifically for IDEA with
Yes, I would think so. Of course it depends on the concrete project setup. The BSP server is reporting the same base directory as Mill is using for each module.
If it builds with Mill CLI, it's probably not an error but some mismatch of assumptions how Scala project need to be organized. At least, the BSP spec does not prohibit this scenario.
I can't tell you, as it's up to the specific project how it is reporting generated sources. Technically, in BSP it's a list of URIs representing file or directory locations. There is no specific requirement to choose one over the other and it should not make any difference. Also in Mill you return a /cc @lolgab, as it's his project which is referenced in the originating YouTrack ticket. |
Beta Was this translation helpful? Give feedback.
-
Hi !
Let me start by saying that I have no experience with Mill :(
In the IntelliJ scala plugin we got a ticket from the user related to the very long import of the project.
The project introduced in the ticket is a multi platform Mill project, and it is imported to IntelliJ with bsp.
I spent some time with this project, and noticed that all build targets (for different platforms) which are returned from the Mill server contain the same base directory. I mean, for example, all the targets listed below contain the same base directory:
The situation is analogous with test targets (the base directory is the same but with the
/test
suffix).Is it an expected behaviour from the mill server, or is it a bug on the server side?
I also consider that there may be some configuration error.
Additionally, I noticed that the server reports all generated sources separately, which results in hundreds of single source entries.
Why isn't it merged and reported as generated source directories?
Beta Was this translation helpful? Give feedback.
All reactions