-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Swift target does not build on JDK 6 #1327
Comments
Hmm...If we can leave it as compatible with jdk 6 that would be nice. I don't think we have made an across-the-board requirement for jdk 7 yet. |
@parrt Can I persuade you otherwise? ;-) Java 6 hasn't had a publicly available update since April 2013 (according to Wikipedia) but Oracle have made dozens of security fixes under their support program. That means that the public version is known to be insecure. I don't think that we (or anyone) should be supporting it unless you have a user with a compelling need. The use of ProcessBuilder.Redirect is in the Swift BaseTest, so it's not critical and I'm sure that we could rewrite it, but just as a matter of policy I don't think it's a good idea to cling onto JDK 6. (I'm sure Travis would appreciate us dropping a platform too.) |
Hmm...ok, anybody object to requiring Java 7 now? @sharwell @ericvergnaud ? |
I support dropping Java 6. Envoyé de mon iPhone
|
Added #1352 |
Does this involve only the build environment requirement or will the runtime also depend on Java 7? |
just the build |
Great! I would seriously consider going straight to Java 8 then. Do you plan to use something like the Animal Sniffer plugin to ensure JDK 6 compatibility for the runtime? |
@marcohu We already build the release using a newer JDK, and use the bootclasspath build option to ensure JDK 6 compatibility. Edit: While my optimized builds (a separate product/release) do use this, it appears this functionality was stripped from the builds used by the reference repository. It seems like the use of ProcessBuilder.Redirect is likely not required. Can you clarify where it is used? We can replace it with the mechanism already used in the Java target tests to redirect/consume output from a separate process. |
@sharwell I'm actually using your version, bootclasspath checking is not implemented universally. Don't know whether this is intentional. Compiling the maven plugin yields a warning for me:
I'm using Java 7 features in #1353 already and would very much prefer to be able to do so. At least for testing. For the runtime I'm absolutely pro Java 6. |
@marcohu I think we'll do jdk 7 for now. |
This is intentional. Not all users have a Java 6 JDK laying around, so disabling this feature in the default build reduces the effort required for new developers to start working on the project. 😄 |
@sharwell While I strongly agree to have fully automated builds, I would prefer to have requirements still enforced. That's where animal sniffer etc. could prove useful. Otherwise developers might use unsupported features at one point and have to rework their code. But as this discussion is off-topic here, we should continue in the forum if there is any interest. |
The Swift target at https://github.com/ewanmellor/antlr4/tree/swift-target does not currently build on JDK 6. It is using java.lang.ProcessBuilder.Redirect, which was added in JDK 7.
I don't know if this is a problem for merging into mainline. @parrt ?
The text was updated successfully, but these errors were encountered: