Skip to content

regression: CrossVersion.patch not found during extraction #384

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

Closed
SethTisue opened this issue Nov 2, 2016 · 11 comments
Closed

regression: CrossVersion.patch not found during extraction #384

SethTisue opened this issue Nov 2, 2016 · 11 comments
Assignees

Comments

@SethTisue
Copy link
Member

SethTisue commented Nov 2, 2016

a few projects have started to use CrossVersion.patch which is new in sbt 0.13.13

the community build is on 0.13.13, so that shouldn't be a problem. but for some reason (source):

[macro-compat] --== Extracting dependencies for macro-compat ==--
[macro-compat] Fetching https://github.com/milessabin/macro-compat.git
[macro-compat] into /home/jenkins/workspace/scala-2.12.x-integrate-community-build/clones-0.9.5/b9a9eaa848d27c88ebd311b03d19ace9e0e0e6dc-macro-compat
[macro-compat] Took: 00h 00m 00.7s
[macro-compat] Cloning /home/jenkins/workspace/scala-2.12.x-integrate-community-build/clones-0.9.5/b9a9eaa848d27c88ebd311b03d19ace9e0e0e6dc-macro-compat
[macro-compat] to /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad
[macro-compat] Took: 00h 00m 00.0s
[macro-compat] Fetching /home/jenkins/workspace/scala-2.12.x-integrate-community-build/clones-0.9.5/b9a9eaa848d27c88ebd311b03d19ace9e0e0e6dc-macro-compat
[macro-compat] into /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad
[macro-compat] Took: 00h 00m 00.0s
[macro-compat] Commit: 4951217b26d2a41482fd6acbc51d97224bb6852e
[macro-compat] Extracting dependencies for: macro-compat
[macro-compat] Using Scala 2.12.1-de003f7-nightly during extraction.
[macro-compat] Using sbt version: 0.13.13
[macro-compat:error] OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=640m; support was removed in 8.0
[macro-compat] [info] Loading project definition from /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project/project
[macro-compat] [info] Updating {file:/home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project/project/}root-41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad-build-build...
[macro-compat] [info] Done updating.
[macro-compat:error] /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project/ÿÿÿÿÿÿÿÿÿÿ~~~~dbuild~defs.sbt:1: warning: `<<=` operator is deprecated. Use `key := { x.value }` or `key ~= (old => { newValue })`.
[macro-compat:error] See http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html
[macro-compat:error] onLoad in Global <<= (onLoad in Global) { previousOnLoad => previousOnLoad andThen { state => { com.typesafe.dbuild.plugin.DependencyAnalysis.printCmd(state,previousOnLoad) } }}
[macro-compat:error]                  ^
[macro-compat] [info] Loading project definition from /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project
[macro-compat] [info] Resetting onLoad... in one scope
[macro-compat] [info] Loading project definition from /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project
[macro-compat] [info] Dependencies among subprojects:
[macro-compat] [info] default-sbt-project -> 
[macro-compat] [info] Aggregates of subprojects:
[macro-compat] [info] default-sbt-project -> 
[macro-compat] [info] Building graph...
[macro-compat] [info] sorting...
[macro-compat] [info] These subprojects will be built: default-sbt-project
[macro-compat] [info] Updating {file:/home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/project/}root-41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad-build...
[macro-compat] [info] Done updating.
[macro-compat:error] /home/jenkins/workspace/scala-2.12.x-integrate-community-build/target-0.9.5/extraction/97f07d6e543581cf0cbb7a1a6aedaae3a87c854b/projects/41b2e4c6103d34771e4a2d979e5f5fb79c1c17ad/build.sbt:93: error: value patch is not a member of object sbt.CrossVersion
[macro-compat:error]     compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.patch)
[macro-compat:error]                                                                                ^
[macro-compat] sbt.compiler.EvalException: Type error in expression
[macro-compat] [error] sbt.compiler.EvalException: Type error in expression
[macro-compat] [error] Use 'last' for the full log.
[macro-compat] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
[macro-compat:error] java.lang.RuntimeException: 
[macro-compat:error] 	at scala.sys.package$.error(package.scala:27)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner.com$typesafe$dbuild$support$sbt$SbtRunner$$processCommand(SbtRunner.scala:91)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:72)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:72)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1.apply(SbtRunner.scala:72)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner$$anonfun$run$1.apply(SbtRunner.scala:63)
[macro-compat:error] 	at sbt.IO$.withTemporaryFile(IO.scala:311)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtRunner.run(SbtRunner.scala:63)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtExtractor$.extractMetaData(DependencyExtractor.scala:101)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtBuildSystem.extractDependencies(SbtBuildSystem.scala:79)
[macro-compat:error] 	at com.typesafe.dbuild.support.sbt.SbtBuildSystem.extractDependencies(SbtBuildSystem.scala:17)
[macro-compat] --== End Extracting dependencies for macro-compat ==--

this seems mystifying. it says [macro-compat] Using sbt version: 0.13.13. And we also see <<= operator is deprecated which deprecation didn't happen til 0.13.13, so that is additional evidence that 0.13.13 is being used. so how can we possibly be getting patch is not a member of object sbt.CrossVersion?

@SethTisue
Copy link
Member Author

@cunei @dwijnand any ideas?

@dwijnand
Copy link
Member

dwijnand commented Nov 2, 2016

At a guess I think this issue and the Resolver.binraryRepo issue are one and the same. Something funky with what's on the classpath is happening. I don't know what.

@SethTisue
Copy link
Member Author

the Resolver.binraryRepo issue

@dwijnand what issue is that?

@SethTisue SethTisue self-assigned this Nov 2, 2016
@dwijnand
Copy link
Member

dwijnand commented Nov 2, 2016

See #264 (comment)

@cunei
Copy link

cunei commented Nov 3, 2016

If I can I will investigate; I am hacking on dbuild right now, so I might as well do some debugging concerning this matter.

@cunei
Copy link

cunei commented Nov 3, 2016

I did some debugging, and I found that some sbt 0.13.0 jars end up on the classpath, dragged in by the dbuild plugin. During the metabuild resolution, sbt prints:

[info] Resolving org.scala-sbt#io;0.13.0 ...
[info] Resolving org.scala-sbt#control;0.13.0 ...
[...]
[info] Resolving org.scala-sbt#io;0.13.13 ...
[info] Resolving org.scala-sbt#control;0.13.13 ...

and in the end both end up on the classpath. It is a bit messy, I will have to study the situation for a bit.

cunei pushed a commit to cunei/dbuild that referenced this issue Nov 3, 2016
The dbuild plugins used to bring onto the classpath all sorts of
sbt libraries; the result was that multiple versions of the sbt
libraries would appear on the classpath, leading to bizarre
behaviour. The plugin will now use whatever sbt places on the
classpath, matching the sbt version in use.

In theory, this should fix scala/community-build#384 and may
help with sbt/sbt#1696
cunei pushed a commit to cunei/dbuild that referenced this issue Nov 3, 2016
The dbuild plugins used to bring onto the classpath all sorts of
sbt libraries; the result was that multiple versions of the sbt
libraries would appear on the classpath, leading to bizarre
behaviour. The plugin will now use whatever sbt places on the
classpath, matching the sbt version in use.

In theory, this should fix scala/community-build#384 and may
help with sbt/sbt#1696
@cunei
Copy link

cunei commented Nov 5, 2016

@SethTisue This should be fixed in 0.9.7-RC1, can you please try it?

@SethTisue
Copy link
Member Author

@cunei fantastic! I will try it soon

SethTisue added a commit to SethTisue/community-build that referenced this issue Nov 8, 2016
and see if it fixes the CrossVersion.patch issue,
scala#384
@SethTisue
Copy link
Member Author

SethTisue added a commit to SethTisue/community-build that referenced this issue Nov 8, 2016
and see if it fixes the CrossVersion.patch issue,
scala#384
SethTisue added a commit to SethTisue/community-build that referenced this issue Nov 8, 2016
and see if it fixes the CrossVersion.patch issue,
scala#384
SethTisue added a commit to SethTisue/community-build that referenced this issue Nov 8, 2016
and see if it fixes the CrossVersion.patch issue,
scala#384
@SethTisue
Copy link
Member Author

@cunei I did another run with sbt and sbt-republish removed from the build — dbuild gave a message about duplicate artifacts, probably due to the name/moduleName change. we don't need to be building sbt anyway. the new run (https://scala-ci.typesafe.com/view/scala-2.11.x/job/scala-2.11.x-integrate-community-build/383/consoleFull) succeeded except for a macro-paradise failure I don't think has to do with dbuild. so this is looking good

@SethTisue
Copy link
Member Author

as of #410 we are now using 0.9.7-RC1

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

3 participants