GeezerVison is showing github.com — [core] PMD 6.30.0 release is not reproducible · Issue #2970 · pmd/pmd
[core] PMD 6.30.0 release is not reproducible #2970Labels a:bugPMD crashes or fails to analyse a file. DescriptionAffects PMD Version: 6.30.0
Description:
PMD releases are reproducible since 6.24.0: https://github.com/jvm-repo-rebuild/reproducible-central#net.sourceforge.pmd:pmd
But 6.30.0 is not reproducible on 4 artifacts: pmd-java-6.30.0-sources.jar pmd-jsp-6.30.0-sources.jar pmd-plsql-6.30.0.jar pmd-plsql-6.30.0-sources.jar
Exception Stacktrace:
issues seem to be due to system encoding of the platform used to do the release, for example:
$ diffoscope target/reference/pmd-java-6.30.0-sources.jar pmd-java/target/pmd-java-6.30.0-sources.jar
--- target/reference/pmd-java-6.30.0-sources.jar
+++ pmd-java/target/pmd-java-6.30.0-sources.jar
├── zipinfo /dev/stdin
│ @@ -1,8 +1,8 @@
│ -Zip file size: 778392 bytes, number of entries: 558
│ +Zip file size: 778390 bytes, number of entries: 558
│ -rw-r--r-- 2.0 unx 64 b- defN 20-Dec-12 08:31 META-INF/MANIFEST.MF
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 META-INF/
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 net/
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 net/sourceforge/
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 net/sourceforge/pmd/
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 net/sourceforge/pmd/cpd/
│ drwxr-xr-x 2.0 unx 0 b- stor 20-Dec-12 08:31 net/sourceforge/pmd/lang/
│ @@ -499,15 +499,15 @@
│ -rw-r--r-- 2.0 unx 1756 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/xpath/JavaFunctions.java
│ -rw-r--r-- 2.0 unx 4219 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/xpath/MetricFunction.java
│ -rw-r--r-- 2.0 unx 2103 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/xpath/TypeIsExactlyFunction.java
│ -rw-r--r-- 2.0 unx 2033 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/xpath/TypeIsFunction.java
│ -rw-r--r-- 2.0 unx 4357 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/xpath/TypeOfFunction.java
│ -rw-r--r-- 2.0 unx 0 b- defN 20-Dec-12 08:31 last-generated-timestamp
│ -rw-r--r-- 2.0 unx 3363 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JJTJavaParserState.java
-│ --rw-r--r-- 2.0 unx 197272 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/Java.jj
+│ +-rw-r--r-- 2.0 unx 197254 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/Java.jj
│ -rw-r--r-- 2.0 unx 355873 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JavaParser.java
│ -rw-r--r-- 2.0 unx 9025 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JavaParserConstants.java
│ -rw-r--r-- 2.0 unx 83050 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JavaParserTokenManager.java
│ -rw-r--r-- 2.0 unx 8478 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JavaParserTreeConstants.java
│ -rw-r--r-- 2.0 unx 8239 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/JavaParserVisitor.java
│ -rw-r--r-- 2.0 unx 6424 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/ParseException.java
│ -rw-r--r-- 2.0 unx 5078 b- defN 20-Dec-12 08:31 net/sourceforge/pmd/lang/java/ast/Token.java
│ @@ -553,8 +553,8 @@
│ -rw-r--r-- 2.0 unx 1982 b- defN 20-Dec-12 08:31 rulesets/java/strings.xml
│ -rw-r--r-- 2.0 unx 693 b- defN 20-Dec-12 08:31 rulesets/java/sunsecure.xml
│ -rw-r--r-- 2.0 unx 810 b- defN 20-Dec-12 08:31 rulesets/java/typeresolution.xml
│ -rw-r--r-- 2.0 unx 1314 b- defN 20-Dec-12 08:31 rulesets/java/unnecessary.xml
│ -rw-r--r-- 2.0 unx 811 b- defN 20-Dec-12 08:31 rulesets/java/unusedcode.xml
│ -rw-r--r-- 2.0 unx 8825 b- defN 20-Dec-12 08:31 META-INF/maven/net.sourceforge.pmd/pmd-java/pom.xml
│ -rw-r--r-- 2.0 unx 63 b- defN 20-Dec-12 08:31 META-INF/maven/net.sourceforge.pmd/pmd-java/pom.properties
-│ -558 files, 3061667 bytes uncompressed, 668478 bytes compressed: 78.2%
+│ +558 files, 3061649 bytes uncompressed, 668476 bytes compressed: 78.2%
├── net/sourceforge/pmd/lang/java/ast/Java.jj
│ @@ -10,30 +10,30 @@
│ *====================================================================
│ * Add support for record types introduced as a preview language
│ * feature with Java 14. See JEP 359.
│ * Andreas Dangel 02/2020
│ *====================================================================
│ * Add support for pattern matching for instance of introduced
│ * as a preview language feature with Java 14. See JEP 305.
-│ - * Cl\ufffd\ufffdment Fournier 02/2020
+│ + * Cl\u00e9ment Fournier 02/2020
│ *====================================================================
│ * Switch Expressions are now a standard feature of Java 14.
│ * Andreas Dangel 02/2020
│ *====================================================================
│ * Add support for the yield statement introduced as a preview language
│ * feature with Java 13. See JEP 354.
│ * Add support for text block literals introduces as a preview language
│ * feature with Java 13. See JEP 355.
│ * Andreas Dangel 08/2019
│ *====================================================================
│ * Fix #1848 Local @Deprecated @net.sourceforge.pmd.annotation.InternalApi classes should preserve their modifiers
-│ - * Cl\ufffd\ufffdment Fournier 05/2019
+│ + * Cl\u00e9ment Fournier 05/2019
│ *====================================================================
│ * Add support for Java 12 switch expressions and switch rules.
-│ - * Andreas Dangel, Cl\ufffd\ufffdment Fournier 03/2019
+│ + * Andreas Dangel, Cl\u00e9ment Fournier 03/2019
│ *====================================================================
│ * Add support for Java 10 Local Variable Type Inference
│ * See #743. In Java 10 mode, "var" as local variable type is handled special.
│ * Andreas Dangel 04/2018
│ *====================================================================
│ * Fixes #888 [java] ParseException occurs with valid '<>' in Java 1.8 mode
│ * Juan Martin Sotuyo Dodero 01/2018
Code Sample demonstrating the issue:
https://github.com/jvm-repo-rebuild/reproducible-central
Steps to reproduce:
./rebuild.sh content/net/sourceforge/pmd/pmd-6.30.0.buildspec
Activityoowekyala commented on Dec 15, 2020 This might be a problem with jjtree outputting its jj file with the platform encoding. I don't know why there would be a change since 6.29 though, unless the change occurred in the way rebuild.sh works hboutemy commented on Dec 15, 2020 I just tested rebuilding 6.29.0 release, with the current rebase.sh: it still works
maybe there was an unexpected change in the release environment for release 6.30.0? adangel commented on Dec 16, 2020 When I created the release, I performed it in a docker instance, which didn't have the locale set up (because the github action didn't work). So your observation "issues seem to be due to system encoding of the platform used to do the release" is correct.
Nevertheless, that means, this unreproducible issue just surfaced now, but was there before. It just didn't show up, because for releasing and reproducing, the same locales (at least the same encodings) have been used (probably UTF-8).
I guess we should fix it in both places: The generating of jj files by javacc and making sure, that we use a sensible locale when performing a release (see also #2967).
I'll have a look at this in the next days. hboutemy commented on Dec 16, 2020 yes, it seems jj uses platform encoding: it would be safer to be able to define encoding as parameter added a commit that references this issue on Dec 17, 2020This issue will close once commit c37f208 is merged into the 'main' branch.c37f208 changed the title [-]PMD 6.30.0 release is not reproducible[/-] [+][core] PMD 6.30.0 release is not reproducible[/+] on Jan 15, 2021
MetadataMetadataa:bugPMD crashes or fails to analyse a file. DevelopmentNo branches or pull requestsIssue actions
|