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

Make the project zio.cli.sbt/sbt-zio-cli publishable by default #209

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Make the project zio.cli.sbt/sbt-zio-cli publishable by default #209

merged 3 commits into from
Jun 20, 2023

Conversation

abcpro1
Copy link
Contributor

@abcpro1 abcpro1 commented Jun 17, 2023

closes #203.

The package zio.cli.sbt/sbt-zio-cli is not currently published in maven. Somebody (other than me) has to publish it.

This patch makes it such that sbt publish would include zio.cli.sbt/sbt-zio-cli by default. Otherwise, it can be published individually with sbt sbtZioCli/publish.

You can test this patch locally with sbt publishLocal, which would publish the artifacts to the folder ~/.ivy2/local/.

Regardless of this PR, someone with publishing credentials should publish this package.

/claim #203

@algora-pbc algora-pbc bot mentioned this pull request Jun 17, 2023
@@ -33,15 +33,16 @@ val zioVersion = "2.0.15"
lazy val root = project
.in(file("."))
.settings(
skip / publish := true,
publish / skip := true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reference: https://www.scala-sbt.org/1.x/docs/Publishing.html#Skip+publishing
The effect of this line is that sbt publish or sbt publishLocal would not generate an artifact named root, which it currently does.

build.sbt Outdated
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)
.aggregate(
zioCliJVM,
zioCliJS,
examplesJVM,
examplesJS,
docs
docs,
sbtZioCli,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes sbt publish or sbt publishLocal include the project sbtZioCli by default, which it currently doesn't.

@abcpro1
Copy link
Contributor Author

abcpro1 commented Jun 18, 2023

I have pushed a fix for the CI failures. Would you please trigger the CI jobs again.

The issue was that the CI jobs were testing each project against each Scala version from 2.12, 2.13, and 3, but the sbt plugin could only be compiled with Scala version 2.12, which is what sbt version 1.* is itself compiled with.

@pablf
Copy link
Member

pablf commented Jun 18, 2023

Locally, linting is failing (unrelated to this issue). I have fixed this in PR #208. After merging it, it should disappear, so maybe we should wait until merging #208.

@abcpro1
Copy link
Contributor Author

abcpro1 commented Jun 18, 2023

@pablf that's right, I didn't notice. Unless #208 is merged first, the CI is going to fail again.

@jdegoes
Copy link
Member

jdegoes commented Jun 19, 2023

@pablf Cab you fix conflicts? 🙏

Currently, `zio.cli.sbt/sbt-zio-cli` is not published in maven.
Upgrade dotty to 3.3.0 to match other zio packages.

Use `++version` instead of `++verison!` in the CI,
because the latter syntax forces a Scala version for all
subprojects ignoring the compatible versions declared in crossScalaVersions.

For example; `++3.3.0!` would force the sbt plugin to compile with
Scala version 3.3.0, while ++3.3.0 would recognize that the project
is incompatible with dotty and skip it.

It is crucial to only build the sbt plugin with Scala version 2.12,
which is what sbt 1 itself is built with.
To make the CI happy.
@abcpro1
Copy link
Contributor Author

abcpro1 commented Jun 19, 2023

@jdegoes the conflicts have been resolved.

@jdegoes jdegoes merged commit 0e0a3f0 into zio:master Jun 20, 2023
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.

SBT plugin can't be found
3 participants