redhat-developer / redhat-developer/vscode-java
Lombok `copyableAnnotations` (lombok.config) no longer applied to @RequiredArgsConstructor constructors in v1.55.0 (regression vs v1.54.0)
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
Describe the bug
Since updating from redhat.java v1.54.0 to v1.55.0 (picked up via extension auto-update around 2026-07-10, alongside a VS Code update to 1.129.1), the embedded Java Language Server no longer applies lombok.config's copyableAnnotations setting when Lombok generates a constructor via @RequiredArgsConstructor.
With a lombok.config:
config.stopBubbling = true
lombok.copyableAnnotations += org.springframework.context.annotation.Lazy
and a class:
@RequiredArgsConstructor
public class FooCustomImpl implements FooCustom {
@Lazy private final FooRepo baseRepo;
...
}
the generated constructor parameter is expected to carry @Lazy (this is a standard Spring pattern to break a circular bean dependency between a Spring Data repository interface and its *CustomImpl fragment, by injecting a lazy proxy).
Confirmed via bytecode inspection (javap -v Foo.class | grep -A4 RuntimeVisibleParameterAnnotations):
- Compiling the same source file via the project's Maven build (
javac) →@Lazyis present on the constructor parameter. - Compiling the same file standalone, in batch mode, using the extension's own bundled ECJ (
org.eclipse.jdt.core.compiler.batch) + the extension's own bundled Lombok agent (lombok-1.18.39-4050.jar, extracted straight from the extension'slombok/folder) →@Lazyis present. - Compiling via the running jdt.ls inside VS Code with the extension at v1.55.0 →
@Lazyis missing, reproducible across multipleJava: Clean Java Language Server Workspaceresets. - Downgrading only the extension to v1.54.0 (
code --install-extension redhat.java@1.54.0 --force), same project, samelombok.config, same steps →@Lazyis present again.
Also tried disabling the built-in Lombok support and pointing java.jdt.ls.vmargs at an explicit -javaagent:.../lombok-1.18.46.jar (project's own Lombok version) with java.jdt.ls.lombokSupport.enabled: false — same failure on v1.55.0, which rules out the specific Lombok jar/version as the cause and points at v1.55.0's jdt.ls integration itself.
Impact
Spring Boot fails to start with:
APPLICATION FAILED TO START
The dependencies of some of the beans in the application context form a cycle: ...
only when the app is run/debugged from inside VS Code. Running the identical code via mvn spring-boot:run on the command line always works, since that always compiles with javac.
To Reproduce
- Project with a
lombok.configcontaininglombok.copyableAnnotations += org.springframework.context.annotation.Lazy(or any non-default copyable annotation). - A class with
@RequiredArgsConstructorand a@Lazy-annotatedfinalfield. - Open/run the project in VS Code with
redhat.javav1.55.0. - Inspect the compiled class's constructor parameter annotations, or observe the Spring circular-dependency startup failure.
Expected behavior
The generated constructor parameter should carry the @Lazy annotation, matching javac/Maven output and the extension's own bundled Lombok agent when run standalone.
Versions
- VS Code: 1.129.1 (macOS, auto-updated ~2026-07-10)
redhat.java(Language Support for Java): regression present in 1.55.0; confirmed absent in 1.54.0- Bundled Lombok agent in extension:
lombok-1.18.39-4050.jar - Project's own Lombok version: 1.18.46 (ruled out as the cause, see above)
- OS: macOS, darwin arm64
- JDK: Temurin 21
Workaround
Pin the extension to v1.54.0 and set "extensions.autoUpdate": false to avoid silently regressing again.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用所示的 lombok.config 和 @RequiredArgsConstructor 示例,复现 redhat.java v1.55.0 jdt.ls 集成中的回归。将生成的构造函数参数注解与 javac、随附的 ECJ/Lombok 批处理设置以及 extension v1.54.0 进行比较;通过正在运行的 language server 编译时存在 @Lazy 即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100