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

Make BSP 1st class citizen #899

Closed
5 of 7 tasks
joan38 opened this issue May 21, 2020 · 11 comments
Closed
5 of 7 tasks

Make BSP 1st class citizen #899

joan38 opened this issue May 21, 2020 · 11 comments

Comments

@joan38
Copy link
Collaborator

joan38 commented May 21, 2020

This is a proposal, and if agreed, road map to make BSP 1st class citizen of Mill.

Why?

From an Intellij user perspective the current default way of importing a Mill project in our IDE is to run mill mill.scalalib.GenIdea/idea and then open the generated project.
That is very much the way SBT started to get into Idea and then benefited of an official support from the Intellij Scala plugin.
Now it seems SBT is going down the path of using BSP exclusively.

The current limitations with this approche are:

  • The user needs to first run a mill command to generate the Idea project
  • Does not work for other IDEs than Intellij
  • The Intellij support burden is on mill's side

How?

List of things that needs to happen before we could even consider this proposal:

Thanks

@sequencer
Copy link
Contributor

I have a question that App from Intellij seems to be 2x slower than console execuation. Is that a limitation from Intellij?

@lefou
Copy link
Member

lefou commented Nov 10, 2020

When working via GenIdea, editing build.sc and other included ammonite script work almost out of the box, whereas via BSP, everything is red and IDEA has no idea how to handle it.

@joan38
Copy link
Collaborator Author

joan38 commented Nov 10, 2020

The only red thing I have on my side is when we use the $file notation.
I solve that by setting Preferences... > Language & Framework > Worksheet > Treat .sc files as: to Always Ammonite.
This step is automatically set by GenIdea and I was unable to make the Scala Intellij plugin to do that automatically. cc @jastice

@lefou do you have more red than that?

@lefou
Copy link
Member

lefou commented Nov 10, 2020

@lefou do you have more red than that?

Yes, almost everthing that's imported, e.g the mill API. It's interesting that things coming from explicit $ivy imports are properly resolved, e.g. extra mill plugins.

@joan38
Copy link
Collaborator Author

joan38 commented Nov 10, 2020

I just tried 0.8.0-30-656310 and it works.
Ah I just noticed I'm using a locally built version of JetBrains/intellij-scala#572. This PR is built against Idea idea203.x but I backported it locally to idea202.x since idea203.x is not yet released. Very bleeding edge 😄
The current release of the Scala Idea plugin does not support #969

@lefou
Copy link
Member

lefou commented Nov 10, 2020

I also tried to open the same project in vscode with the newest Metals plugin, switched to mill BSP. It seems, that it is only seeing ScalaModules. All other modules (JavaModule, JavaModule with AspectJModule, ...) are not recognized.

@joan38
Copy link
Collaborator Author

joan38 commented Nov 10, 2020

VSCode definitely need more work but on the server side (Mill side) I don't see any outstanding task/improvement pending.

@lefou
Copy link
Member

lefou commented Nov 10, 2020

@joan38
Copy link
Collaborator Author

joan38 commented Nov 10, 2020

Ah. Ok there seem to be work to do then.

@lefou
Copy link
Member

lefou commented Nov 28, 2020

More BSP issues:

@lefou lefou added this to Backlog in Mill BSP Integration Aug 17, 2021
@lefou lefou moved this from Backlog to Done in Mill BSP Integration Nov 5, 2021
@lefou
Copy link
Member

lefou commented Nov 5, 2021

BSP is now a first class citizen. ;-)

There are some open issues, though. Any help is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants