Skip to content

NoSuchMethodError with Scala 2.12.13 #305

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
larsrh opened this issue Jan 16, 2021 · 23 comments · Fixed by #308
Closed

NoSuchMethodError with Scala 2.12.13 #305

larsrh opened this issue Jan 16, 2021 · 23 comments · Fixed by #308

Comments

@larsrh
Copy link

larsrh commented Jan 16, 2021

[error] ## Exception when compiling 19 sources to /home/travis/build/typelevel/cats-collections/core/.jvm/target/scala-2.12/classes

[error] java.lang.NoSuchMethodError: scala.tools.nsc.Global.reporter()Lscala/tools/nsc/reporters/Reporter;

[error] scoverage.ScoverageInstrumentationComponent$$anon$1.run(plugin.scala:119)

[error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1511)

[error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1495)

[error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1488)

[error] scala.tools.nsc.Global$Run.compileFiles(Global.scala:1599)

[error] xsbt.CachedCompiler0.run(CompilerBridge.scala:163)

[error] xsbt.CachedCompiler0.run(CompilerBridge.scala:134)

[error] xsbt.CompilerBridge.run(CompilerBridge.scala:39)
@dragisak
Copy link

Is this fixed by #306 and just waiting for the new version to be published. See scoverage/sbt-scoverage#319 (comment) ?

@ches
Copy link

ches commented Mar 2, 2021

It looks like @dragisak is correct. @D-Roch since you're a committer that was responsive on those related PRs, are you able to publish a release of the compiler plugin?

@guizmaii
Copy link

Hi everyone,

Any news about this release? I'm blocked to update to Scala 2.12.13 because of this problem. 😕

@ckipp01
Copy link
Member

ckipp01 commented Apr 6, 2021

This is also biting me at the moment. Is there anything that can be done to help the release along? I'm willing to help if that would speed up the process?

@kubukoz
Copy link

kubukoz commented Apr 12, 2021

Same... also glad to help if that speeds it up.

@blast-hardcheese
Copy link
Contributor

As I mentioned in scoverage/sbt-scoverage#320 (comment) (now also merged, so difficult to discover), both of the fix comments have been merged, but in isolation, and without CI to inform us of the pending issue.

I've also attempted to summarize the current state of the world here: scoverage/sbt-scoverage#319 (comment)

@lefou
Copy link
Contributor

lefou commented Apr 18, 2021

scalac-scoverage-plugin looks pretty unmaintained to me. No helpful response or action from anyone with commit/publish rights for three months. Having no time to do any work is OK, but please leave a short comment! Help was already offered. Come on community. Do we really need a fork to push this forward?

@ckipp01
Copy link
Member

ckipp01 commented Apr 26, 2021

Just a quick update to those that are following along here, I've been granted some repo access so I've gone ahead and published a new version that should support 2.12.13. I'll follow-up with a release of the sbt-plugin as soon as I'm able.

@ckipp01
Copy link
Member

ckipp01 commented Apr 26, 2021

Alright, bear with me. It looks like there actually was a 1.4.2 published in the past, but the repo was never updated to reflect that. I did see some errors about not being able to overwrite during the publish, but at first thought that was due to a failed attempt earlier and assumed some stuff got published and others not. I need to take a closer look at what is going on and potentially publish a 1.4.3 in order for the change to actually be picked up.

@ckipp01 ckipp01 reopened this Apr 26, 2021
@john-coleman
Copy link

Thanks for the release :)

There's a Bintray brownout today.

https://status.bintray.com/

@ckipp01
Copy link
Member

ckipp01 commented Apr 26, 2021

Thanks for the release :)

There's a Bintray brownout today.

status.bintray.com

Thanks for the heads up, but that shouldn't affect us here.

Anyone here following along that maybe has more experience with ScalaJS. It seems that when publishing locally in the current master it's not producing the expected artifacts with the sjs suffix. For example:

scalac-scoverage-runtime_sjs0.6_2.12.13

If someone could take a look at the build definition and figure out what's going on here an why that's not being produced, it'll speed up the process.

@domizei385
Copy link
Contributor

When I did a built for my customer that supports 2.12.13 I also ran into the issue and I worked around it by adding this to the runtime settings
name := name.value + "_s" + crossProjectPlatform.value.identifier,

@blast-hardcheese
Copy link
Contributor

👏 @ckipp01! I believe everything should be good to go once this is released and the version is bumped in the sbt plugin. If you need help, please feel free to reach out -- I've not got huge amounts of time to drive this, but I've got good context on the issue (and was able to get a locally published version that resolves the issue)

@domizei385
Copy link
Contributor

@blast-hardcheese Good work. How did you resolve the issue?

@blast-hardcheese
Copy link
Contributor

@domizei385 Please see #305 (comment) for context. @ckipp01 seems to be the first person in a while capable of wielding the power required to resolve this issue for good, though I authored the patches that need to be merged and released to resolve the issue. A bit more patience, please, while we get the ball moving again here.

@domizei385
Copy link
Contributor

@blast-hardcheese I was not asking about the original issue.
My last question was in regards to #305 (comment), where for, @ckipp01 and I, the artifact is not published with sjs suffix , which I thought you solved differently as to what I used as a workaround.

@ckipp01
Copy link
Member

ckipp01 commented Apr 27, 2021

When I did a built for my customer that supports 2.12.13 I also ran into the issue and I worked around it by adding this to the runtime settings

` name := name.value + "_s" + crossProjectPlatform.value.identifier,

`

Ahh this would do the trick indeed but I'm confused why this just doesn't do it automatically. Let me see if I can figure out if I'm missing something first and if not I'll use this.

EDIT: This will indeed publish the artifact correctly with _sjs, but then you get issue in the actual sbt plugin when running the tests since the js tests start looking for the full js version of the artifact, like:

not found: /Users/ckipp/.ivy2/local/org.scoverage/scalac-scoverage-runtime_sjs1.0_2.12/1.4.3-SNAPSHOT/ivys/ivy.xml

@domizei385
Copy link
Contributor

@ckipp01 I have created a PR, which should fix the sjs artifact name. Also removed some of the deprecation warnings.

@domizei385
Copy link
Contributor

@ckipp01 I have opened my PR scoverage/sbt-scoverage#324. Unfortunately it does not run the pipelines without approval.

@domizei385
Copy link
Contributor

@ckipp01 Do you have any idea when/how this is synced so that the plugin is visible via "http://search.maven.org" and in turn also in this repos readme?

@ckipp01
Copy link
Member

ckipp01 commented Apr 28, 2021

@ckipp01 Do you have any idea when/how this is synced so that the plugin is visible via "http://search.maven.org" and in turn also in this repos readme?

I'm not 100% sure when the search will be synced, but the newly published artifacts are located here https://repo1.maven.org/maven2/org/scoverage/ already. The sbt plugin is currently syncing as well. As soon as that syncs I'll comment back in here to close this since everything should be good to go.

@ckipp01
Copy link
Member

ckipp01 commented Apr 28, 2021

Alright folks, thanks for your patience. While you wont's see it on search yet, you can see the newly created v1.4.3 artifacts are now available with 2.12.13 and 2.13.5 support. I've also released a new version of the sbt plugin, v1.7.0 supporting those versions. That's also not searchable yet, but you can pull it down.

Please report any issues.

EDIT: Also huge thanks to @domizei385 for helping push this over the finish line.

@ckipp01 ckipp01 closed this as completed Apr 28, 2021
@lefou
Copy link
Contributor

lefou commented Apr 28, 2021

@ckipp01 Thanks for your efforts. Greatly appreciated!

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 a pull request may close this issue.

10 participants