-
Notifications
You must be signed in to change notification settings - Fork 121
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
Unbreak sbt-dotty #779
Milestone
Comments
See the versioning PR #661 |
I'm currently working on migrating the dotty codebase so it can build with zinc 1.4, I could get around the VirtualFile break with a wrapper, but its still work in progress |
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 10, 2020
Fixes sbt#779 As it stands, compiler-interface and compiler bridge implementation is an internal concern of Zinc implementation. We _should_ be able to remove methods or change the method signatures. The word "interface" here is between Scalac and Zinc internal, not to the world. In reality, the situation is more complicated because we have Dotty compiler out there that is bound to specific version of compiler-interface. So when I released sbt 1.4.0-M1 this resulted in NoSuchMethodErrors: ``` [error] ## Exception when compiling 1 sources to /private/tmp/hello-dotty/target/scala-0.24/classes [error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [error] xsbt.CompilerInterface.newCompiler(CompilerInterface.java:35) .... [error] Caused by: java.lang.NoSuchMethodError: xsbti.compile.SingleOutput.getOutputDirectory()Ljava/io/File; [error] at xsbt.CachedCompilerImpl.<init>(CachedCompilerImpl.java:35) ``` To smooth things out, one approach we've discussed is to create a separate compiler-interface (in a different package) that is less dependent on Zinc specifics. Related to that, in sbt#661 I've created Java interface for `CompilerInterface1`, and we can use pattern matching to see which capability the compiler bridge implementation supports. This creates brings in those Java interfaces as well. In any case, this commit brings back the old `java.io.File`-based methods, and locally I was able to get hello world from Dotty.
Here's my PR for this - #829 |
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 10, 2020
Fixes sbt#779 As it stands, compiler-interface and compiler bridge implementation are of internal concern of Zinc implementation. We _should_ be able to remove method or change the signatures. The word "interface" here is between Scalac and Zinc internal, not to the world. In reality, the situation is more complicated because we have Dotty compiler out there that is bound to a specific version of compiler-interface. So when I released sbt 1.4.0-M1 this resulted in NoSuchMethodErrors: ``` [error] ## Exception when compiling 1 sources to /private/tmp/hello-dotty/target/scala-0.24/classes [error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [error] xsbt.CompilerInterface.newCompiler(CompilerInterface.java:35) .... [error] Caused by: java.lang.NoSuchMethodError: xsbti.compile.SingleOutput.getOutputDirectory()Ljava/io/File; [error] at xsbt.CachedCompilerImpl.<init>(CachedCompilerImpl.java:35) ``` To smooth things out, one approach we've discussed is to create a separate compiler-interface (in a different package) that is less dependent on Zinc specifics. Related to that, in sbt#661 I've created Java interface for `CompilerInterface1`, and we can use pattern matching to see which capability the compiler bridge implementation supports. This commit brings in those Java interfaces as well. In any case, this commit brings back the old `java.io.File`-based methods, and locally I was able to get hello world from Dotty.
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 12, 2020
Fixes sbt#779 As it stands, compiler-interface and compiler bridge implementation are of internal concern of Zinc implementation. We _should_ be able to remove method or change the signatures. The word "interface" here is between Scalac and Zinc internal, not to the world. In reality, the situation is more complicated because we have Dotty compiler out there that is bound to a specific version of compiler-interface. So when I released sbt 1.4.0-M1 this resulted in NoSuchMethodErrors: ``` [error] ## Exception when compiling 1 sources to /private/tmp/hello-dotty/target/scala-0.24/classes [error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [error] xsbt.CompilerInterface.newCompiler(CompilerInterface.java:35) .... [error] Caused by: java.lang.NoSuchMethodError: xsbti.compile.SingleOutput.getOutputDirectory()Ljava/io/File; [error] at xsbt.CachedCompilerImpl.<init>(CachedCompilerImpl.java:35) ``` To smooth things out, one approach we've discussed is to create a separate compiler-interface (in a different package) that is less dependent on Zinc specifics. Related to that, in sbt#661 I've created Java interface for `CompilerInterface1`, and we can use pattern matching to see which capability the compiler bridge implementation supports. This commit brings in those Java interfaces as well. In any case, this commit brings back the old `java.io.File`-based methods, and locally I was able to get hello world from Dotty.
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 14, 2020
Fixes sbt#779 As it stands, compiler-interface and compiler bridge implementation are of internal concern of Zinc implementation. We _should_ be able to remove method or change the signatures. The word "interface" here is between Scalac and Zinc internal, not to the world. In reality, the situation is more complicated because we have Dotty compiler out there that is bound to a specific version of compiler-interface. So when I released sbt 1.4.0-M1 this resulted in NoSuchMethodErrors: ``` [error] ## Exception when compiling 1 sources to /private/tmp/hello-dotty/target/scala-0.24/classes [error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [error] xsbt.CompilerInterface.newCompiler(CompilerInterface.java:35) .... [error] Caused by: java.lang.NoSuchMethodError: xsbti.compile.SingleOutput.getOutputDirectory()Ljava/io/File; [error] at xsbt.CachedCompilerImpl.<init>(CachedCompilerImpl.java:35) ``` To smooth things out, one approach we've discussed is to create a separate compiler-interface (in a different package) that is less dependent on Zinc specifics. Related to that, in sbt#661 I've created Java interface for `CompilerInterface1`, and we can use pattern matching to see which capability the compiler bridge implementation supports. This commit brings in those Java interfaces as well. In any case, this commit brings back the old `java.io.File`-based methods, and locally I was able to get hello world from Dotty.
|
I need to restore https://github.com/sbt/zinc/blob/v1.3.0/internal/compiler-bridge/src/main/scala/xsbt/ScaladocInterface.scala class ScaladocInterface {
def run(args: Array[String], log: Logger, delegate: xsbti.Reporter) =
(new Runner(args, log, delegate)).run
} |
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 27, 2020
Merged
eed3si9n
added a commit
to eed3si9n/zinc
that referenced
this issue
Jul 27, 2020
lrytz
pushed a commit
to lrytz/scala
that referenced
this issue
Jul 13, 2023
Fixes sbt/zinc#779 As it stands, compiler-interface and compiler bridge implementation are of internal concern of Zinc implementation. We _should_ be able to remove method or change the signatures. The word "interface" here is between Scalac and Zinc internal, not to the world. In reality, the situation is more complicated because we have Dotty compiler out there that is bound to a specific version of compiler-interface. So when I released sbt 1.4.0-M1 this resulted in NoSuchMethodErrors: ``` [error] ## Exception when compiling 1 sources to /private/tmp/hello-dotty/target/scala-0.24/classes [error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [error] xsbt.CompilerInterface.newCompiler(CompilerInterface.java:35) .... [error] Caused by: java.lang.NoSuchMethodError: xsbti.compile.SingleOutput.getOutputDirectory()Ljava/io/File; [error] at xsbt.CachedCompilerImpl.<init>(CachedCompilerImpl.java:35) ``` To smooth things out, one approach we've discussed is to create a separate compiler-interface (in a different package) that is less dependent on Zinc specifics. Related to that, in sbt/zinc#661 I've created Java interface for `CompilerInterface1`, and we can use pattern matching to see which capability the compiler bridge implementation supports. This commit brings in those Java interfaces as well. In any case, this commit brings back the old `java.io.File`-based methods, and locally I was able to get hello world from Dotty. Rewritten from sbt/zinc@b4df9a3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The introduction of
VirtualFile
has impacted sbt-dotty, so this ticket tracks addressing that before 1.4.0.See #712 (comment)
problem
The Dotty compiler cannot be instantiated:
The text was updated successfully, but these errors were encountered: