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

Update, extract & override scala versions for plugins #730

Merged
merged 2 commits into from Jan 10, 2018

Conversation

Projects
None yet
2 participants
@dwijnand
Contributor

dwijnand commented Jan 9, 2018

No description provided.

@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 9, 2018

Contributor

Hmm, why does this change cause the Scala 2.11.11 build to fail on this test?

X coursier.IvyXmlTests.no truncation 11ms 
  java.lang.NoClassDefFoundError: scala/Product$class
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
  java.lang.ClassNotFoundException: scala.Product$class
    java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
Tests: 1, Passed: 0, Failed: 1
[info] 
[error] Failed tests:
[error] 	coursier.IvyXmlTests
[error] (sbt-coursier/test:test) sbt.TestsFailedException: Tests unsuccessful
Contributor

dwijnand commented Jan 9, 2018

Hmm, why does this change cause the Scala 2.11.11 build to fail on this test?

X coursier.IvyXmlTests.no truncation 11ms 
  java.lang.NoClassDefFoundError: scala/Product$class
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
  java.lang.ClassNotFoundException: scala.Product$class
    java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
Tests: 1, Passed: 0, Failed: 1
[info] 
[error] Failed tests:
[error] 	coursier.IvyXmlTests
[error] (sbt-coursier/test:test) sbt.TestsFailedException: Tests unsuccessful
@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 9, 2018

Member

Yep, sbt ++2.11.12 sbt-coursier/test now fails.

I'm not too fond of the way the former sbt-doge handles things. It makes sbt ++2.11.12 … compile a few things… in 2.12…

Member

alexarchambault commented Jan 9, 2018

Yep, sbt ++2.11.12 sbt-coursier/test now fails.

I'm not too fond of the way the former sbt-doge handles things. It makes sbt ++2.11.12 … compile a few things… in 2.12…

@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 9, 2018

Contributor

Given there is no sbt for Scala 2.11 how can you even compile sbt-coursier?

Contributor

dwijnand commented Jan 9, 2018

Given there is no sbt for Scala 2.11 how can you even compile sbt-coursier?

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 9, 2018

Member

I don't want to, but I still expect sbt ++2.11.12 compile or sbt ++2.11.12 test to work fine (simply not compiling / testing anything for sbt-based projects).

Member

alexarchambault commented Jan 9, 2018

I don't want to, but I still expect sbt ++2.11.12 compile or sbt ++2.11.12 test to work fine (simply not compiling / testing anything for sbt-based projects).

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 9, 2018

Member

Ideally, the sbt-doge based stuff should just trap the projects with no matching scala versions in their crossScalaVersions, rather than e.g. compiling them in 2.12 when users do a sbt ++2.11.12 something

Member

alexarchambault commented Jan 9, 2018

Ideally, the sbt-doge based stuff should just trap the projects with no matching scala versions in their crossScalaVersions, rather than e.g. compiling them in 2.12 when users do a sbt ++2.11.12 something

@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 9, 2018

Contributor

That's exactly what should be happening.. I'll see what's going on in CI.

Contributor

dwijnand commented Jan 9, 2018

That's exactly what should be happening.. I'll see what's going on in CI.

@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 10, 2018

Contributor

@alexarchambault Do you know how I can reproduce the issue? From the build log it looks like it failed when running sbt ++2.11.11 jvm/test jvm/it:test. I can't get that to fail, and I also tried a bunch of variations:

++2.11.11 sbt-coursier/testOnly coursier.IvyXmlTests
++2.11.11 'sbt-coursier/testOnly coursier.IvyXmlTests'
sbt-coursier/testOnly coursier.IvyXmlTests
sbt-coursier/testOnly *IvyXmlTests
sbt-coursier/test

There must be something about the build I'm not getting.

Contributor

dwijnand commented Jan 10, 2018

@alexarchambault Do you know how I can reproduce the issue? From the build log it looks like it failed when running sbt ++2.11.11 jvm/test jvm/it:test. I can't get that to fail, and I also tried a bunch of variations:

