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

installation-ide.adoc: mill.bsp.BSP/install #3976

Closed
wants to merge 1 commit into from

Conversation

sideeffffect
Copy link
Contributor

Instructions to run mill.bsp.BSP/install. Without it, IntelliJ won't pick up the BSP model -- it won't show it as one of the possible ways how to import the project.

@lihaoyi
Copy link
Member

lihaoyi commented Nov 15, 2024

I havent needed to do this for a clean checkout for maybe a year now

@lihaoyi
Copy link
Member

lihaoyi commented Nov 16, 2024

do you have a repro i can look at where running this command is necessary?

@sideeffffect
Copy link
Contributor Author

sideeffffect commented Nov 16, 2024

When you open the project as just a mere directory, IntelliJ doesn't prompt you to import -- regardless of whether with BSP or Maven or anything. You just see this and nothing happens.
scala-mill-experiment.zip
image
image

@lihaoyi
Copy link
Member

lihaoyi commented Nov 16, 2024

The issue seems to be that IntelliJ uses the presence a ./mill bootstrap script in order to detect it as a Mill build. After adding such a bootstrap script the intellij auto import seems to work

@lihaoyi
Copy link
Member

lihaoyi commented Nov 16, 2024

We can probably send a patch upstream to intellij-scala to make it a bit more flexible. In the meantime, this command may be useful to fix some of the misbehaviors I've seen when intellij gets into a bad state. Let me try to reproduce them to see

@sideeffffect
Copy link
Contributor Author

presence [of] a ./mill bootstrap script in order to detect it as a Mill build

Would you say it is more robust to rather detect Mill via detecting

  • build.mill or
  • build.mill.scala or
  • mill.scala
  • (did I forget any other case?)

@lihaoyi
Copy link
Member

lihaoyi commented Nov 17, 2024

@sideeffffect should be these cases

  • ./mill
  • ./build.mill
  • ./build.mill.scala

Maybe ./millw or ./millw.bat from https://github.com/lefou/millw?

@sideeffffect
Copy link
Contributor Author

lefou added a commit to lefou/mill that referenced this pull request Nov 19, 2024
This info may be still valuable to debug IDE issues as well as running with more rare setups like `vim` or `emacs`.

Inspired by com-lihaoyi#3976 from https://github.com/sideeffffect
@lefou lefou mentioned this pull request Nov 19, 2024
lefou added a commit that referenced this pull request Nov 19, 2024
This info may be still valuable to debug IDE issues as well as running
with more rare setups like `vim` or `emacs`.

Inspired by #3976 from
[@sideeffffect](https://github.com/sideeffffect)

Pull request: #3989
@lefou
Copy link
Member

lefou commented Nov 19, 2024

Superseded by #3989

@lefou lefou closed this Nov 19, 2024
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.

3 participants