Skip to content

Commit

Permalink
Updating to javaparser parent 3.26.2
Browse files Browse the repository at this point in the history
  • Loading branch information
smillst authored Sep 25, 2024
2 parents 5206fc9 + d2ad731 commit b1e90b5
Show file tree
Hide file tree
Showing 102 changed files with 6,574 additions and 844 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/formatting_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Check codegen and formatting

#on: [push, pull_request]
#on: [pull_request]
on:
# Trigger the workflow on push to master (ignoring .md only changes)
push:
branches:
- master
paths-ignore:
- '**.md'

# Trigger the workflow on any pull_request (ignoring .md only changes)
pull_request:
paths-ignore:
- '**.md'

# Enable manual triggering (important for contributors to enable a check on their fork)
workflow_dispatch:

# If a build is running in the current branch, and the branch is updated, we cancel the previous build and start
# a new one with the updated changes.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# Run checkstyle validations for pipeline
checkstyle_check:
name: Validate checkstyle
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: "0"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'zulu'
- name: Validate Project Checkstyle
run: ./mvnw -B checkstyle:check

spotless_check:
name: Spotless check
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: "0"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'zulu'
- name: Generate code and format
run: |
./run_core_metamodel_generator.sh
# ./run_core_generators.sh automatically runs ./mvnw spotless:apply
./run_core_generators.sh
git diff --exit-code
53 changes: 15 additions & 38 deletions .github/workflows/maven_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,21 @@ jobs:
## Different JDK versions have different implementations etc. -- test on all combinations (ideally 8 to latest).
### exclude pre-8 (min development version jdk8)
# typetools: Exclude 10 because of crashes in the compiler, exclude others because they aren't found
jdk: [ 8,11,13,15,16,17 ]
jdk: [ 8,11,13,15,16,17,18 ]
# The below configurations are no longer available on github runners and is not supported by the
# setup-java action, nor are they available from the supported distributions.
# See https://github.com/actions/setup-java for details
exclude:
- os: macos-latest
jdk: 9
- os: macos-latest
jdk: 10
- os: macos-latest
jdk: 12
- os: macos-latest
jdk: 14

>>>>>>> 0ed19322f8efcf13ca541673cbe3f60a605af32c
env:
OS: ${{ matrix.os }}
JDK: ${{ matrix.jdk }}
Expand Down Expand Up @@ -102,40 +116,3 @@ jobs:
verbose: false # optional (default = false):
flags: javaparser-symbol-solver,AlsoSlowTests,${{ matrix.os }},jdk-${{ matrix.jdk }}
env_vars: OS,JDK

# Run checkstyle validations for pipeline
checkstyle_check:
name: Validate checkstyle
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: "0"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'zulu'
- name: Validate Project Checkstyle
run: ./mvnw -B checkstyle:check

spotless_check:
name: Validate code generation and formatting
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: "0"
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'zulu'
- name: Generate code and format
run: |
./run_core_metamodel_generator.sh
# ./run_core_generators.sh automatically runs ./mvnw spotless:apply
./run_core_generators.sh
git diff --exit-code
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
49 changes: 48 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,51 @@ Our development workflow is based on Pull Request. If you are not familiar with
- Pull requests often stay open for at least a few days to give people a chance to review it.
- A pull request is merged when all comments on it have been resolved.
- If you create a pull request for an issue, mention the issue in the format #123 to make github link it automatically.
- Before submitting a pull request, please run `./mvnw spotless:apply` to format your code to avoid any formatting related issues during review.
- Before creating a commit (or at least before submitting a pull request), please reformat the project with the instructions given below
to avoid any formatting-related issues during the review.

### Note on formatting the project:

- If you are developing on a machine with bash installed, execute `./run_core_metamodel_generator.sh && ./run_core_generators.sh`. This
will re-run all of the code generators and then re-format the entire project as a final step. This ensures that:
- All the code that needs to be generated has been generated correctly.
- None of the changes you've added will be overwritten by code generation in the future.
- All of your changes are correctly formatted (including changes made during code generation, for example whitespace changes).

The PR check for style runs these generators and checks that the diff after doing so is empty, so if you've run this on your machine,
then that check should not fail.

- If you are developing on a machine without bash, execute `./mvnw spotless:apply`. This will re-format the project, but without
running the code generators. This will be sufficient in many cases, but it's still possible that changes are introduced during
code generation which would cause the PR style check to fail. If this happens, some manual changes are required.

To fix this:
1. Go to the job output for the failed `Spotless check` job by clicking the red cross next to the job.
2. Scroll to the bottom of the `Generate code and format` output tab.
3. There, you will see output from the diff command showing what failed. For example, in https://github.com/javaparser/javaparser/actions/runs/10389076737/job/28766249645,
that output is:
```
[INFO] ------------------------------------------------------------------------
diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
index 7bc7f46b9..429889e35 100644
--- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
+++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
@@ -17,7 +17,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
-
package com.github.javaparser.ast.expr;
import static com.github.javaparser.utils.Utils.assertNotNull;
Error: Process completed with exit code 1.
```
4. Verify that this output does not overwrite any code you wrote which would change the behaviour. If it does, you probably implemented
something manually when it should've been generated and this will be overwritten next time the code generators are run. This requires
a manual fix to your code to prevent issues in the future.
5. If no major issues are found, copy this output, excluding the `[INFO] --...` line and the `Error: Process complete with exit code 1.`
line and paste that into a patch file (for example, `/tmp/style.patch`, but the name and location aren't important).
6. From the javaparser project directory, run `git apply /tmp/style.patch` (substituting `/tmp/style.patch` for the path of your
patch file). `git status` should now show that all the files mentioned in the patch are modified.
7. Add and commit the changes and push to update the PR.
51 changes: 49 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Next Release (Version 3.26.2-snapshot)
Next Release (Version 3.26.3-snapshot)
--------------------------------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/209?closed=1)
[issues resolved](https://github.com/javaparser/javaparser/milestone/210?closed=1)

### Added
### Changed
Expand All @@ -10,6 +10,53 @@ Next Release (Version 3.26.2-snapshot)
### Fixed
### Security

Version 3.26.2
--------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/209?closed=1)


