Skip to content

Use Wconf to silence Unsafe usage under jdk18 #15520

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

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

som-snytt
Copy link
Contributor

Allow build to proceed under JDK 18.

@dwijnand
Copy link
Member

Why the mixed approach? I'd rather have a local @nowarn in LazyVals than a global -Wconf, as a general policy to avoid accidental overreaches.

@som-snytt
Copy link
Contributor Author

If I don't use -Wconf periodically, I forget how to use it. Eventually, I forget to use it.

However, I'll reconsider.

@som-snytt
Copy link
Contributor Author

I managed to break stuff I didn't know existed.

 Error:  -- Error: C:\actions-runner2\_work\dotty\dotty\tests\sjs-junit\..\out\bootstrap\sjsJUnitTests\scala-3.2.1-RC1-bin-SNAPSHOT-nonbootstrapped\src_managed\main\BuildInfo.scala:6:0 
Error:  6 |val hasSourceMaps = false
Error:    |^
Error:    |Line is indented too far to the left, or a `}` is missing

@som-snytt
Copy link
Contributor Author

som-snytt commented Jun 24, 2022

Scaladoc in the community build balks on

Error:  bad option: '-Werror'

FSR, scaladoc in every version (1, 2, 3) is the source of things that don't work.

@som-snytt som-snytt force-pushed the build/silence-unsafe-usage branch from e6220fc to 87da3e2 Compare June 24, 2022 14:57
@som-snytt
Copy link
Contributor Author

som-snytt commented Jun 24, 2022

@dwijnand I remember now, it's because I hate typing import scala.annotation.*, there's just no reason for it.

Updated with sprinkles of @nowarn. Left the example -Wconf as an example, or perhaps as a warning to future generations.

The ugly -Xfatal-warnings must stand for now.

Note that I woke up too early and on the wrong side.

@som-snytt som-snytt marked this pull request as ready for review June 24, 2022 15:01
@dwijnand
Copy link
Member

@dwijnand I remember now, it's because I hate typing import scala.annotation.*, there's just no reason for it.

I feel you. I can't decide if I hate more the adding of import, out yonder at the start of whatever file I'm in, the eye-sore verbosity of @scala.annotation.nowarn..., or the less verbose but still very eye-sore of the stumpy @annotation.nowarn...

@som-snytt
Copy link
Contributor Author

I hope the auto-import of scala.annotation makes it in.

@som-snytt
Copy link
Contributor Author

The title should be, "Use every means at one's disposal...".

@dwijnand dwijnand merged commit 28faa0f into scala:main Jun 24, 2022
@som-snytt som-snytt deleted the build/silence-unsafe-usage branch June 24, 2022 18:49
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants