GithubHelp home page GithubHelp logo

Comments (10)

jrudnick avatar jrudnick commented on June 14, 2024 1

Perhaps this is the root cause? https://issues.scala-lang.org/browse/SI-2034

from sbt-jmh.

atk91 avatar atk91 commented on June 14, 2024 1

Is this ever going to be fixed?

from sbt-jmh.

jrudnick avatar jrudnick commented on June 14, 2024

After trying to reproduce with similar code above, in an isolated environment was not able to reproduce. I will try to get a small, accurate reproducer and attach it to this issue or I will close the issue.

from sbt-jmh.

jrudnick avatar jrudnick commented on June 14, 2024

@Updated the description with more specific steps towards basic reproduction. Fundamentally, this may be an issue between JMH and Scala, and not directly related to sbt-jmh. It appears, that calling getCanonicalName on doubly nested (in objects) traits isn't something that Scala likes. As it stands now the error that you see when you try to run is highly cryptic. Perhaps, there is something that sbt-jmh can provide to make it less so?

from sbt-jmh.

ktoso avatar ktoso commented on June 14, 2024

It appears, that calling getCanonicalName on doubly nested (in objects) traits isn't something that Scala likes.

Yeah that's exactly the thing I was thinking about.
I think the fact of nesting inside classes already causes tricky name problems.
I'm not sure sbt-jmh is able to do anything about it, since it does not even own the thread (nor even jvm!) that this error will come up on...

I can't come up with a way to help out from my end on this one... would you mind if we close as scala issue?

from sbt-jmh.

jrudnick avatar jrudnick commented on June 14, 2024

I guess there is no way in JmhPlugin.scala to at least report the file that is providing the issue?

from sbt-jmh.

ktoso avatar ktoso commented on June 14, 2024

I don't really see how we could, if people google for it they'll find this issue.
I'll close for now. Thanks for the research though!

from sbt-jmh.

jvican avatar jvican commented on June 14, 2024

Also having the same problem. Unfortunately, the codebase I tried this on is huge and I cannot spend too much time on this. Sad to see that SI-2034 is still not solved.

from sbt-jmh.

joshlemer avatar joshlemer commented on June 14, 2024

@jrudnick while the exception does not inform you which class throws the exception, you can attach a debugger to an SBT task (for example in IntelliJ) and set a breakpoint at java/lang/Class.java line 1330 to inspect the name of the class that is allegedly malformed.

from sbt-jmh.

Reeebuuk avatar Reeebuuk commented on June 14, 2024

In my case it was an enumeratum object.


  sealed trait Status extends EnumEntry

  object Status extends Enum[Status] {

    val values: scala.collection.immutable.IndexedSeq[Status] = findValues

    case object Draft extends Status
    ...
  }

java.lang.Class:1330

simpleName had value Draft$ which breaks the simpleName.charAt(0) != '$' condition.

from sbt-jmh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.