-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
feat: adding sonatype central support #3130
Conversation
@lihaoyi , could you take a look at this? A few open questions:
|
scalalib/src/mill/scalalib/publish/SonatypeCentralPublisher.scala
Outdated
Show resolved
Hide resolved
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.
Thank you for this contribution. We have a lot of other publishers, that currently reside as contrib plugins. Since your PR a) is rather new, b) touches a lot of heavily used and depend-on functionality which is c) rather proven and tested to work, I'd suggest to start this addition as a contrib module. So users can start to adopt this new API without compromizing existing setups.
That is also the best way to provide an alternative PublishModule
v2
, starting with the refactorings you mentioned applied to it. I haven't reviewed this PR in detail, but since you mentioned that you introduced cases classes, which themselves aren't ideal to maintain binary compatibility, I suggest to go with a contrib module for now.
If that's not what you want, I'd like to have some smaller change set, preserved binary compatibility, some docs describing how the new mechanism works and how it differs to the existing logic and some test coverage of the newly introduced functionality, if possible.
Please also keep in mind, that the current publish logic in PublishModule
is also used for remote repositorries other than Sonatype OSS / Maven Central, but for many local / company wide repositories like Nexus.
I've updated with requested changes and documentation. Before I go on to add tests, could you review and approve the current implementation? |
@lefou and @nightscape , just making sure this doesn't get lost. |
@lefou how would the separate |
@lefou ping 😉 |
@nightscape , |
I can't say much about |
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.
Thank you for this contribution. We have a lot of other publishers, that currently reside as contrib plugins. Since your PR a) is rather new, b) touches a lot of heavily used and depend-on functionality which is c) rather proven and tested to work, I'd suggest to start this addition as a contrib module. So users can start to adopt this new API without compromizing existing setups.
That is also the best way to provide an alternative
PublishModule
v2
, starting with the refactorings you mentioned applied to it. I haven't reviewed this PR in detail, but since you mentioned that you introduced cases classes, which themselves aren't ideal to maintain binary compatibility, I suggest to go with a contrib module for now.If that's not what you want, I'd like to have some smaller change set, preserved binary compatibility, some docs describing how the new mechanism works and how it differs to the existing logic and some test coverage of the newly introduced functionality, if possible.
Please also keep in mind, that the current publish logic in
PublishModule
is also used for remote repositorries other than Sonatype OSS / Maven Central, but for many local / company wide repositories like Nexus.
@lefou , this PR is ready to be reviewed. I have made all requested changes (e.g. this is now a contrib module, no changes to bincompat, removed case classes, etc). Could you explain why this PR was changed to draft with a reference to your previous comment? |
@Andrapyre I somehow missed, that you already changed to PR. Sorry for that. |
contrib/sonatypecentral/src/mill/contrib/sonatypecentral/SonatypeCentralPublishModule.scala
Outdated
Show resolved
Hide resolved
contrib/sonatypecentral/src/mill/contrib/sonatypecentral/SonatypeCentralPublishModule.scala
Outdated
Show resolved
Hide resolved
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.
Can you please update the PR description to reflect the current state?
Done. |
5813468
to
19d2131
Compare
19d2131
to
439682e
Compare
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.
We're almost there. One nit, otherwise 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.
Thank you for this contribution!
Description
This PR adds support for the new Sonatype Central publishing api, documented here and here. To use, ensure that your environment variables contain the appropriate credentials and configure your module like so in
build.sc
:New Dependencies
This PR introduces the following new dependency: