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

Issues with 0.9.0 and Scalameta mdoc #305

Closed
jdegoes opened this issue Mar 15, 2019 · 9 comments
Closed

Issues with 0.9.0 and Scalameta mdoc #305

jdegoes opened this issue Mar 15, 2019 · 9 comments

Comments

@jdegoes
Copy link

jdegoes commented Mar 15, 2019

I think there's an issue with the way scalameta-mdoc is listed as a dependency. Upgrading to 0.9.0 caused several breakages, including:

  • sbt-explicit-dependencies failing the build because scalameta-mdoc is unused
  • publish failing on 2.13 because scalameta-mdoc has no such release
@rafaparadela
Copy link
Contributor

I'm taking a look at this later. Thanks @jdegoes

@jdegoes
Copy link
Author

jdegoes commented Mar 15, 2019

[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.scalameta#mdoc_2.13.0-M5;1.2.10: not found
[error] 	at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] 	at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] 	at 

And also:

https://travis-ci.org/scalaz/scalaz-zio/jobs/506929362

@rafaparadela Thank you for any help you can provide!

@jdegoes
Copy link
Author

jdegoes commented Mar 15, 2019

We needed to upgrade to 0.9.0 to fix a transitive issue with the Cats dependency (recently fixed, I believe).

@jdegoes
Copy link
Author

jdegoes commented Mar 15, 2019

More information:

  • skip in publish := true is set in the microsite project
  • microsite is the only project using the plug-in
  • Despite the above and also trying to exclude scalameta mdoc from transitive dependencies, publishLocal still fails due to unresolved dependency

@zakpatterson
Copy link

I think we're running into the same issue here, where our project fails to just compile on 2.13 -- not running mdoc:

build error: https://travis-ci.com/pauljamescleary/scala-pet-store/jobs/214042144#L411

@juanpedromoreno
Copy link
Member

We might need to wait until mdoc is cross-compiled with Scala 2.13: scalameta/mdoc#173

@olafurpg
Copy link

Scala 2.13 support in mdoc is being released right now by https://travis-ci.org/scalameta/mdoc/builds/576584631

However, until now it should already have been possible to upgrade a builds to 2.13 regardless of mdoc if you're OK with generating the docs only for 2.12.

When using sbt-mdoc, the org.scalameta:mdoc dependency is added as a regular library dependency to the enabled sbt project. For projects that generate docs only for 2.12, you should be able to avoid the resolution error by setting

lazy val docs = project.settings(
+  crossScalaVersions := List("2.12.8"),
  ...
).enablePlugin(MdocPlugin)

With this setup, you will still get a resolution error when running the following sequence of commands

> ++2.13.0
> test
// ERROR in docs/test

The following should work however

> ++2.13.0 test
// OK because docs/test is skipped because crossScalaVersions does not contain 2.13.0

When running sbt from CI, it's important to quote together ++2.13.0 and the command. For example sbt ++2.13.0 test will cause a resolution error while sbt "++2.13.0 test" should work OK.

@juanpedromoreno
Copy link
Member

Thanks @olafurpg , for such as amazing work on mdoc and the clarification on how to configure/run these docs artifacts :)

@juanpedromoreno
Copy link
Member

mdoc is now crossbuild for Scala 2.13.x. We can close this issue.

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

No branches or pull requests

5 participants