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

Mill's bloopInstall fails due to incorrect call #5387

Closed
KaranAhlawat opened this issue Jun 29, 2023 · 8 comments
Closed

Mill's bloopInstall fails due to incorrect call #5387

KaranAhlawat opened this issue Jun 29, 2023 · 8 comments
Milestone

Comments

@KaranAhlawat
Copy link
Contributor

Describe the bug

Upon opening a project a Mill project in VSCode, and then doing Import Build, the bloopInstall command fails. Here is the concerned output

2023.06.29 22:07:53 INFO  running '/var/home/karan/Secondary/dev/scratch_proj/hyper-mill/.metals/millw --mill-version 0.11.1 --import ivy:com.lihaoyi::mill-contrib-bloop: mill.contrib.Bloop/install'
2023.06.29 22:07:53 INFO  Cannot resolve external module mill.contrib.Bloop
  1. Create Mill project
  2. Open in VSCode
  3. Import Build
  4. Fails with Cannot resolve external module mill.contrib.Bloop.

Expected behavior

Everything works OOTB, without need to run commands from the mill script

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

v0.11.12

Extra context or search terms

The correct command should be using mill.contrib.bloop.Bloop/install instead of mill.contrib.Bloop/install. Running the same command but with the correct namespace(?) from the terminal produces a .bloop after which Metals works fine.

Looking at the code in MillBuildTool.scala, we can see that it should pick the correct command based on the version specified in .mill-version file (it can read the version correctly), since 0.11.1 is greater than 0.9.3.

However, somehow that ends up being not the case, and the other command is picked. I'm not sure how to debug a running instance of Metals so I'm opening this issue.

Any help is appreciated in advance.

@ckipp01
Copy link
Member

ckipp01 commented Jun 30, 2023

Thanks for the report @KaranAhlawat. Just to double check, locally are you using a .mill-version file? Also, are you using a millw script in your workspace? If so, which one?

@KaranAhlawat
Copy link
Contributor Author

  1. Yes, I'm using a .mill-version file. The version is set to 0.11.1
  2. Yes, I downloaded the latest millw script from the GH repo. The commit is 0f3e2cb. This is placed in my project root folder, renamed as mill so it's shorter to type.

@kammoh
Copy link

kammoh commented Jul 1, 2023

The correct module path is mill.contrib.bloop.Bloop

mill mill.contrib.bloop.Bloop/install

The documentation needs to be corrected!

@tgodzik
Copy link
Contributor

tgodzik commented Jul 3, 2023

What documentation do you mean? https://scalameta.org/metals/docs/build-tools/mill seems to have the correct version.

@tgodzik
Copy link
Contributor

tgodzik commented Jul 3, 2023

The fix hasn't been released yet it seems @KaranAhlawat I will work on a release soon, but in the meantime you can use latest snapshot 0.11.12+161-977d53e3-SNAPSHOT

@KaranAhlawat
Copy link
Contributor Author

Ah, so was the check for the version added after the release of 0.11.12? That would make sense

@tgodzik
Copy link
Contributor

tgodzik commented Jul 3, 2023

Yep, we are late with the release, but I plan to work on that after bumping Bloop to 1.5.7

@KaranAhlawat
Copy link
Contributor Author

Makes sense to me! I'll be closing the issue then.

@tgodzik tgodzik added this to the Metals v1.0.0 milestone Jul 18, 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

No branches or pull requests

4 participants