From 693601e939e14d73224886c81af3a7513d0a6bfc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 7 Sep 2021 22:01:50 +0200 Subject: [changelog] add previous commit (val to final var) to changelog --- doc/changelog.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 583736f1..973d86ea 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -3,6 +3,7 @@ Lombok Changelog ### v1.18.21 "Edgy Guinea Pig" * Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). +* IMPROBABLE BREAKING CHANGE: If the underlying compiler and `--release` / `--source` option is 10 or higher, lombok's `val` is now replaced by `final var`. That means compound declarations such as `val x = 10, y = 12;` now fail (lombok's old `val` implementation supported it, javac's `var` does not), but IDE support in particular is more reliable. We decided it was worth the tradeoff. ### v1.18.20 (April 2nd, 2021) * PLATFORM: JDK16 support added. [Issue #2681](https://github.com/projectlombok/lombok/issues/2681). -- cgit From a7b625652351c290d3bf7cf13106d9bb8861e012 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 16 Sep 2021 02:12:05 +0200 Subject: [changelog] documenting previous commit. --- doc/changelog.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 973d86ea..9f240033 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -2,7 +2,8 @@ Lombok Changelog ---------------- ### v1.18.21 "Edgy Guinea Pig" -* Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). +* PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). +* FEATURE: Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). * IMPROBABLE BREAKING CHANGE: If the underlying compiler and `--release` / `--source` option is 10 or higher, lombok's `val` is now replaced by `final var`. That means compound declarations such as `val x = 10, y = 12;` now fail (lombok's old `val` implementation supported it, javac's `var` does not), but IDE support in particular is more reliable. We decided it was worth the tradeoff. ### v1.18.20 (April 2nd, 2021) -- cgit From 2c5754e32a07a70ccec705ced623dce7ce6eb1a0 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 29 Sep 2021 15:25:17 +0200 Subject: [doc] Added some docs on how to debug lombok for various platforms, also updated changelog with recent changes --- doc/changelog.markdown | 3 +++ doc/debug-insights/eclipse.txt | 22 ++++++++++++++++++++++ doc/debug-insights/vscode.txt | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 doc/debug-insights/eclipse.txt create mode 100644 doc/debug-insights/vscode.txt (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 9f240033..83e965b5 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -5,6 +5,9 @@ Lombok Changelog * PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). * FEATURE: Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). * IMPROBABLE BREAKING CHANGE: If the underlying compiler and `--release` / `--source` option is 10 or higher, lombok's `val` is now replaced by `final var`. That means compound declarations such as `val x = 10, y = 12;` now fail (lombok's old `val` implementation supported it, javac's `var` does not), but IDE support in particular is more reliable. We decided it was worth the tradeoff. +* BUGFIX: Syntax highlighting in VSCode now works reliably when using lombok. [Issue #2950](https://github.com/projectlombok/lombok/issues/2950). +* BUGFIX: Eclipse's _organize imports_ feature would sometimes remove your `lombok.val` import. [Issue #2972](https://github.com/projectlombok/lombok/issues/2972). + ### v1.18.20 (April 2nd, 2021) * PLATFORM: JDK16 support added. [Issue #2681](https://github.com/projectlombok/lombok/issues/2681). diff --git a/doc/debug-insights/eclipse.txt b/doc/debug-insights/eclipse.txt new file mode 100644 index 00000000..b653594a --- /dev/null +++ b/doc/debug-insights/eclipse.txt @@ -0,0 +1,22 @@ +# How to debug lombok running in eclipse + +## Overview + +Lombok's build scripting can generate a target for you, that lets you run the same eclipse installation inside eclipse, in debug mode. Now you can add breakpoints. + +As lombok is an agent, lombok __must__ load from a jar file. +Nevertheless, lombok can be hot-code-replaced in the debugger. +This works via the loader: The lombok agent has its own classloading architecture, and this architecture is capable of loading lombok's class files from a location of your choosing. Choose the /bin dir from your eclipse project which will help with debugging; eclipse will then be able to apply HCR to the eclipse-running-in-eclipse. Unless there are issues with the loader architecture itself, of course. + +The end goal is that you can make some changes to the lombok sources in your eclipse, then click the 'debug' button, and a new 'test eclipse' starts up using lombok as you wrote it just now. You can now make changes to lombok sources in the original eclipse, hit 'save', and these changes now get automatically applied to the 'test eclipse', as long as you aren't making any changes to signatures (add or remove methods/fields/types, or change return types, param types, etc). + +If you have the sources to eclipse itself, you can open them, set breakpoints, and step through, though be aware that lombok's agent injection system does cause some issues here; we move methods into different classes and eclipse's debugger naturally doesn't understand this, so you can't breakpoint lombok's own patch methods, and stepping through them 'works' but looks bizarre in the debugger as the debugger now thinks your source file clearly cannot possibly match the class file currently running. Just keep going ('step out'), eclipse will figure it out again once you're back in un-instrumented eclipse code. + + +TODO: + +Describe in detail: + +* Which ant tasks to run to create the targets +* How to modify this target, if needed, to point at your bin dir + diff --git a/doc/debug-insights/vscode.txt b/doc/debug-insights/vscode.txt new file mode 100644 index 00000000..efc55619 --- /dev/null +++ b/doc/debug-insights/vscode.txt @@ -0,0 +1,7 @@ +As per @Rawi01's experimenting: + +* VSCode's lombok plugin simply adds the appropriate `-javaagent` options when it fires up the eclipse-based language server. You can also add debug flags here. +* Add the flags `-agentlib:jdwp-transport=dt_socket,server=y,suspend=n,quiet=y,address=12345` to the `settings.json` of the VSCode lombok plugin, and then tell your debugger to attach to localhost:12345. +* Set the property `java.server.launchMode` to `"Standard"`. +* Consider activing the language server debug mode. + -- cgit From 52d078603da0ea9a167c0351e750b7cbd04910f7 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 7 Oct 2021 03:08:13 +0200 Subject: [versioning] pre-release version bump --- doc/changelog.markdown | 2 +- src/core/lombok/core/Version.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 83e965b5..2169901d 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -1,7 +1,7 @@ Lombok Changelog ---------------- -### v1.18.21 "Edgy Guinea Pig" +### v1.18.22 (October 6th, 2021) * PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). * FEATURE: Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). * IMPROBABLE BREAKING CHANGE: If the underlying compiler and `--release` / `--source` option is 10 or higher, lombok's `val` is now replaced by `final var`. That means compound declarations such as `val x = 10, y = 12;` now fail (lombok's old `val` implementation supported it, javac's `var` does not), but IDE support in particular is more reliable. We decided it was worth the tradeoff. diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index eb8ed6e7..3a426e5e 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,9 +30,9 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.18.21"; - private static final String RELEASE_NAME = "Edgy Guinea Pig"; -// private static final String RELEASE_NAME = "Envious Ferret"; + private static final String VERSION = "1.18.22"; +// private static final String RELEASE_NAME = "Edgy Guinea Pig"; + private static final String RELEASE_NAME = "Envious Ferret"; // Named version history: // Angry Butterfly -- cgit From 4d568ab3ad44eb9e4216a16b111c54d3f101c3bc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 7 Oct 2021 03:16:03 +0200 Subject: [versioning] post-release version bump --- doc/changelog.markdown | 3 +++ src/core/lombok/core/Version.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 2169901d..6f9adbac 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -1,6 +1,9 @@ Lombok Changelog ---------------- +### v1.18.24 "Edgy Guinea Pig" +* No new changes since the release of v1.18.22. + ### v1.18.22 (October 6th, 2021) * PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). * FEATURE: Added the `@StandardException` feature. [Pull Request #2702](https://github.com/projectlombok/lombok/pull/2702). diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index 3a426e5e..dafe17ae 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,9 +30,9 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.18.22"; -// private static final String RELEASE_NAME = "Edgy Guinea Pig"; - private static final String RELEASE_NAME = "Envious Ferret"; + private static final String VERSION = "1.18.23"; + private static final String RELEASE_NAME = "Edgy Guinea Pig"; +// private static final String RELEASE_NAME = "Envious Ferret"; // Named version history: // Angry Butterfly -- cgit From 13d84b129e562fdc71b049778c3b3bd2376e29a4 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 18 Oct 2021 16:01:01 +0200 Subject: [#2693] Docs and changelog for the ‘accessors.capitalization = beanspec’ feature. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/changelog.markdown | 2 +- website/templates/features/GetterSetter.html | 5 +++++ website/templates/features/With.html | 9 +++++++++ website/templates/features/experimental/Accessors.html | 12 +++++++++--- 4 files changed, 24 insertions(+), 4 deletions(-) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 6f9adbac..cd8a4353 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -2,7 +2,7 @@ Lombok Changelog ---------------- ### v1.18.24 "Edgy Guinea Pig" -* No new changes since the release of v1.18.22. +* FEATURE: Turning a field named `uShape` into a getter is tricky: `getUShape` or `getuShape`? The community is split on which style to use. Lombok does `getUShape`, but if you prefer the `getuShape` style, add to `lombok.config`: `lombok.accessors.capitalization = beanspec`. [Issue #2693](https://github.com/projectlombok/lombok/issues/2693) [Pull Request #2996](https://github.com/projectlombok/lombok/pull/2996). Thanks __@YonathanSherwin__! ### v1.18.22 (October 6th, 2021) * PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). diff --git a/website/templates/features/GetterSetter.html b/website/templates/features/GetterSetter.html index a429c9ac..8b16d34d 100644 --- a/website/templates/features/GetterSetter.html +++ b/website/templates/features/GetterSetter.html @@ -37,6 +37,11 @@ lombok.getter.noIsPrefix = [true | false] (default: false)
If set to true, getters generated for boolean fields will use the get prefix instead of the defaultis prefix, and any generated code that calls getters, such as @ToString, will also use get instead of is +
+ lombok.accessors.capitalization = [basic | beanspec] (default: basic) +
+ Controls how tricky cases like uShaped (one lowercase letter followed by an upper/titlecase letter) are capitalized. basic capitalizes that to getUShaped, and beanspec capitalizes that to getuShaped instead.
+ Both strategies are commonly used in the java ecosystem, though beanspec is more common.
lombok.setter.flagUsage = [warning | error] (default: not set)
diff --git a/website/templates/features/With.html b/website/templates/features/With.html index 8b34f038..867c17eb 100644 --- a/website/templates/features/With.html +++ b/website/templates/features/With.html @@ -27,6 +27,15 @@ <@f.snippets name="With" /> <@f.confKeys> + <>
+ lombok.accessors.prefix += a field prefix (default: empty list) +
+ This is a list property; entries can be added with the += operator. Inherited prefixes from parent config files can be removed with the -= operator. Lombok will strip any matching field prefix from the name of a field in order to determine the name of the getter/setter to generate. For example, if m is one of the prefixes listed in this setting, then a field named mFoobar will result in a getter named getFoobar(), not getMFoobar(). An explicitly configured prefix parameter of an @Accessors annotation takes precedence over this setting. +
+ lombok.accessors.capitalization = [basic | beanspec] (default: basic) +
+ Controls how tricky cases like uShaped (one lowercase letter followed by an upper/titlecase letter) are capitalized. basic capitalizes that to withUShaped, and beanspec capitalizes that to withuShaped instead.
+ Both strategies are commonly used in the java ecosystem, though beanspec is more common.
lombok.with.flagUsage = [warning | error] (default: not set)
diff --git a/website/templates/features/experimental/Accessors.html b/website/templates/features/experimental/Accessors.html index 564ab66d..9a9385cb 100644 --- a/website/templates/features/experimental/Accessors.html +++ b/website/templates/features/experimental/Accessors.html @@ -4,9 +4,11 @@ <@f.history>

@Accessors was introduced as experimental feature in lombok v0.11.0. +

+ The lombok.config option lombok.accessors.capitalization = [basic | beanspec] was added in lombok v1.18.24.

- + <@f.experimental>
  • @@ -17,7 +19,6 @@
Current status: neutral - Some changes are expected. These changes are intended to be backwards compatible, but should start in an experimental feature:
    -
  • Open feature request: naming behaviour for properties that start with a lowercase letter followed by an uppercase letter. Half of specs, tools and lombok users prefer that a field named uLimit into getULimit (including lombok) and the other half turn prefer getuLimit. @Accessors may be involved in any update that addresses this request.
  • Open feature request: More control over naming accessors; for example to address creatively named boolean properties: Turn boolean wasRunning into boolean wasRunning() instead of boolean isWasRunning(), as well as more expansive prefix support. @Accessors will be involved if this feature request is addressed.
  • @Accessors currently does not 'cascade' from field @Accessors annotation to the class-level @Accessors annotation, but it does 'cascade' to lombok.config. Changing this is not difficult but backwards incompatible. It's not likely to break much existing code, but this needs to be decided on before the feature can move out of experimental status.
@@ -44,7 +45,7 @@

- The @Accessors annotation is legal on types and fields; the annotation that applies is the one on the field if present, otherwise the one on the class. When a @Accessors annotation on a field is present, any @Accessors annotation also present on the class the field is in, is entirely ignored, even for properties not configured on the field @Accessors. This in contrast to any lombok.config configuration keys which serve as fall-back default if any explicit @Accessors annotation doesn't specify. + The @Accessors annotation is legal on types and fields; the annotation that applies is the one on the field if present, otherwise the one on the class. When an @Accessors annotation on a field is present, any @Accessors annotation also present on the class the field is in, is entirely ignored, even for properties not configured on the field @Accessors. This in contrast to any lombok.config configuration keys which serve as fall-back default if any explicit @Accessors annotation doesn't specify.

@@ -63,6 +64,11 @@ lombok.accessors.prefix += a field prefix (default: empty list)
This is a list property; entries can be added with the += operator. Inherited prefixes from parent config files can be removed with the -= operator. Any class that either doesn't have an @Accessors annotation, or it does, but that annotation does not have an explicit value for the prefix parameter, will act as if @Accessors(prefix = {prefixes listed in configuration}) is present. +
+ lombok.accessors.capitalization = [basic | beanspec] (default: basic) +
+ Controls how tricky cases like uShaped (one lowercase letter followed by an upper/titlecase letter) are capitalized. basic capitalizes that to getUShaped, and beanspec capitalizes that to getuShaped instead.
+ Both strategies are commonly used in the java ecosystem, though beanspec is more common.
lombok.accessors.flagUsage = [warning | error] (default: not set)
-- cgit From d3b763f9dab4a46e88ff10bc2132fb6f12fda639 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 26 Oct 2021 15:59:59 +0200 Subject: [changelog] adding a few of @Rawi01's quality-of-life improvements in eclipse as an entry in the changelog. --- doc/changelog.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/changelog.markdown') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index cd8a4353..5c13e2e2 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -3,6 +3,7 @@ Lombok Changelog ### v1.18.24 "Edgy Guinea Pig" * FEATURE: Turning a field named `uShape` into a getter is tricky: `getUShape` or `getuShape`? The community is split on which style to use. Lombok does `getUShape`, but if you prefer the `getuShape` style, add to `lombok.config`: `lombok.accessors.capitalization = beanspec`. [Issue #2693](https://github.com/projectlombok/lombok/issues/2693) [Pull Request #2996](https://github.com/projectlombok/lombok/pull/2996). Thanks __@YonathanSherwin__! +* BUGFIX: Various save actions and refactor scripts in eclipse work better. [Issue #2995](https://github.com/projectlombok/lombok/issues/2995) [Issue #1309](https://github.com/projectlombok/lombok/issues/1309) [Issue #2985](https://github.com/projectlombok/lombok/issues/2985) [Issue #2509](https://github.com/projectlombok/lombok/issues/2509) ### v1.18.22 (October 6th, 2021) * PLATFORM: JDK17 support added. [Issue #2898](https://github.com/projectlombok/lombok/issues/2898). -- cgit