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

[1.2.x] on Scala 2.11 scala-parser-combinators 1.1.2 on test requires forking #4609

Closed
eed3si9n opened this issue Apr 7, 2019 · 3 comments · Fixed by #4671
Closed

[1.2.x] on Scala 2.11 scala-parser-combinators 1.1.2 on test requires forking #4609

eed3si9n opened this issue Apr 7, 2019 · 3 comments · Fixed by #4671
Assignees
Milestone

Comments

@eed3si9n
Copy link
Member

eed3si9n commented Apr 7, 2019

Reported originally by @Philippus as scala/scala-parser-combinators#197

steps

Philippus/bump#8

problem

Philippus/bump#8 fails with the following exception in scala 2.11:

SemVer.nextStable removes pre-release information if available: Exception raised on property evaluation.
[info] > Exception: java.lang.AbstractMethodError: nl.gn0s1s.bump.SemVerParser$.scala$util$parsing$combinator$Parsers$$lastNoSuccessVar()Lscala/util/DynamicVariable;

expectation

No failure.

workarond

Test / fork := true

notes

This is a variation of
#3405
scala/scala-xml#195
sbt/zinc#505

@eed3si9n
Copy link
Member Author

eed3si9n commented Apr 7, 2019

So basically sbt/zinc#505 fixed the bug for run

   def makeLoader(classpath: Seq[File], instance: ScalaInstance): ClassLoader =
-    filterByClasspath(classpath, makeLoader(classpath, instance.loader, instance))
+    filterByClasspath(classpath, makeLoader(classpath, instance.loaderLibraryOnly, instance))

but didn't for test it seems.

https://github.com/sbt/sbt/blob/v1.2.8/testing/src/main/scala/sbt/TestFramework.scala#L258

    val dual = new DualLoader(
      scalaInstance.loader,

@SethTisue
Copy link
Member

SethTisue commented Apr 7, 2019

/cc @ashawley, since scala-xml is affected as well (on 2.11 and 2.12)

@eed3si9n
Copy link
Member Author

@eatkins We still have this problem because ScalaInstance loader for Scala 2.11 probably is bringing in parser combinator - http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.12/scala-compiler-2.11.12.pom
I think the bottom layer needs to be a Scala Library only loader.

eed3si9n added a commit to eed3si9n/sbt that referenced this issue May 13, 2019
Fixes sbt#4609

ScalaInstance contains unwanted Scala modules such as scala-xml and scala-parser-combinators.
eed3si9n added a commit to eed3si9n/sbt that referenced this issue May 13, 2019
Fixes sbt#4609

ScalaInstance contains unwanted Scala modules such as scala-xml and scala-parser-combinators.
@eed3si9n eed3si9n self-assigned this May 13, 2019
eed3si9n added a commit to eed3si9n/sbt that referenced this issue May 13, 2019
allJars contains unwanted Scala modules.
Having this in prevents the flat classloader from working correctly.

Ref sbt#4609
octonato added a commit to octonato/scalatestplus-play that referenced this issue Jun 20, 2019
mergify bot pushed a commit to playframework/scalatestplus-play that referenced this issue Jun 20, 2019
* Support for Play 2.7.3

* Forking on Test for 2.11 build

See sbt/sbt#4609
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants