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 Scala 2 version of case classes that can evolve #2760

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

julienrf
Copy link
Contributor

The same approach as with Scala 3 also works with Scala 2 if you add the -Xsource:3 compiler option.

The same approach as with Scala 3 also works with Scala 2 if you add the `-Xsource:3` compiler option.
@julienrf julienrf force-pushed the cross-compile-data-classes branch from 9dca98b to cbe8a45 Compare March 30, 2023 15:07
@julienrf julienrf requested a review from bishabosha March 31, 2023 06:39
@bishabosha bishabosha merged commit 864d1a5 into scala:main Mar 31, 2023
@sjrd sjrd deleted the cross-compile-data-classes branch March 31, 2023 12:10
@sideeffffect
Copy link
Contributor

sideeffffect commented May 3, 2023

Just to be clear, with -Xsource:3 and case class constructor private, both copy (in class) and apply (in companion) are private too?

@julienrf
Copy link
Contributor Author

julienrf commented May 5, 2023

Just to be clear, with -Xsource:3 and case class constructor private, both copy (in class) and apply (in companion) are private too?

Yes.

@sideeffffect
Copy link
Contributor

But to be super duper clear, that means that adding -Xsource:3 is a breaking change (assuming the project in question is using case classes), right?

@julienrf
Copy link
Contributor Author

julienrf commented May 8, 2023

Indeed.

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