++2.11.11 sbt-coursier/testOnly coursier.IvyXmlTests
++2.11.11 'sbt-coursier/testOnly coursier.IvyXmlTests'
sbt-coursier/testOnly coursier.IvyXmlTests
sbt-coursier/testOnly *IvyXmlTests
sbt-coursier/test

There must be something about the build I'm not getting.

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 10, 2018

Member

On 2bb1338, both sbt ++2.11.11 jvm/test and sbt ++2.11.11 sbt-coursier/test fail on my machine.

With

-------------------------------- Running Tests --------------------------------
X coursier.IvyXmlTests.no truncation 6ms
  java.lang.NoClassDefFoundError: scala/Product$class
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
  java.lang.ClassNotFoundException: scala.Product$class
    java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
Tests: 1, Passed: 0, Failed: 1
[info]
[error] Failed tests:
[error] 	coursier.IvyXmlTests
[error] (sbt-coursier/test:test) sbt.TestsFailedException: Tests unsuccessful
Member

alexarchambault commented Jan 10, 2018

On 2bb1338, both sbt ++2.11.11 jvm/test and sbt ++2.11.11 sbt-coursier/test fail on my machine.

With

-------------------------------- Running Tests --------------------------------
X coursier.IvyXmlTests.no truncation 6ms
  java.lang.NoClassDefFoundError: scala/Product$class
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
  java.lang.ClassNotFoundException: scala.Product$class
    java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    coursier.core.Info.<init>(Definitions.scala:119)
    coursier.core.Info$.<init>(Definitions.scala:134)
    coursier.core.Info$.<clinit>(Definitions.scala:-1)
    coursier.package$.<init>(package.scala:46)
    coursier.package$.<clinit>(package.scala:-1)
    coursier.IvyXmlTests$.$anonfun$tests$2(IvyXmlTests.scala:10)
Tests: 1, Passed: 0, Failed: 1
[info]
[error] Failed tests:
[error] 	coursier.IvyXmlTests
[error] (sbt-coursier/test:test) sbt.TestsFailedException: Tests unsuccessful
@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 10, 2018

Contributor

Yep that fails for me too.

I think I was confused with +. If you run +jvm/test or +sbt-coursier/test I think it should skip running sbt-coursier/test with 2.11.

The reason I wrote these changes is so I could use +sbt-plugins/compile while iterating on #731. That's now merged. So I'll try and recover something that works here so it can be merged.

Contributor

dwijnand commented Jan 10, 2018

Yep that fails for me too.

I think I was confused with +. If you run +jvm/test or +sbt-coursier/test I think it should skip running sbt-coursier/test with 2.11.

The reason I wrote these changes is so I could use +sbt-plugins/compile while iterating on #731. That's now merged. So I'll try and recover something that works here so it can be merged.

Only override crossScalaVersions in sbt-plugins
That way (hopefully) the current CI setup using ++ doesn't break. See #730
@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 10, 2018

Contributor

Green (on Travis CI)!

Contributor

dwijnand commented Jan 10, 2018

Green (on Travis CI)!

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 10, 2018

Member

Cool that this works!

Member

alexarchambault commented Jan 10, 2018

Cool that this works!

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 10, 2018

Member

Ah ok, it doesn't set crossScalaVersions for the individual sbt plugin projects…

Member

alexarchambault commented Jan 10, 2018

Ah ok, it doesn't set crossScalaVersions for the individual sbt plugin projects…

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Jan 10, 2018

Member

Merging, thanks!

Member

alexarchambault commented Jan 10, 2018

Merging, thanks!

@alexarchambault alexarchambault merged commit 70fa5f1 into coursier:master Jan 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dwijnand

This comment has been minimized.

Show comment
Hide comment
@dwijnand

dwijnand Jan 10, 2018

Contributor

Yeah, so +blah on the individual plugins might fail, but on sbt-plugins it'll still work, because sbt-plugins isn't aggregated on by jvm.

Contributor

dwijnand commented Jan 10, 2018

Yeah, so +blah on the individual plugins might fail, but on sbt-plugins it'll still work, because sbt-plugins isn't aggregated on by jvm.

@dwijnand dwijnand deleted the dwijnand:scala-versions branch Jan 10, 2018

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