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

Scala 2.13.12 release notes draft #850

Closed
wants to merge 6 commits into from

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Aug 23, 2023

rendered

feedback encouraged

no suggestion too small

let's make this as clear and helpful as it can be

releases/2.13.12.md Outdated Show resolved Hide resolved
SethTisue and others added 2 commits August 23, 2023 19:34
Co-authored-by: kenji yoshida <6b656e6a69@gmail.com>
@som-snytt
Copy link

As there is no nit too picky, the git query does not account for co-authorship, which I believe counts for unit contribution and not 0.5. This more correct accounting vaults Georgi in front of Nicolas, in alphabetical suborder.

Lukas also shares a co-authorship credit, but it seems a couple of his PRs are sponsored, so I'm not sure how that adds up. I think it means Lukas takes every one out for biers?

releases/2.13.12.md Outdated Show resolved Hide resolved
@SethTisue
Copy link
Member Author

the git query does not account for co-authorship

@som-snytt hmm... yeah, that's not ideal. I would use a more correct automated method if one existed, but I don't think I'm sufficiently motivated to build one myself.

@SethTisue SethTisue closed this Sep 11, 2023
@SethTisue
Copy link
Member Author

this is now live at https://github.com/scala/scala/releases/tag/v2.13.12

It's not too late to make further edits — feel free to continue commenting here.

@som-snytt
Copy link

per discussion on discord chat, perhaps the item on scala3-migration noise deserves a note that changes in behavior were made noisier, and that it's expected to -Wconf:cat=scala3-migration:s in some form.

My first comment was that for override inference, Scala 3 style is desirable, but is not backward-compatible. The user should be aware of the difference; the desirable action is to make the old inferred type explicit (for compatibility) or adjust the warning, if the new behavior is acceptable.

scala 2.13.12> trait T { def f: Option[Int] }
trait T

scala 2.13.12> class C extends T { def f = None }
                                       ^
               error: under -Xsource:3, inferred Option[Int] instead of None.type [quickfixable]
               Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
               Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=C.f

scala 2.13.12> :replay -Wconf:cat=scala3-migration:w
replay> trait T { def f: Option[Int] }
trait T


scala 2.13.12> class C extends T { def f = None }
                                       ^
               warning: under -Xsource:3, inferred Option[Int] instead of None.type [quickfixable]
class C

The other example in chat was the access modifiers on case class methods when the constructor is private.

scala 2.13.12> case class C private (c: String)
                          ^
               error: constructor modifiers are assumed by synthetic `copy` method
               Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
               Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=C

scala 2.13.12> :replay -Wconf:cat=scala3-migration:w
Nothing to replay.

scala 2.13.12> case class C private (c: String)
                          ^
               warning: constructor modifiers are assumed by synthetic `copy` method
                          ^
               warning: constructor modifiers are assumed by synthetic `apply` method
class C

If it's desirable to keep the old access, it would be necessary to write the methods by hand.

It would be nice to have these use cases in the release notes.

Example -Xsource:3 which does not make noise:

scala 2.13.12> import collection.*
import collection._

@SethTisue
Copy link
Member Author

@som-snytt maybe you and I could work together (not this week) on documenting -Xsource:3 properly. maybe with three lists: enabled behaviors, modified behaviors, disabled/discouraged/deprecated behaviors... something like that. and a good introductory text that explains what the flag is and why, and include any useful usage advice about -Xmigration and -Wconf and so on.

In the meantime, though, if you have any suggested edits to the release notes themselves, feel free to go ahead and make them. but let's not add too much. or if we do find we've added too much, let's have a goal of moving it to a more permanent location.

@SethTisue
Copy link
Member Author

SethTisue commented Sep 12, 2023

@som-snytt oh, I guess the broader topic of documenting -Xsource:3 should continue on #470

@SethTisue
Copy link
Member Author

SethTisue commented Sep 19, 2023

@som-snytt the release notes now have:

  • Emit migration warnings under -Xsource:3 as fatal warnings, not errors (#10439 by @som-snytt, #10511)
    • -Xmigration will demote the errors to warnings
    • -Wconf:cat=scala3-migration:s will silence these errors/warnings altogether

I remain interested in properly documenting -Xsource:3 (but not this week or next).

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.

None yet

4 participants