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

BSP: Improve support for mill-build module and the build.sc #2291

Merged
merged 5 commits into from
Jan 29, 2023

Conversation

lefou
Copy link
Member

@lefou lefou commented Jan 27, 2023

This change improves the editing experience for build.sc files in Metals.

We now rudimentary detect ammonite includes ($file and $ivy).

We somewhat break the BSP protocol now, as we return sources as paths to single files instead of directories. It is known, that IDEA does not handle it well, but Metals seems to have no problem with it. We don't report directories as the build.sc is located in the project top-level directory, and it would contain all other project files too, which is definitely not what we want.

Also I refined the module dependencies: compileIvyDeps now returns Mill-provided fixed dependencies, ivyDeps returns all extra resources included via Ammonite $ivy imports, and scalacPluginIvyDeps now includes Mill own compiler plugins which among other things make the override keyword optional.

I also restructured some source files in mill.scalalib.bsp package.

Fixed the overridden-check for compiledClassesAndSemanticDbFiles. This should significantly speed things up for larger projects.

@lefou lefou changed the title BSP: Improved editing support for mill-build module BSP: Improved support for mill-build module and the build.sc Jan 27, 2023
@lefou lefou requested a review from ckipp01 January 27, 2023 16:43
@lefou lefou changed the title BSP: Improved support for mill-build module and the build.sc BSP: Improve support for mill-build module and the build.sc Jan 27, 2023
Copy link
Collaborator

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼 nice improvements!

@lefou lefou merged commit b6c53f4 into com-lihaoyi:main Jan 29, 2023
@lefou lefou deleted the bsp-small-steps branch January 29, 2023 09:49
@lefou lefou added this to the 0.11.0-M4 milestone Jan 29, 2023
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.

None yet

2 participants