Skip to content
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

HtmlUnit 2.59.0 subject to MCOMPILER-485 #457

Closed
basil opened this issue Mar 8, 2022 · 7 comments
Closed

HtmlUnit 2.59.0 subject to MCOMPILER-485 #457

basil opened this issue Mar 8, 2022 · 7 comments
Assignees

Comments

@basil
Copy link

basil commented Mar 8, 2022

Steps to reproduce

Upgrade jenkins-test-harness from jenkins-test-harness-htmlunit 75.v279ef177dc2c / HtmlUnit 2.58.0 to jenkins-test-harness-htmlunit 77.vff6cc791d17f / HtmlUnit 2.59.0 as in jenkinsci/jenkins-test-harness#398, then run mvn clean verify -DskipTests.

Expected results

The build passes.

Actual results

The build fails with

Exception in thread "main" edu.umd.cs.findbugs.ba.AnalysisException: Exeption was thrown during analysis
	at edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$3(FindBugs2.java:1125)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
	at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
	at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
	at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError: Can't find ClassInfo for com\gargoylesoftware\htmlunit\package-info
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$3(FindBugs2.java:1120)
	... 5 more
Caused by: java.lang.AssertionError: Can't find ClassInfo for com\gargoylesoftware\htmlunit\package-info
	at edu.umd.cs.findbugs.visitclass.PreorderVisitor.setupVisitorForClass(PreorderVisitor.java:423)
	at edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:369)
	at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213)
	at edu.umd.cs.findbugs.detect.NoteSuppressedWarnings.visitClassContext(NoteSuppressedWarnings.java:74)
	at edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
	at edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$1(FindBugs2.java:1108)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at edu.umd.cs.findbugs.CurrentThreadExecutorService.execute(CurrentThreadExecutorService.java:86)
	at java.base/java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:242)
	... 4 more

Evaluation

HtmlUnit 2.58.0 uses maven-compiler-plugin 3.9.0. HtmlUnit 2.59.0 uses maven-compiler-plugin 3.10.0.

maven-compiler-plugin 3.10.0 added a feature to create missing package-info files. The feature incorrectly uses Windows-style directory separators on Windows. Other parts of the code expect to always see Unix-style directory separators. This regression is tracked in MCOMPILER-485.

A fix for this regression was merged in apache/maven-compiler-plugin#95. At the time of this writing, the fix has not yet been released to Maven Central.

Suggestions

If apache/maven-compiler-plugin#95 is released to Maven Central in a timely fashion, HtmlUnit could upgrade to that release. Then a new version of HtmlUnit could be released that fixes this regression.

Alternatively, the maven-compiler-plugin configuration can be adjusted to work around MCOMPILER-485 by setting createMissingPackageInfoClass to false as in jenkinsci/plugin-pom#506. Then a new version of HtmlUnit could be released with the workaround.

@rbri
Copy link
Member

rbri commented Mar 9, 2022

@basil should i create a 2.59.1 release or do you like to wait for the 2.60.0 (april)?

@basil
Copy link
Author

basil commented Mar 9, 2022

No strong preference, but I have a slight preference for a 2.59.1 release as it allows us to quickly get past this event and stay on a rolling update train.

@rbri
Copy link
Member

rbri commented Mar 14, 2022

@basil have updated the maven-compiler-plugin to version 3.10.1 and will release a new snapshot now.
I plan a new release for the weekend - hope this is ok for you.

@rbri
Copy link
Member

rbri commented Mar 14, 2022

@basil you use HtmlUnit for jenkins - is ok to mention Jenkins as a user of HtmlUnit on our web site?

@rbri
Copy link
Member

rbri commented Mar 14, 2022

made a new snapshot build using maven-compiler-plugin 3.10.1

@basil
Copy link
Author

basil commented Mar 14, 2022

@basil you use HtmlUnit for jenkins - is ok to mention Jenkins as a user of HtmlUnit on our web site?

Please direct this question to the Jenkins Governance Board.

@basil
Copy link
Author

basil commented Mar 14, 2022

made a new snapshot build using maven-compiler-plugin 3.10.1

Thank you!

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

No branches or pull requests

2 participants