Skip to content

chore: filter allowed source versions by import and by settings #23215

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 2 commits into from
May 21, 2025

Conversation

hamzaremmal
Copy link
Member

Closes #23214

We also split the logic to handle illegal imports separately as in #23082, we want to authorise 2.13 in imports but not in the settings

@@ -8,7 +8,8 @@ import Feature.isPreviewEnabled
import util.Property

enum SourceVersion:
case `3.0-migration`, `3.0`, `3.1` // Note: do not add `3.1-migration` here, 3.1 is the same language as 3.0.
case `3.0-migration`, `3.0`
case `3.1-migration`, `3.1`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add this object so that we can refer to it when making illegal. It is also added for consistency

@hamzaremmal hamzaremmal enabled auto-merge May 21, 2025 09:58
@hamzaremmal hamzaremmal merged commit 52b26f8 into scala:main May 21, 2025
28 checks passed
@hamzaremmal hamzaremmal deleted the remove-illegal-source-input branch May 21, 2025 11:23
@hamzaremmal hamzaremmal added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label May 21, 2025
@WojciechMazur WojciechMazur added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels May 21, 2025
WojciechMazur added a commit that referenced this pull request May 22, 2025
…ings" to 3.7.1 (#23231)

Backports #23215 to the 3.7.1-RC2.

PR submitted by the release tooling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

never is accepted in -source settings
2 participants