Skip to content

Conversation

@dkomanov
Copy link
Contributor

Use reflection-based generator (RFGeneratorSource) instead of ASM-based, it does support Java8 byte-code.

Also version of JMH is upgraded.

Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just make reflection the only way it works?


BenchmarkGeneratorArgs(
fs.getPath(argv(0)),
if ("asm".equalsIgnoreCase(argv(0))) AsmGenerator else ReflectionGenerator,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we error if it is not asm or reflection?

case _: ArrayIndexOutOfBoundsException =>
// this would fail due to https://github.com/bazelbuild/rules_scala/issues/295
// let's throw a useful message instead
sys.error("jmh in rules_scala doesn't work with Java 8 bytecode: https://github.com/bazelbuild/rules_scala/issues/295")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change the error to say asm mode does not work with java 8 bytecode and instead suggest using reflection?

@johnynek
Copy link
Contributor

Thank you so much for tackling this! This will be a big help.

I think the 2.12 branch is a bit out of date sadly. For instance, I think it may have an out of date .bazelci/presubmit.yml

Can you make this as a PR against master and then we can cherry-pick it and re-enable the jmh test?

If you do this, we can probably merge very quickly.

@dkomanov
Copy link
Contributor Author

Closing in favor of #465

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants