8000 Refactor internal BSP tasks out of `JavaModuleApi` by lefou · Pull Request #5214 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor internal BSP tasks out of JavaModuleApi #5214

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

Merged
merged 33 commits into from
Jun 5, 2025

Conversation

lefou
Copy link
Member
@lefou lefou commented May 28, 2025

We use a dedicated trait to hold internal BSP tasks. This is, to free the binary compatibly Module API from these likely changing tasks.

Also refined the package layout in mill.api.internal and introduced sub-packages bsp and idea.

@lihaoyi
Copy link
Member
lihaoyi commented May 28, 2025

Feel free to delete and move things around the API; until 1.0.0 final lands, there aren't any compatibility concerns, so best to squeeze in as much cleanup as we can

@lefou lefou changed the title POC: Refactor internal BSP task out of JavaModule Refactor internal BSP task out of JavaModule Jun 4, 2025
@lefou lefou changed the title Refactor internal BSP task out of JavaModule Refactor internal BSP tasks out of JavaModule Jun 4, 2025
@lefou
Copy link
Member Author
lefou commented Jun 5, 2025

Moved various internal BSP tasks into a dedicated trait and update the PR description.

@lefou lefou changed the title Refactor internal BSP tasks out of JavaModule Refactor internal BSP tasks out of JavaModuleApi Jun 5, 2025
@lefou
Copy link
Member Author
lefou commented Jun 5, 2025

I also identified some internal tasks to support GenIdea, which I'd like the refactor following the same pattern but in a separate PR. I will wait with that until we have merged this PR, so ensure the pattern we use is consistent.

@lefou lefou marked this pull request as ready for review June 5, 2025 07:00
lefou added a commit to lefou/mill that referenced this pull request Jun 5, 2025
lefou added a commit to lefou/mill that referenced this pull request Jun 5, 2025
lefou added a commit to lefou/mill that referenced this pull request Jun 5, 2025
@lefou
Copy link
Member Author
lefou commented Jun 5, 2025

@lihaoyi I'd like to merge this one. It only juggles with unreleased API and should decouple internals from the public JavaModuleApi hierarchy.

@lihaoyi
Copy link
Member
lihaoyi commented Jun 5, 2025

@lefou i havent look at it but go ahead if CI and manual testing passes

@lefou lefou merged commit 80bb2e6 into com-lihaoyi:main Jun 5, 2025
38 checks passed
@lefou lefou deleted the tr-fix-bsp branch June 5, 2025 15:29
@lefou lefou added this to the 1.0.0-RC2 milestone Jun 5, 2025
lefou added a commit to lefou/mill that referenced this pull request Jun 5, 2025
lefou added a commit that referenced this pull request Jun 6, 2025
Further refactor BSP API. 

Extract a `BspRunModuleApi` and move all `RunModule` related internal
BSP tasks into it.

Increase test coverage by adding some BSP test cases.

Fix an actual bug where we never actually run.

Follow-up on #5214

Pull request: #5261
lefou added a commit that referenced this pull request Jun 12, 2025
Also factored new `GenIdeaInternalApi` module and moved some tasks
around.

This uses the same technique of an implicitly attached sub-module to
avoid adding private and likely changing internals to public stable
modules. this follows the previous BSP refactorings
(#5214,
#5261).

I also took the opportunity to simplify and clean the existing code.
Having a module-scoped class allows us to have some logic in a much
clearer way.

Removed the `GenIdeaModule.intellijModulePath` in favor to the redundant
`intellijModulePathJava`. This should reduce confusion about what to
override. But it needs a deprecation in Mill 0.12 which I'll add in a
separate PR (#5290).

Pull request: #5289
lefou added a commit that referenced this pull request Jul 9, 2025
Fix #5492

Same motivation as for #5214: We
use a dedicated `trait` (`BspMainModuleApi`) to hold internal BSP tasks.
This is, to free the binary compatibly Module API from these internal tasks.

Pull request: #5496
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.

2 participants
0