eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Build failures invalidly complaining that annotation processors are not allowed to delete files

Open
#4,212 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
49

Description

On a project that uses an APT that makes use of the `Filer` API, create a `FileObject` and subsequently call `….delete()` on it (example [here](https://github.com/spring-projects/spring-modulith/blob/81cc4c51277f8eeac0a1aac0606c2ef4fdd8efac/spring-modulith-apt/src/main/java/org/springframework/modulith/apt/SpringModulithProcessor.java#L132-L141)) causing the JDT build to fail with the error message shown below.

Image

What's the reason JDT rejects that operation if the APT API exposes such functionality?

Contributor guide

Open the contributing guide

Research direction

Start with the JDT build path handling the annotation-processing Filer API, especially FileObject creation followed by delete(), and compare it with the Spring ModulithProcessor.java example linked in the issue. Reproduce the reported diagnostic, then inspect the relevant JDT compiler entry points and tests to determine whether deletion should be accepted and what behavior or documentation would constitute resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.