Comments (10)
Perhaps this is the root cause? https://issues.scala-lang.org/browse/SI-2034
from sbt-jmh.
Is this ever going to be fixed?
from sbt-jmh.
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.
@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.
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.
I guess there is no way in JmhPlugin.scala
to at least report the file that is providing the issue?
from sbt-jmh.
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.
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.
@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.
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)
- Add recommended jvm options in async profiler HOT 2
- missing tag for 0.3.4 on GitHub HOT 1
- Cannot run JMH benchmarks with async-profiler for versions 0.3.5 and 0.3.6 HOT 1
- Version 0.3.5 JFR profile java.lang.UnsupportedClassVersionError on Java 8 HOT 3
- Tab completion for jmh parameters
- CI broken: unable to install oraclejdk8 HOT 4
- Request for feature: Cross-Versions benchmarking HOT 2
- Canceling execution does not work on Windows
- Error when trying to use Flight Recorder HOT 5
- Scala 2.13 support is missing ? HOT 1
- Benchmark compilation fails if java.sql.ResultSet is used HOT 4
- Is it possible to set `bspEnable := false` by default? HOT 1
- publish to maven central instead of bintray HOT 5
- jmh:run caused Unable to find the resource: /META-INF/BenchmarkList in multiple projects
- Specifying javaHome per configuration
- Log4j Dependencies not being passed to the Benchmark
- `Test / skip := true` leads to `java.lang.IllegalArgumentException: Benchmark does not match a class`
- Upgrade project/build.properties to use SBT 1.9.0 HOT 2
- How to use async-profiler with multiple options HOT 6
- Forking JMH may fail on Windows with "CreateProcess error=206, The filename or extension is too long" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-jmh.