zinc icon indicating copy to clipboard operation
zinc copied to clipboard

ZincCompilerUtil#scalaCompiler doesn't accept ModuleID

Open eed3si9n opened this issue 8 years ago • 5 comments

There's a setting called scalaCompilerBridgeSource that lets the end user pick the compiler bridge source module. This is a key escape hatch that allows alternative Scala compiler such as Dotty and Typelevel Scala.

problem

  1. ZincCompilerUtil#scalaCompiler does not accept ModuleID.
public static ScalaCompiler scalaCompiler(ScalaInstance scalaInstance,
                                              File compilerBridgeJar,
                                              ClasspathOptions classpathOptions) {

expectation

An alternative entry point with a parameter for compilerBridgeSource: ModuleID and a configuration for Ivy (because the build user's Ivy could be hind firewall etc).

/cc @jvican

eed3si9n avatar May 28 '17 22:05 eed3si9n

Given the lack of librarymanagement API, the next best thing would be to provide interfaceProvider alternative that lets you specify the compilerBridgeSource.

eed3si9n avatar May 28 '17 23:05 eed3si9n

What's the plan you have in mind here?

The only clean solution to fix this issue is to make ModuleID part of the public API, to be honest.

jvican avatar Jul 10 '17 22:07 jvican

@eed3si9n @Duhemm I propose we make ModuleID part of the public API. What do you think?

jvican avatar Jul 11 '17 07:07 jvican

@jvican It will be! That's part of sbt/librarymanagement#124.

Duhemm avatar Jul 11 '17 07:07 Duhemm

Great, it was not clear to me it would finally be added. Looks great to me. When that is out, I'll update Zinc's public API to use it.

jvican avatar Jul 11 '17 07:07 jvican