### Changed

* Move formatting workflows into separate file (PR [#4480](https://github.com/javaparser/javaparser/pull/4480) by [@johannescoetzee](https://github.com/johannescoetzee))
* Exclude unavailable macos <-> java version combinations from github tests (PR [#4479](https://github.com/javaparser/javaparser/pull/4479) by [@johannescoetzee](https://github.com/johannescoetzee))

### Fixed

* Fixes #4526. Fix Node.PostOrderIterator for roots without children (PR [#4538](https://github.com/javaparser/javaparser/pull/4538) by [@ktul](https://github.com/ktul))
* Add missing copyright notice to RecordPatternExpr.java (PR [#4527](https://github.com/javaparser/javaparser/pull/4527) by [@johannescoetzee](https://github.com/johannescoetzee))
* Add missing type erasure in ClassOrInterfaceType.toDescriptor (PR [#4522](https://github.com/javaparser/javaparser/pull/4522) by [@johanneskloos](https://github.com/johanneskloos))
* Allow primitive types for patterns (PR [#4506](https://github.com/javaparser/javaparser/pull/4506) by [@johannescoetzee](https://github.com/johannescoetzee))
* Fix project formatting (PR [#4499](https://github.com/javaparser/javaparser/pull/4499) by [@johannescoetzee](https://github.com/johannescoetzee))
* Fix: issue 4492 resolve LambdaExpr has NullPointException (PR [#4497](https://github.com/javaparser/javaparser/pull/4497) by [@jlerbsc](https://github.com/jlerbsc))
* Fix: issue 2738 UnsolvedSymbolException while trying to ResolvedMethodDeclaration from MethodCallExpr (PR [#4482](https://github.com/javaparser/javaparser/pull/4482) by [@jlerbsc](https://github.com/jlerbsc))

### Developer Changes

* fix(deps): update byte-buddy.version to v1.15.1 (PR [#4547](https://github.com/javaparser/javaparser/pull/4547) by [@renovate[bot]](https://github.com/apps/renovate))
* fix(deps): update byte-buddy.version to v1.15.0 (PR [#4543](https://github.com/javaparser/javaparser/pull/4543) by [@renovate[bot]](https://github.com/apps/renovate))
* fix(deps): update dependency com.google.guava:guava to v33.3.0-jre (PR [#4532](https://github.com/javaparser/javaparser/pull/4532) by [@renovate[bot]](https://github.com/apps/renovate))
* fix(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.14.19 (PR [#4531](https://github.com/javaparser/javaparser/pull/4531) by [@renovate[bot]](https://github.com/apps/renovate))
* chore(deps): update junit5 monorepo to v5.11.0 (PR [#4528](https://github.com/javaparser/javaparser/pull/4528) by [@renovate[bot]](https://github.com/apps/renovate))
* fix(deps): update byte-buddy.version to v1.14.18 (PR [#4493](https://github.com/javaparser/javaparser/pull/4493) by [@renovate[bot]](https://github.com/apps/renovate))
* chore(deps): update actions/checkout action to v4.1.7 (PR [#4486](https://github.com/javaparser/javaparser/pull/4486) by [@renovate[bot]](https://github.com/apps/renovate))
* chore(deps): update actions/checkout action to v4.0.0 (PR [#4485](https://github.com/javaparser/javaparser/pull/4485) by [@renovate[bot]](https://github.com/apps/renovate))
* chore(deps): update junit5 monorepo to v5.10.3 (PR [#4483](https://github.com/javaparser/javaparser/pull/4483) by [@renovate[bot]](https://github.com/apps/renovate))

### Uncategorised

* Add better instructions for re-formatting the project (PR [#4540](https://github.com/javaparser/javaparser/pull/4540) by [@johannescoetzee](https://github.com/johannescoetzee))

### :heart: Contributors

Thank You to all contributors who worked on this release!

* [@johanneskloos](https://github.com/johanneskloos)
* [@ktul](https://github.com/ktul)
* [@johannescoetzee](https://github.com/johannescoetzee)
* [@kamilkrzywanski](https://github.com/kamilkrzywanski)
* [@jlerbsc](https://github.com/jlerbsc)


Version 3.26.1
--------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/208?closed=1)
Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-generators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.26.1</version>
<version>3.26.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-metamodel-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.26.1</version>
<version>3.26.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions javaparser-core-serialization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.26.1</version>
<version>3.26.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<version>1.1.6</version>
<version>1.1.7</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-testing-bdd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.26.1</version>
<version>3.26.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions javaparser-core-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.26.1</version>
<version>3.26.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -125,7 +125,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.26.0</version>
<version>3.26.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading

0 comments on commit b1e90b5

Please sign in to comment.