GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #2970

New issue
Copy link
New issue
Copy link
Closed
#2981
Closed
[core] PMD 6.30.0 release is not reproducible#2970
#2981
Copy link
Assignees
adangel
Labels
a:bugPMD crashes or fails to analyse a file.
Milestone
6.31.0

Description

@hboutemy
hboutemy
opened on Dec 13, 2020
Issue body actions

Affects 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

Activity

  1. hboutemy
    added
    a:bugPMD crashes or fails to analyse a file.
    on Dec 13, 2020
  2. oowekyala commented on Dec 15, 2020

    @oowekyala
    oowekyala
    on Dec 15, 2020
    Member
    More actions

    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

  3. adangel
    added this to the 6.31.0 milestone on Dec 15, 2020
  4. hboutemy commented on Dec 15, 2020

    @hboutemy
    hboutemy
    on Dec 15, 2020
    Author
    More actions

    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?

  5. adangel
    self-assigned this
    on Dec 16, 2020
  6. adangel commented on Dec 16, 2020

    @adangel
    adangel
    on Dec 16, 2020
    Member
    More actions

    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.

  7. hboutemy commented on Dec 16, 2020

    @hboutemy
    hboutemy
    on Dec 16, 2020
    Author
    More actions

    yes, it seems jj uses platform encoding: it would be safer to be able to define encoding as parameter

  8. adangel
    added a commit that references this issue on Dec 17, 2020

    Call jjtree/javacc with UTF-8 as default encoding

    This issue will close once commit c37f208 is merged into the 'main' branch.
    c37f208
  9. adangel
    changed the title [-]PMD 6.30.0 release is not reproducible[/-] [+][core] PMD 6.30.0 release is not reproducible[/+] on Jan 15, 2021
  10. adangel
    added a commit that references this issue on Jan 15, 2021

    [doc] Update release notes, refs pmd#2970

    ec4dcdd
  11. adangel
    closed this as completedin c37f208on Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

a:bugPMD crashes or fails to analyse a file.

Type

No type

Projects

No projects

    Milestone

    • 6.31.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.