Remove JDK-version dependent code out of the compiler bridge#327
Merged
Remove JDK-version dependent code out of the compiler bridge#327
Conversation
On both my local machine and on Drone box, `ZincComponentCompilerSpec` fails to compile 2.10 compiler bridge with the following error:
```
/T/sbt_1234/xsbti/compile/CompilerBridgeProvider.java:33: error: `;' expected but `{' found.
static CompilerBridgeProvider constant(File file, ScalaInstance scalaInstance) {
^
```
I suspected that this is due to Java `interface` defining a static method, a change introduced in only in Java 8.
After making this change, the spec passed the test.
Merged
jvican
approved these changes
Jun 30, 2017
Member
jvican
left a comment
There was a problem hiding this comment.
LGTM, good catch.
Just to make it clearer for future readers of this PR, the issue happens in Scala's Java parser that is not capable of parsing statics in interfaces (only introduced in JDK8). Therefore, from now on, we should try to keep JDK version-dependent code out of the bridge, as this PR does.
|
dbuild has checked the following projects against Scala 2.12:
❌ The result is: FAILED |
Member
Author
|
Dbuild validation won't work because it currently depends on sbt versions lined up to sbt 1.0.0-M6. |
Member
Author
|
I rebased #323 (sbt 1.0.0-M6 bump) on top of this PR, and was able to get Dbuild to pass, so this PR too is validated. |
dwijnand
approved these changes
Jun 30, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On both my local machine and on Drone box,
ZincComponentCompilerSpecfails to compile 2.10 compiler bridge with the following error:I suspected that this is due to Java
interfacedefining a static method, a change introduced in only in Java 8.After making this change, the spec passed the test.
notes
Would it be reasonable to think that Scala 2.10 cannot parse Java 8 source?