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

Build 0.8.4 for Scala 2.12 #338

Closed
wants to merge 8 commits into from
Closed

Build 0.8.4 for Scala 2.12 #338

wants to merge 8 commits into from

Conversation

ashawley
Copy link

@ashawley ashawley commented Nov 30, 2016

I see there is an effort to make a 0.9.0 release for Scala 2.12.

What about publishing a Scala 2.12 build of 0.8.4? I'm suggesting here it be released as 0.8.4-RC1, since it's un-tested. Because of circular dependencies with Dispatch, unfiltered-specs2 and unfiltered-scalatest are disabled.

To get the tests for Dispatch 0.11.2 to run against Scala 2.12, it requires a 0.8.4 build of unfiltered-netty-server for Scala 2.12.

Maybe there are other users of Unfiltered, besides Dispatch, who would appreciate an 0.8.4 build of 2.12, as well.

For what it's worth, if Dispatch is able to produce a source compatible build for Scala 2.12, then in return Unfiltered 0.8.4 will be closer to running its tests in Scala 2.12.

As pointed out in #319, there are test dependencies in Unfiltered against:

  • dispatch-core 0.11.0 and
  • dispatch-mime, dispatch-http and dispatch-oauth 0.8.10 ("dispatch-classic").

For now, those are ripped out in this branch. This branch doesn't need to be merged. It's a short-term hack. Once an Unfiltered build for 2.12 is pushed up, Dispatch could push a 2.12.0 build of 0.11.2.

$ sbt clean ++2.12.0 compile doc packageDoc packageSrc packageBin publish
[info] Loading global plugins from ~/.sbt/0.13/plugins
[info] Loading project definition from ./project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Updating {file:./project/}unfiltered-build...
[info] Done updating.
[info] Compiling 2 Scala sources to ./project/target/scala-2.10/sbt-0.13/classes...
[info] Set current project to Unfiltered (in build file:./)
[success] Total time: 1 s, completed Nov 30, 2016 2:59:39 PM
...
[success] Total time: 64 s, completed Nov 30, 2016 3:00:45 PM
...
[info] Main Scala API documentation successful.
[success] Total time: 27 s, completed Nov 30, 2016 3:01:13 PM
...
[info] Done packaging.
[success] Total time: 3 s, completed Nov 30, 2016 3:01:16 PM
...
[info] Done packaging.
[success] Total time: 0 s, completed Nov 30, 2016 3:01:16 PM
[info] Packaging ./target/scala-2.12/unfiltered_2.12-0.8.4-RC1.jar ...
[info] Done packaging.
[success] Total time: 1 s, completed Nov 30, 2016 3:01:17 PM
[info] Wrote ./util/target/scala-2.12/unfiltered-util_2.12-0.8.4-RC1.pom
[info] Wrote ./target/scala-2.12/unfiltered_2.12-0.8.4-RC1.pom
[info] :: delivering :: net.databinder#unfiltered-util_2.12;0.8.4-RC1 :: 0.8.4-RC1 :: release :: Wed Nov 30 15:01:18 EST 2016
...
[error] Unable to find credentials for [Sonatype Nexus Repository Manager @ oss.sonatype.org].
...
[error] (unfiltered-all/*:publish) java.io.IOException: Access to URL https://oss.sonatype.org/service/local/staging/deploy/maven2/net/databinder/unfiltered_2.12/0.8.4-RC1/unfiltered_2.12-0.8.4-RC1.pom was refused by the server: Unauthorized
...
[error] Total time: 5 s, completed Nov 30, 2016 3:01:22 PM

Copy link
Member

@xuwei-k xuwei-k left a comment

Choose a reason for hiding this comment

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

https://travis-ci.org/unfiltered/unfiltered/builds/180232226

[info] Set current project to Unfiltered (in build file:/home/travis/build/unfiltered/unfiltered/)
[warn] 	module not found: org.scalaz.stream#scalaz-stream_2.10;0.5a
[warn] ==== local: tried
[warn]   /home/travis/.ivy2/local/org.scalaz.stream/scalaz-stream_2.10/0.5a/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/scalaz/stream/scalaz-stream_2.10/0.5a/scalaz-stream_2.10-0.5a.pom
[warn] ==== sonatype releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/org/scalaz/stream/scalaz-stream_2.10/0.5a/scalaz-stream_2.10-0.5a.pom
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: org.scalaz.stream#scalaz-stream_2.10;0.5a: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.scalaz.stream#scalaz-stream_2.10;0.5a: not found
	at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
	at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
	at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)

https://travis-ci.org/unfiltered/unfiltered/builds/180232226#L389https://travis-ci.org/unfiltered/unfiltered/builds/180232226#L389

I think should be change .travis.yml


val settings: Seq[Setting[_]] = Defaults.coreDefaultSettings ++ Seq(
organization := "net.databinder",

version := "0.8.4",
version := "0.8.4-RC1",
Copy link
Member

Choose a reason for hiding this comment

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

0.8.4 already released http://repo1.maven.org/maven2/net/databinder/unfiltered-filter_2.11/0.8.4/ but missing tag #334
I think next version should not "0.8.4-RC1".

Copy link
Author

Choose a reason for hiding this comment

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

Building a Scala 2.12 for 0.8.4 should definitely be a release candidate, for now, since the test suite can't be run in Scala 2.12. A 0.8.4-RC1 will still be useful.

@ashawley
Copy link
Author

ashawley commented Dec 1, 2016

I think should be change .travis.yml

Even if I fixed the .travis.yml file, the tests will fail because of the circular dependency problem between unfiltered 0.8.4 and dispatch 0.11.2.

That's why publishing 0.8.4 as RC1 is necessary, until the test suite works again.

@ashawley
Copy link
Author

ashawley commented Dec 1, 2016

I update .travis.yml. You'll see that the compilation fails for the scalatest and spec2 projects.

@ashawley
Copy link
Author

ashawley commented Dec 1, 2016

The other reason it should 0.8.4-RC1 is because the projects unfiltered-specs2 and unfiltered-scalatest are disabled and will not be published.

@hamnis
Copy link
Contributor

hamnis commented Dec 1, 2016

I am sceptical on publishing without having tests.

@ashawley
Copy link
Author

ashawley commented Dec 1, 2016

I am sceptical on publishing without having tests.

Agreed, thus the proposal to make it RC1.

@omarkilani
Copy link
Contributor

All the work to make unfiltered run on 2.12.0 is already happening on the 0.9.0 branch and is a significant effort. We're still working on it.

So this PR with everything ripped out and without tests seems like a duplication of effort. Why can't people switch to 0.9.0 when it's released?

Keep in mind that any releases on the 0.8.x branch most probably can't be published under the net.databinder maven group ID, so anyone looking to upgrade to scala 2.12 will need to come back and seek out the new details anyway. At which point they may as well bump the version in their build.sbt to 0.9.0.

Maybe I'm missing something...?

@ashawley
Copy link
Author

ashawley commented Dec 1, 2016

Yes, I'm aware of the work on getting 0.9.0 released and making it build for 2.12 (and 2.11 and 2.10). My request is just about getting a 2.12 build for 0.8.4. Version 0.8.4 was a long-standing release of the package, and it appears it compiles in 2.12 without modification (test is indeed another matter). The build I'm suggesting for 0.8.4 is orthogonal to the important work of maintaining this library in the long-term.

That would be disappointing if the artifacts can't be published under net.databinder. However, I hope people understand the a build for 0.8.4, even as an unofficial RC1, could be useful for understanding the consequences of Scala 2.12 for downstream libraries.

I'm suggesting it is important to build 0.8.4 for 2.12 for at the very least Dispatch's benefit of studying it's tests. I don't have any statistics, but perhaps there are other users of Unfiltered that could benefit from 0.8.4-RC for their Scala 2.12 upgrades, as well.

@omarkilani
Copy link
Contributor

I thought about this some more, and I'm still having trouble with it.

The entire point of the 0.9.0 branch is that it runs on Scala 2.12. All the changes we made there would be required on the 0.8 branch, because we can't publish something without tests.

Then what's the difference between branches? A couple of library versions maybe (netty 4.0 vs 4.1). In addition to that, I don't know about the other folks but I personally have no interest in maintaining the old branch. There's no downside for users to switch to 0.9.0 and only upside IMHO.

We also can't publish to 'net.databinder'. So there's no way for this to "just work" for existing users who just want to go up to 2.12. They have to switch to the new group ID 'ws.unfiltered' anyway. And if they're doing that, they should be using 0.9.0.

For the above reasons, I'm going to -1 this PR. But it's not up to me.

@ashawley
Copy link
Author

ashawley commented Dec 7, 2016

I'll look at the 0.9.0 release.

Again, I'm just trying to get old projects that depend on Dispatch and Unfiltered between Scala versions to cross-compile with Scala 2.12.

We also can't publish to 'net.databinder'.

Sorry to hear that. Sounds like a friendly fork then. Guess that should have just been done a long time ago. I guess the 2.12 release of Scala was the catalyst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants