-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Omit the suffix in artifactName for cross modules #953
Conversation
1a27f83
to
c01d70f
Compare
I have no idea if that will work, but I'm excited! Thanks for looking into this @joan38. :-) |
c01d70f
to
199e757
Compare
199e757
to
585f666
Compare
I'd like to see a test case covering (and documenting) the expected outcome. |
I'm a bit reluctant to do this, due to silently changing the existing behavior. OTOH if the existing behavior is confusing enough, then perhaps it's worth breaking. @joan38 perhaps you could flesh out the description a bit so someone looking at this PR can understand the issue without any external context? |
585f666
to
387423d
Compare
I think this looks good to me |
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.
Looks good to me.
I just wanted to mention, that at first I struggled with the idea, because in cross-compiling scenarios outside of Scala modules the current behaviour (appending the cross-parameter to the artifact name) might be more appropriate. Later I realized, that CrossModuleBase
is only used for CrossScalaModule
and CrossSbtModule
, so yes, this PR makes lots of sense, as it should not affect other modules created with Cross[T]
.
Thanks, @joan38 ! |
Make sense, thanks! |
Users of mill (including me) struggle with publishing artifacts as soon as they start cross compiling between multiple Scala versions.
By default it will publish
Artifact(org,myproject-2.12.10_2.12,0.0.1-SNAPSHOT)
where we expect something likeArtifact(org,myproject_2.12,0.0.1-SNAPSHOT)
.Here is an example: https://gitter.im/lihaoyi/mill?at=5f404a975580fa092b15a821
The usual fix is to override the
artifactName
as follows:I personally get caught every time I start to cross compile a project and believe that doesn't look reasonable to ask the user to course correct the artifact name.
This proposal removes the added segment part in
artifactName
forCrossModuleBase
.cc @davesmith00000