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

Lift Scala Settings from experimental to stabilized #20199

Merged
merged 19 commits into from
May 7, 2024

Conversation

rochala
Copy link
Contributor

@rochala rochala commented Apr 16, 2024

Fixes: #19693

This is the tracking list from the issue and the status of migraton.

  • lift to -X
    • -Yresolve-term-conflict
    • -YnoGenericSig
    • -Ydumpclasses
    • -YjarCompressionLevel
    • -YkindProjector
    • -YdropComments
    • -YcookComments
    • -YreadComments
    • -YnoDecodeStacktraces
    • -YnoEnrichErrorMessages
    • -YdebugMacros
    • -YjavaTasty- deprecate in 3.7.0
    • -YjavaTastyOutput- deprecate in 3.7.0
    • -YallowOutlineFromTasty- deprecate in 3.7.0
  • lift to -W
    • -Wsafe-init
  • to be removed
    • --Yforce-inline-while-typing // Note: this was already removed by 05eb7f7
  • TBD
    • -YfromTastyIgnoreList // this flag was not decided
    • -YoutputOnlyTasty

I suppose 2 last flags that have to be decided are maintained by @bishabosha
Do you know their status ?

Other than that, this PR implemented a deprecation mechanism for the future e.g.

Deprecation(
  msg = "message",
  replacedBy = Some("newMessage"),
)

EDIT:
As it was decided, options responsible for pipelining will be retained until 3.7.0.
The code is commented and following PR which will deprecate them will be created after merging this one.

EDIT2:
-Xlint is a very problematic flag. It was added into the compiler in 3.4 bypassing argument verification. Then in the future, when it was deprecated in favour of -Wshadow we couldn't exactly map them 1-1, and it was deprecated in following way:

  • Scala 2: -Xlint is valid flag,
  • Scala pre 3.4: -Xlint was skipped as it was not implemented,
  • Scala post 3.4 pre flag refactor: -Xlint was implemented allowing for all, private-shadow and type-parameter-shadow options. It also bypassed argument verification allowing standalone -Xlint to be ignored, not reported as error,
  • Scala post 3.4 post flag refactor: This flag was then deprecated in favour of -Wshadow. We didn't want to commit this mistake again and allow standalone -Wshadow thus when it was deprecated, we didn't handle it as we should (deprecated option should trigger replacement when possible).

That's why I'm retaining the previous behaviour of -Xlint. It will be removed in the future versions as it is already deprecated.

@Gedochao Gedochao added the needs-minor-release This PR cannot be merged until the next minor release label Apr 24, 2024
@Gedochao
Copy link
Contributor

This has been decided to be included in the 3.5.0 release.

Note: The following flags will have to not print the deprecation warning, despite them being lifted to -X. The reason for this is that they are currently hardcoded in SBT, so we need to give users time to upgrade.

  • -YjavaTasty
  • -YjavaTastyOutput
  • -YallowOutlineFromTast

The deprecation message will be added in a future minor release (no earlier than 3.7.x), and we will remove the old syntax no later than before the next LTS version (>3.3.x).

@nicolasstucki
Copy link
Contributor

We should consider removing -Youtput-only-tasty. We do not use it internally anymore and no library should ever publish a JAR that only contains TASTy (except for the Scala 2 TASTy library).

@bishabosha bishabosha removed their assignment May 6, 2024
@bishabosha bishabosha enabled auto-merge May 6, 2024 14:21
@rochala rochala disabled auto-merge May 6, 2024 14:22
@rochala
Copy link
Contributor Author

rochala commented May 6, 2024

Don't auto merge this, we're still waiting for community build (full community build) to finish 😅

@rochala rochala merged commit 5854959 into scala:main May 7, 2024
18 of 19 checks passed
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
armanbilge added a commit to armanbilge/sbt-typelevel that referenced this pull request Jul 15, 2024
armanbilge added a commit to armanbilge/sbt-typelevel that referenced this pull request Jul 15, 2024
armanbilge added a commit to armanbilge/sbt-typelevel that referenced this pull request Jul 15, 2024
lenguyenthanh added a commit to lenguyenthanh/scalac-options that referenced this pull request Jul 15, 2024
kind-project and other has lifted from experiment to stabilized in:
scala/scala3#20199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This PR cannot be merged until the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit which private/fork (-Y*) options should be lifted to one of the stable categories
5 participants