-
Notifications
You must be signed in to change notification settings - Fork 949
Add support for wildcards in Scala version switch (fuzzy switch) #6894
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
Conversation
@raboof I am thinking about wrapping up 1.7.0 soon. |
3198cab
to
b4b0e5f
Compare
Thanks for the ping, added tests (and fixed behavior), now ready for review. |
(rebased on |
257b333
to
ee83457
Compare
Picking from the `crossScalaVersions` As discussed in sbt#6893
1.7.x branch would be better but either is ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good to me.
this is awesome. I love it! a small suggestion. the output is:
but it doesn't tell me which version it actually selected; I'd prefer not to have to |
Suggested by @SethTisue in sbt#6894 (comment) Will show multiple lines when different versions are selected for different subprojects. When no subprojects have a matching Scala version you will get a 'Switch failed' exception anyway, so in that case there is no change in behavior.
This adds the ability to use semantic version selector expression (such as
2.13.x
and3.x
) in++
command as discussed in #6893. The following description includes the patch in #6936.Usage
Explanation
This is an extension of existing
++ <sv> <command1>
where the given<command1>
will be executed only within the subprojects listing<sv>
in their respectivecrossScalaVersions
setting.sbt 1.7.0 now allows the
<sv>
part to be a semantic version selector expression, implemented originally by @tanishiking in sbt/librarymanagement#239 based on npm-semver. Note that the semantic version selector expression may match at most one Scala version withincrossScalaVersions
per subproject. This is because++
remains to be a switch command.