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

Document features conditional on source and target versions #470

Open
adriaanm opened this issue Feb 1, 2018 · 8 comments
Open

Document features conditional on source and target versions #470

adriaanm opened this issue Feb 1, 2018 · 8 comments
Assignees

Comments

@adriaanm
Copy link
Contributor

adriaanm commented Feb 1, 2018

-Xsource:2.13

@SethTisue
Copy link
Member

this is for 2.12? where would such documentation go?

@eed3si9n
Copy link
Member

eed3si9n commented Mar 1, 2018

Related sbt/sbt#3123

If there were command line entry point that lists out list of flags, -Xsource manuals, latest book recommendations by Scala team, I'd love to surface them as an sbt task scalaHelp.

@SethTisue
Copy link
Member

we now have a place to put this stuff: scala/docs.scala-lang#1058

@dwijnand dwijnand added this to the Backlog milestone Oct 29, 2020
@SethTisue
Copy link
Member

nowadays, this would be about -Xsource:3.0 instead

@som-snytt
Copy link

I don't know about documenting, but I meant to add 3 to the migration guide. I'm pretty sure it's underused, because otherwise people would be complaining about it. It has, for instance, "infix on the next line." I wish 2.13 were compiled with it.

@SethTisue SethTisue self-assigned this Oct 22, 2021
@SethTisue SethTisue modified the milestones: Backlog, 2.13.7 Oct 22, 2021
@SethTisue
Copy link
Member

and nowadays it's -Xsource:3 and people are actually using it prepare to migrate to 3, so it's reeeeeallly time now

@SethTisue SethTisue modified the milestones: 2.13.7, 2.13.8 Oct 28, 2021
@SethTisue SethTisue modified the milestones: 2.13.8, 2.13.9 Dec 7, 2021
@SethTisue
Copy link
Member

SethTisue commented Jan 19, 2022

It would also be good to document what effect -target has on generated bytecode. (I've updated the issue title accordingly.)

For the most part it just sets the bytecode version number, but I know of one PR where it actually affects code generation, namely: scala/scala#9556 ("Use StringConcatFactory for string concatenation on JDK 9+")

I didn't find anything else like that when prepping through the compiler code, but it's conceivable I missed something.

@SethTisue SethTisue changed the title Document features conditional on source version Document features conditional on source and target versions Jan 19, 2022
@SethTisue SethTisue removed this from the 2.13.9 milestone Sep 1, 2022
@SethTisue
Copy link
Member

The pressure to document -Xsource:3 properly is increasing, as seen on e.g. #850 (discussion about 2.13.12 release notes). We've seen in the community build that more and more OSS projects are leaving -Xsource:3 enabled in their builds, and each successive recent 2.13.x release has added additional behavior to it.

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

No branches or pull requests

5 participants