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

Add a runtime warning when SI-9828 is possible #10050

Closed
scabug opened this issue Nov 13, 2016 · 10 comments
Closed

Add a runtime warning when SI-9828 is possible #10050

scabug opened this issue Nov 13, 2016 · 10 comments

Comments

@scabug
Copy link

scabug commented Nov 13, 2016

When the conditions for #9828 are met (old Java runtime), it would be a good idea to warn users who might not be aware of the issue.

@scabug
Copy link
Author

scabug commented Nov 13, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10050?orig=1
Reporter: Omer van Kloeten (omervk)
Affected Versions: 2.12.0
See #9828

@scabug
Copy link
Author

scabug commented Nov 14, 2016

Omer van Kloeten (omervk) said:
@lukas, since the original issue affects all Scala versions (2.10+?), it would be a nice idea to backport the resolution to this issue to previous versions.

@scabug
Copy link
Author

scabug commented Nov 14, 2016

@lrytz said:
Right, #9828 says it's using Scala 2.10.4, so it's not specific to Scala 2.12.

I assume the bug only exists in early JDK 8 releases, but not in any JDK 6 or 7 releases, so we should do an appropriate filter.

@scabug
Copy link
Author

scabug commented Nov 14, 2016

@lrytz said:
Another problem is that a compile-time warning does not say anything about the JVM used in production, but it might be better than nothing.

@scabug
Copy link
Author

scabug commented Nov 14, 2016

Omer van Kloeten (omervk) said:
How about exiting at runtime when this issue occurs with a switch to the disable the behavior?

@scabug
Copy link
Author

scabug commented Nov 14, 2016

@lrytz said:
We don't control / generate the entry points into programs. It also sounds rather harsh..

@scabug
Copy link
Author

scabug commented Nov 14, 2016

Omer van Kloeten (omervk) said:
Well, I was going for harsh. This is an issue that might break Production environments. The only solution to get rid of the error would be to upgrade the JDK to a non-affected version or to explicitly disable the behavior.

Adding a warning on a development machine is probably not going to do much good.

As for not controlling the runtime, well, you could add a val to scala.Predef. It would only be calculated once and probably during the runtime's startup phase.

@scabug
Copy link
Author

scabug commented Nov 14, 2016

@adriaanm said:
I'm sorry this affected you and others, but we really cannot somehow start running diagnostics on the platform we're running on and warn.

@scabug scabug closed this as completed Nov 14, 2016
@scabug
Copy link
Author

scabug commented Nov 16, 2016

@SethTisue said:
fyi @oxbowlakes

@scabug
Copy link
Author

scabug commented Nov 18, 2016

@retronym said:
FWIW, the bug affects Java code in the same way as Scala code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants