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

Restore community build's stability #66

Merged
merged 2 commits into from
Oct 22, 2014

Conversation

gkossakowski
Copy link
Member

The #63 was a bit too eager on cleanups which broke community build.

This PR restores build's stability by:

  • switching back to our old fork of spray (see 7c9fba8 for details)
  • adding support for new twirl that has been moved to Play (see 0a496fd for details)

Both v1.3.2 and v1.3.1_2.11 tags do not work in dbuild. The v1.3.2 simply
does not compile and v1.3.1_2.11 fails with:

[spray] [info] Set current project to root (in build file:/localhome/jenkinsdbuild/workspace/Community-2.11.x-manual/target-0.9.1/extraction/42c7d5e0770e5f0c15aa65f4d40f6c82f122f9db/projects/9966dc2563823ca6d7afd5dc3a57f02301fa4288/)
[spray] [info] Setting extraction Scala version to 2.11.2 in 31 scopes
[spray] [info] Resetting onLoad... in one scope
[spray] java.util.NoSuchElementException: None.get
[spray] 	at scala.None$.get(Option.scala:313)
[spray] 	at scala.None$.get(Option.scala:311)
[spray] 	at com.earldouglas.xsbtwebplugin.Container.com$earldouglas$xsbtwebplugin$Container$$stateToRunner(Container.scala:25)
[spray] 	at com.earldouglas.xsbtwebplugin.Container$$anonfun$containerSettings$5$$anonfun$apply$2.apply(Container.scala:58)
[spray] 	at com.earldouglas.xsbtwebplugin.Container$$anonfun$containerSettings$5$$anonfun$apply$2.apply(Container.scala:57)
[spray] 	at sbt.Project$.runUnloadHooks(Project.scala:282)
[spray] 	at sbt.Project$.setProject(Project.scala:286)
Latest version of Play depends on a new twirl that has been moved to
Play organization on GitHub. That version doesn't build in dbuild due to
pattern matching on scalaBinaryVersion, see playframework/twirl#45 and
lightbend-labs/dbuild#145 for details. For that reason, we are building Play's
Twirl from a head of PR which includes workaround for scalaBinaryVersion
problem.

However, we can't switch over to Play's Twirl altogether just yet. The
reason is that spray fork depends on old twirl.

The good news is that Spray's and Play's Twirl do not share group ids so
we can just build both of them and they'll be picked up by projects that
need them. That's what we are doing here.
@gkossakowski
Copy link
Member Author

Patches has been (already) verified here: https://jenkins-dbuild.typesafe.com:8499/job/Community-2.11.x-manual/71/console
Review by @lrytz or @adriaanm.

@jrudolph
Copy link
Member

Is there anything we can do about it? What do you mean exactly with "v1.3.2 simply
does not compile"?

/cc @sirthias

@gkossakowski
Copy link
Member Author

Hi @jrudolph! We would definitively use some help. I've got the following failure after switching to v1.3.2:

[spray] [info] Compiling 52 Scala sources to /localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/project-builds/spray-3f191f12b88a2b0ac7926203f7adec02668f6960/spray-routing/target/scala-2.11.3-dbuildxd592d1fd369351293c82c2f2aab778692e1c105e/classes...
[spray] [error] /localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/project-builds/spray-3f191f12b88a2b0ac7926203f7adec02668f6960/spray-routing/src/main/scala/spray/routing/Prepender.scala:35: not found: type PrependAux
[spray] [error]   implicit def apply[P <: HList, S <: HList, Out0 <: HList](implicit prepend: PrependAux[P, S, Out0]) =
[spray] [error]                                                                               ^
[spray] [error] /localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/project-builds/spray-3f191f12b88a2b0ac7926203f7adec02668f6960/spray-routing/src/main/scala/spray/routing/Prepender.scala:35: not found: type PrependAux
[spray] [error]   implicit def apply[P <: HList, S <: HList, Out0 <: HList](implicit prepend: PrependAux[P, S, Out0]) =
[spray] [error]                                                                               ^
[spray] [error] /localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/project-builds/spray-3f191f12b88a2b0ac7926203f7adec02668f6960/spray-routing/src/main/scala/spray/routing/Directive.scala:62: type mismatch;
[spray] [error]  found   : spray.routing.Directive[R]
[spray] [error]  required: spray.routing.ConjunctionMagnet[shapeless.HNil]
[spray] [error]     recover(rejections ⇒ directives.BasicDirectives.mapRejections(rejections ::: _) & that)
[spray] [error] /localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/project-builds/spray-3f191f12b88a2b0ac7926203f7adec02668f6960/spray-routing/src/main/scala/spray/routing/Directive.scala:62: type mismatch;
[spray] [error]  found   : spray.routing.Directive[R]
[spray] [error]  required: spray.routing.ConjunctionMagnet[shapeless.HNil]

I didn't investigate further because I ran out of time I was supposed to spend on community build maintenance. Any help would be very welcome!

@jrudolph
Copy link
Member

I think this failure is because in the latest version we build the shapeless 1 and shapeless 2 versions mostly from the same build and sources. If the community-build only supports shapeless 2, you need to switch off building the spray-routing and spray-routing-tests subprojects and build the spray-routing-shapeless2 and spray-routing-shapeless2-tests subprojects instead.

@jrudolph
Copy link
Member

The other failure seems to happen because of an outdated or incompatible version of the xsbt-web-plugin for the old v1.3.1-2.11 version (but I don't know how this is triggered by dbuild) so I think the solution sketched above would be the right one.

@jrudolph
Copy link
Member

And btw: the most important contribution that spray could have for the community build would be in compiling the tests (which currently seem to be switched off). Otherwise, all the pretty advanced type machinery that probably depends on type inference etc. isn't really well covered.

@lrytz
Copy link
Member

lrytz commented Oct 22, 2014

LGTM!

gkossakowski added a commit that referenced this pull request Oct 22, 2014
Restore community build's stability
@gkossakowski gkossakowski merged commit ea90eff into scala:master Oct 22, 2014
@gkossakowski gkossakowski deleted the cleanups branch October 22, 2014 14:27
@gkossakowski gkossakowski mentioned this pull request Oct 23, 2014
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.

None yet

3 participants