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

prepareOffline does not install the relevant compiler-bridge? #2632

Closed
yilinwei opened this issue Jun 25, 2023 · 2 comments · Fixed by #2791
Closed

prepareOffline does not install the relevant compiler-bridge? #2632

yilinwei opened this issue Jun 25, 2023 · 2 comments · Fixed by #2791
Milestone

Comments

@yilinwei
Copy link

I got bitten by this because I'm constructing a coursier cache using coursier's fetch JSON report on 0.10.12 to run mill in a completely sandboxed environment.

> myapp.compile java.util.NoSuchElementException: None.get
       >     scala.None$.get(Option.scala:627)
       >     scala.None$.get(Option.scala:626)
       >     mill.scalalib.ZincWorkerModule.$anonfun$worker$5(ZincWorkerModule.scala:48)
       >     mill.scalalib.worker.ZincWorkerImpl.compileBridgeIfNeeded(ZincWorkerImpl.scala:216)
       >     mill.scalalib.worker.ZincWorkerImpl.withCompilers(ZincWorkerImpl.scala:389)
       >     mill.scalalib.worker.ZincWorkerImpl.compileMixed0(ZincWorkerImpl.scala:338)
       >     mill.scalalib.worker.ZincWorkerImpl.compileMixed(ZincWorkerImpl.scala:306)
       >     mill.scalalib.ScalaModule.$anonfun$compile$2(ScalaModule.scala:198)
       >     mill.define.Task$TraverseCtx.evaluate(Task.scala:380)

I can see there was some work done on it in this commit. I haven't yet had the time to upgrade to a newer mill version to see if the issue is still there.

@natsukagami
Copy link

I got hit by this today with 0.11.4 as well

compile java.lang.Exception: Failed to load compiler bridge for 3.3.1 org.scala-lang
    mill.scalalib.ZincWorkerModule.$anonfun$worker$6(ZincWorkerModule.scala:81)
    scala.Option.getOrElse(Option.scala:201)
    mill.scalalib.ZincWorkerModule.$anonfun$worker$5(ZincWorkerModule.scala:81)
    mill.scalalib.worker.ZincWorkerImpl.compileBridgeIfNeeded(ZincWorkerImpl.scala:255)
    mill.scalalib.worker.ZincWorkerImpl.withCompilers(ZincWorkerImpl.scala:387)
    mill.scalalib.worker.ZincWorkerImpl.compileMixed(ZincWorkerImpl.scala:331)
    mill.scalalib.ScalaModule.$anonfun$compile$2(ScalaModule.scala:212)
    mill.define.Task$TraverseCtx.evaluate(Task.scala:71)
    ```

@lefou
Copy link
Member

lefou commented Sep 28, 2023

Currently, you need to set the all flag to resolve the compile bridge

$ mill __.prepareOffline --all

But this makes no sense, as it is always required when compiling, so I will open a PR to fix that.

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.

3 participants