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

Publish Scala.js 1.0.0-M8 artifact for 2.12 #496

Closed
ashawley opened this issue Aug 7, 2019 · 9 comments
Closed

Publish Scala.js 1.0.0-M8 artifact for 2.12 #496

ashawley opened this issue Aug 7, 2019 · 9 comments

Comments

@ashawley
Copy link
Contributor

ashawley commented Aug 7, 2019

Hey Erik,

The point of #475 and #482 was to make it possible to publish 1.0.0-M8 artifacts for ScalaCheck 1.14.0. However, it seems Rickard forgot about 2.12, and only published it for 2.13.

https://mvnrepository.com/artifact/org.scalacheck/scalacheck

If you got the keys to publish to Sonatype from Rickard, maybe this would be a good test for them? This would help downstream libraries that need to cross-compile to Scala.js.

You'd need to check out the 1.14.0_sonatype branch, and then:

$ env SCALAJS_VERSION=1.0.0-M8 sbt
> ++2.12.6
> js/publishSigned
@ashawley ashawley changed the title Publish Scala.js 1.0.0-M8 for 2.12 Publish Scala.js 1.0.0-M8 artifact for 2.12 Aug 7, 2019
@non
Copy link
Contributor

non commented Aug 7, 2019

@ashawley I'll give it a shot after work today.

@non
Copy link
Contributor

non commented Aug 7, 2019

@ashawley I guess the problem here is that SBT (and sbt-release) makes it easy to cross-compile (and cross-publish) for many Scala versions, but there isn't any machinery to cross-publish across several plugin versions (e.g. ScalaJS 0.6.28 and 1.0.0-M8). Is that right?

In the long run I'd really rather fix the build so I can use a single release command to publish for all versions. I'm not sure if there's a better way -- I guess everyone trying to publish for ScalaJS 1.0.0-M8 is doing this?

@ashawley
Copy link
Contributor Author

ashawley commented Aug 7, 2019

I am not an expert, but I believe it's that way with Scala.js because Scala.js works as an sbt plugin, so it's not possible to run a command in sbt that does both versions: It requires reloading/re-opening sbt to refresh the plugin version.

@non
Copy link
Contributor

non commented Aug 8, 2019

Published:

https://oss.sonatype.org/#nexus-search;quick~scalacheck_sjs1.0.0-M8_2.12

Should show up on Maven Central soon.

@non non closed this as completed Aug 8, 2019
@ashawley
Copy link
Contributor Author

ashawley commented Aug 8, 2019

It pulled down, but I got a strange error:

[error] org.scalajs.ir.IRVersionNotSupportedException: Failed to deserialize a file 
compiled with Scala.js 0.6.17 (supported: 1.0.0-M8): ~/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scalacheck/scalacheck_sjs1.0.0-M8_2.12/1.14.0/scalacheck_sjs1.0.0-M8_2.12-1.14.0.jar:org/scalacheck/GenArities$$anon$37$$anon$38$$anon$39$$anon$40$$anon$41$$anon$42$$anon$43.sjsir

I'm not sure what that's about. I've never seen it before, but I don't do a lot with Scala.js. I thought it was something local, but confirmed it in Travis, as well.

@non
Copy link
Contributor

non commented Aug 8, 2019

@ashawley Uh oh.

@non non reopened this Aug 8, 2019
@non
Copy link
Contributor

non commented Aug 8, 2019

What's the compiled with Scala.js 0.6.17 about? Is your project using 1.0.0-M8? That's the version I used when I published, so I'm not sure where that old ScalaJS version is coming from.

If your project is 0.6.17 then I'm not sure it's guaranteed to work.

@ashawley
Copy link
Contributor Author

ashawley commented Aug 8, 2019

If the Scala.js plugin is set to version 1.0.0-M8, then it's going to choose the 1.0.0-M8 artifact to pull down...

@ashawley
Copy link
Contributor Author

This turned out to be caused by failing to run clean between publishing Scalajs targets.

The artifacts for 1.0.0-M8 were fixed in ScalaCheck 1.14.1.

Seems like this should be added to the Scala.js FAQ or this page https://www.scala-js.org/doc/project/linking-errors.html although I am not an expert.

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

2 participants