From 7ca8229dd78980965768b1e706d4b914a67238cb Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 8 Mar 2024 17:15:38 +0100 Subject: [PATCH] [doc] Update release notes - remove release candidate info box - unify "Updated PMD Designer" sections - remove apex jorje update - unify "Changed: Apex ..." sections - add missing Java 22 section --- docs/pages/release_notes.md | 52 ++++++++++++++++++++------------ docs/pages/release_notes_old.md | 2 +- docs/pages/release_notes_pmd7.md | 38 ++++++++++++++++++++--- 3 files changed, 67 insertions(+), 25 deletions(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 9254a2ef45..886982146d 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -17,21 +17,6 @@ We're excited to bring you the next major version of PMD! Since this is a big release, we provide here only a concise version of the release notes. We prepared a separate page with the full [Detailed Release Notes for PMD 7.0.0]({{ baseurl }}pmd_release_notes_pmd7.html). -
-ℹ️ Release Candidates -

PMD 7.0.0 is finally almost ready. In order to gather feedback, we are going to ship a couple of release candidates. -These are officially available on GitHub and Maven Central and can be used as usual (e.g. as a dependency). -We encourage you to try out the new features, but keep in mind that we may introduce API breaking changes between -the release candidates. It should be stable enough if you don't use custom rules.

- -

We have still some tasks planned for the next release candidates. -You can see the progress in PMD 7 Tracking Issue #3898.

- -

If you find any problem or difficulty while updating from PMD 6, please provide feedback via our -issue tracker. That way we can improve the experience -for all.

-
- {% tocmaker is_release_notes_processor %} ### Changes since 7.0.0-rc4 @@ -143,6 +128,8 @@ Under the hood, we use two open source libraries instead: Although the parsers is completely switched, there are only little known changes to the AST. These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast). +With the new Apex parser, the new language constructs like User Mode Database Operations +can be parsed now. PMD should be able to parse Apex code up to version 59.0 (Winter '23). See [#3766](https://github.com/pmd/pmd/issues/3766) for details. @@ -1014,11 +1001,14 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), #### Updated PMD Designer -This PMD release ships a new version of the pmd-designer. -For the changes, see -* [PMD Designer Changelog (7.0.0-rc1)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc1). -* [PMD Designer Changelog (7.0.0-rc4)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc4). +This PMD release ships a new version of the pmd-designer. The designer artifact has been +renamed from "pmd-ui" to "pmd-designer". While the designer still works with Java 8, the +recommended Java Runtime is Java 11 (or later) with OpenJFX 17 (or later). + +For the detailed changes, see * [PMD Designer Changelog (7.0.0)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0). +* [PMD Designer Changelog (7.0.0-rc4)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc4). +* [PMD Designer Changelog (7.0.0-rc1)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc1). #### New CPD report format cpdhtml-v2.xslt @@ -1070,6 +1060,28 @@ module `pmd-coco`. Contributors: [Wener](https://github.com/wener-tiobe) (@wener-tiobe) +#### New: Java 22 Support + +This release of PMD brings support for Java 22. There are the following new standard language features, +that are supported now: + +* [JEP 456: Unnamed Variables & Patterns](https://openjdk.org/jeps/456) + +PMD also supports the following preview language features: + +* [JEP 447: Statements before super(...) (Preview)](https://openjdk.org/jeps/447) +* [JEP 459: String Templates (Second Preview)](https://openjdk.org/jeps/459) +* [JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)](https://openjdk.org/jeps/463) + +In order to analyze a project with PMD that uses these language features, +you'll need to enable it via the environment variable `PMD_JAVA_OPTS` and select the new language +version `22-preview`: + + export PMD_JAVA_OPTS=--enable-preview + pmd check --use-version java-22-preview ... + +Note: Support for Java 20 preview language features have been removed. The version "20-preview" is no longer available. + #### New: Java 21 Support This release of PMD brings support for Java 21. There are the following new standard language features, @@ -1143,6 +1155,8 @@ Under the hood, we use two open source libraries instead: Although the parsers is completely switched, there are only little known changes to the AST. These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast). +With the new Apex parser, the new language constructs like User Mode Database Operations +can be parsed now. PMD should be able to parse Apex code up to version 59.0 (Winter '23). See [#3766](https://github.com/pmd/pmd/issues/3766) for details. diff --git a/docs/pages/release_notes_old.md b/docs/pages/release_notes_old.md index 91d377b154..a4f86dd4f2 100644 --- a/docs/pages/release_notes_old.md +++ b/docs/pages/release_notes_old.md @@ -3,7 +3,7 @@ title: Old Release Notes permalink: pmd_release_notes_old.html --- -Previous versions of PMD can be downloaded here: https://github.com/pmd/pmd/releases +Previous versions of PMD can be downloaded here: [Releases - pmd/pmd (GitHub)](https://github.com/pmd/pmd/releases) diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index afcf28e2a8..69a9aba87f 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -144,7 +144,10 @@ This PMD release ships a new version of the pmd-designer. The designer artifact renamed from "pmd-ui" to "pmd-designer". While the designer still works with Java 8, the recommended Java Runtime is Java 11 (or later) with OpenJFX 17 (or later). -For the detailed changes, see [PMD Designer Changelog (7.0.0)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0). +For the detailed changes, see +* [PMD Designer Changelog (7.0.0)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0). +* [PMD Designer Changelog (7.0.0-rc4)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc4). +* [PMD Designer Changelog (7.0.0-rc1)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0-rc1). ### New CPD report format cpdhtml-v2.xslt @@ -217,7 +220,7 @@ module `pmd-coco`. Contributors: [Wener](https://github.com/wener-tiobe) (@wener-tiobe) -### Java 22 Support +### New: Java 22 Support This release of PMD brings support for Java 22. There are the following new standard language features, that are supported now: @@ -300,10 +303,35 @@ Related issue: [[core] Explicitly name all language versions (#4120)](https://gi literals were ignored. The new option additional ignores identifiers as well in sequences. * See [PR #4470](https://github.com/pmd/pmd/pull/4470) for details. -### Changed: Apex Jorje Updated +### Changed: Apex Support: Replaced Jorje with fully open source front-end -With the new version of Apex Jorje, the new language constructs like User Mode Database Operations -can be parsed now. PMD should now be able to parse Apex code up to version 59.0 (Winter '23). +When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source +and generate an AST. This library is however a binary-blob provided as part of the +[Salesforce Extensions for VS Code](https://github.com/forcedotcom/salesforcedx-vscode), and it is closed-source. + +This causes problems, if binary blobs are not allowed by e.g. a company-wide policy. In that case, the Jorje +library prevented that PMD Apex could be used at all. + +Also having access to the source code, enhancements and modifications are easier to do. + +Under the hood, we use two open source libraries instead: + +* [apex-parser](https://github.com/apex-dev-tools/apex-parser) originally by + [Kevin Jones](https://github.com/nawforce) (@nawforce). + This project provides the grammar for a ANTLR based parser. +* [Summit-AST](https://github.com/google/summit-ast) by [Google](https://github.com/google) (@google) + This project translates the ANTLR parse tree into an AST, that is similar to the AST Jorje provided. + Note: This is not an official Google product. + +Although the parsers is completely switched, there are only little known changes to the AST. +These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast). +With the new Apex parser, the new language constructs like User Mode Database Operations +can be parsed now. PMD should be able to parse Apex code up to version 59.0 (Winter '23). + +See [#3766](https://github.com/pmd/pmd/issues/3766) for details. + +Contributors: [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google), +[Edward Klimoshenko](https://github.com/eklimo) (@eklimo) ### Changed: Groovy Support (CPD)