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

Cannot import build using mill 0.6.1 #1700

Closed
meshake opened this issue May 6, 2020 · 1 comment · Fixed by #1702
Closed

Cannot import build using mill 0.6.1 #1700

meshake opened this issue May 6, 2020 · 1 comment · Fixed by #1702
Milestone

Comments

@meshake
Copy link
Contributor

meshake commented May 6, 2020

Describe the bug

As far as I understand metals ships with it's own mill build, which is currently at version 0.6.1. Unfortunately, this version contains a bug, where on Windows with java 8 an error is thrown when trying to import a build. See issue: com-lihaoyi/mill#405

To Reproduce
Steps to reproduce the behavior:

  1. Create a new folder foo with a file build.sc with the following contents:
import mill._, scalalib._

object foo extends ScalaModule {
  def scalaVersion = "2.13.1"
}
  1. Open the folder in VS Code and click Import Build
  2. Observe that "mill bloopinstall" runs forever and the output contains the following errors:

2020.05.06 14:36:20 INFO running 'C:\Users\xxx\AppData\Local\Temp\metals3886844015490896242\millw.bat --mill-version 0.6.1 --predef C:\Users\xxx\AppData\Local\Temp\metals3886844015490896242\predef.sc mill.contrib.Bloop/install'
2020.05.06 14:36:21 INFO Error: Could not create the Java Virtual Machine.
2020.05.06 14:36:21 INFO Error: A fatal exception has occurred. Program will exit.
2020.05.06 14:36:21 INFO Unrecognized VM option 'VMOptionsFile=C:\Users\xxx\Desktop\testmill\out\mill-worker-qq8Z5zqpvm7Xr\yBd+k6DpQPqRg=-1\vmoptions'

Expected behavior
I would expect the project to be imported with no issues

Screenshots

Installation:

  • Operating system: Windows 10
  • Editor: Visual Studio Code
  • Metals version: v0.9.0

Additional context
It looks like this issue has been addressed on com-lihaoyi/mill#791, which has been included in mill 0.6.2

Search terms
mill

@tgodzik
Copy link
Contributor

tgodzik commented May 6, 2020

Thanks for reporting! We should upgrade the default Mill version to 0.6.2, but in the meantime you can specify the version yourself via .mill-version file or by customizing the mill executable in the settings.

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 a pull request may close this issue.

2 participants