eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Build failures invalidly complaining that annotation processors are not allowed to delete files
- 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.
What's the reason JDT rejects that operation if the APT API exposes such functionality?
Contributor 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