-
Notifications
You must be signed in to change notification settings - Fork 278
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
[Question] Unable to build custom JacocoRunner using the script #1483
Comments
@gergelyfabian any chance you can help here? |
Yes, I'm aware of the problems with building for Jacoco 0.8.7. I haven't managed to resolve this yet, also it became lower priority for me as latest Bazel version already uses Jacoco 0.8.7. I feel, that I'd gladly pass my Jacoco changes to another contributor, but on another note I'm not sure there is readiness from the Jacoco team to work on the Scala fixes (best would be to have them integrated to avoid cases when our fork stops working). |
That's quite shocking, but when using Java 8 (instead of my default Java 17) I managed to build jacoco from the branch... |
|
When using the script with this Java, it builds Jacoco, there is a Bazel error, that I'll try to fix (most probably related to the Bazel version used for building). |
Managed to fix the build, will create a PR with the fixes (including a branch for Bazel itself to add the missing interface). |
@tanishiking Could you please check the solution in #1485? |
Even with my fixes, when I tested the built JacocoRunner, it fails:
Possible that Bazel's Jacoco implementation doesn't work with the Jacoco 0.8.7-scala branch's changes. |
I fixed some null pointer errors on my 0.8.7-scala branch, it should be better now. |
Thanks a lot @gergelyfabian ! I'll test it out |
This should be fixed after merging #1485. |
Thanks again @gergelyfabian! |
Related #1453
Environment
Background
build_jacocorunner_bazel
script, it seems we need to build the custom Jacoco runner patched in https://github.com/gergelyfabian/jacocorules_scala/scripts/build_jacocorunner/build_jacocorunner_bazel_5.0+.sh
Lines 7 to 9 in 6c1f034
Problem
I tried to build the custom Jacoco runner with the following patch against current master + tanishiking@9fdb2ba
(Ignoring groovy validation because it fails to build in my local environment, it should be ok because it's test, right?)
when I run
./scripts/build_jacocorunner/build_jacocorunner_bazel_5.0+.sh
, it fails with the following error.This is because
getInterfaceNames
toIFilterContext
gergelyfabian/jacoco@0d63c2cIFilterContext
inClassProbeMapper
Questions
0.8.7-scala
, or is that branch not yet ready?Additional information
0.8.6-scala
build also failedTried to build with the following patch (because those modules failed to build)
and failed with the following error
/2.4/commons-lang-2.4.jar
[ERROR] urls[17] = file:/Users/tanishiking/.m2/repository/org/apache/httpcomponents
/httpclient/4.0.2/httpclient-4.0.2.jar
[ERROR] urls[18] = file:/Users/tanishiking/.m2/repository/org/apache/httpcomponents
/httpcore/4.0.1/httpcore-4.0.1.jar
[ERROR] urls[19] = file:/Users/tanishiking/.m2/repository/commons-codec/commons-cod
ec/1.3/commons-codec-1.3.jar
[ERROR] urls[20] = file:/Users/tanishiking/.m2/repository/commons-validator/commons
-validator/1.3.1/commons-validator-1.3.1.jar
[ERROR] urls[21] = file:/Users/tanishiking/.m2/repository/commons-beanutils/commons
-beanutils/1.7.0/commons-beanutils-1.7.0.jar
[ERROR] urls[22] = file:/Users/tanishiking/.m2/repository/commons-digester/commons-
digester/1.6/commons-digester-1.6.jar
[ERROR] urls[23] = file:/Users/tanishiking/.m2/repository/commons-logging/commons-l
ogging/1.0.4/commons-logging-1.0.4.jar
[ERROR] urls[24] = file:/Users/tanishiking/.m2/repository/org/apache/maven/shared/m
aven-script-interpreter/1.1/maven-script-interpreter-1.1.jar
[ERROR] urls[25] = file:/Users/tanishiking/.m2/repository/org/codehaus/groovy/groov
y/2.0.1/groovy-2.0.1.jar
[ERROR] urls[26] = file:/Users/tanishiking/.m2/repository/antlr/antlr/2.7.7/antlr-2
.7.7.jar
[ERROR] urls[27] = file:/Users/tanishiking/.m2/repository/org/ow2/asm/asm-tree/4.0/
asm-tree-4.0.jar
[ERROR] urls[28] = file:/Users/tanishiking/.m2/repository/org/ow2/asm/asm-commons/4
.0/asm-commons-4.0.jar
[ERROR] urls[29] = file:/Users/tanishiking/.m2/repository/org/ow2/asm/asm/4.0/asm-4
.0.jar
[ERROR] urls[30] = file:/Users/tanishiking/.m2/repository/org/ow2/asm/asm-util/4.0/
asm-util-4.0.jar
[ERROR] urls[31] = file:/Users/tanishiking/.m2/repository/org/ow2/asm/asm-analysis/
4.0/asm-analysis-4.0.jar
[ERROR] urls[32] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-sink-api/1.4/doxia-sink-api-1.4.jar
[ERROR] urls[33] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-logging-api/1.4/doxia-logging-api-1.4.jar
[ERROR] urls[34] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-site-renderer/1.1.4/doxia-site-renderer-1.1.4.jar
[ERROR] urls[35] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-decoration-model/1.1.4/doxia-decoration-model-1.1.4.jar
[ERROR] urls[36] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-module-xhtml/1.1.4/doxia-module-xhtml-1.1.4.jar
[ERROR] urls[37] = file:/Users/tanishiking/.m2/repository/org/apache/maven/doxia/do
xia-module-fml/1.1.4/doxia-module-fml-1.1.4.jar
[ERROR] urls[38] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-velocity/1.1.7/plexus-velocity-1.1.7.jar
[ERROR] urls[39] = file:/Users/tanishiking/.m2/repository/org/apache/velocity/veloc
ity/1.5/velocity-1.5.jar
[ERROR] urls[40] = file:/Users/tanishiking/.m2/repository/oro/oro/2.0.8/oro-2.0.8.j
ar
[ERROR] urls[41] = file:/Users/tanishiking/.m2/repository/commons-collections/commo
ns-collections/3.2/commons-collections-3.2.jar
[ERROR] urls[42] = file:/Users/tanishiking/.m2/repository/org/beanshell/bsh/2.0b4/b
sh-2.0b4.jar
[ERROR] urls[43] = file:/Users/tanishiking/.m2/repository/org/codehaus/groovy/groov
y-all/2.0.1/groovy-all-2.0.1.jar
[ERROR] urls[44] = file:/Users/tanishiking/.m2/repository/org/apache/ant/ant/1.8.1/
ant-1.8.1.jar
[ERROR] urls[45] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[46] = file:/Users/tanishiking/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[47] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
sh-2.0b4.jar
[ERROR] urls[43] = file:/Users/tanishiking/.m2/repository/org/codehaus/groovy/groov
y-all/2.0.1/groovy-all-2.0.1.jar
[ERROR] urls[44] = file:/Users/tanishiking/.m2/repository/org/apache/ant/ant/1.8.1/
ant-1.8.1.jar
[ERROR] urls[45] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[46] = file:/Users/tanishiking/.m2/repository/commons-io/commons-io/2.2
/commons-io-2.2.jar
[ERROR] urls[47] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
sh-2.0b4.jar
[ERROR] urls[43] = file:/Users/tanishiking/.m2/repository/org/codehaus/groovy/groov
y-all/2.0.1/groovy-all-2.0.1.jar
[ERROR] urls[44] = file:/Users/tanishiking/.m2/repository/org/apache/ant/ant/1.8.1/
ant-1.8.1.jar
[ERROR] urls[45] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[46] = file:/Users/tanishiking/.m2/repository/commons-io/commons-io/2.2
/commons-io-2.2.jar
[ERROR] urls[47] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-interpolation/1.21/plexus-interpolation-1.21.jar
[ERROR] urls[48] = file:/Users/tanishiking/.m2/repository/org/codehaus/plexus/plexu
s-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module @2d917798
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :org.jacoco.examples.test
```
scala
branch build pass, but it doesn't workIn this case, build passes (but why???).
However, when I tested with the custom jacoco runner, in the example repository https://github.com/tanishiking/bazel-playground/tree/main/17-scala-coverage we still have a missing method coverage for synthetic methods by case class.
The text was updated successfully, but these errors were encountered: