redhat-developer / redhat-developer/vscode-java

Annotation Processor works strange

Open
#2,333 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

annotation-processing Maven
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I am writing an anotation processor, add test the vscode support. In idea it works fine.
I write some log logic (write log information to a file with absolute path, and in the init method and static method, log something too) in the apt to promise I can judge whether it runs.
The pom setting works fine, because the maven clean install works fine with the log print out.
However my apt not runs in vscode. No log file is generated. (It will be created if non-exist).
On the other hand, If I write some space in the pom.xml and save. The log file generated, and show some initialized information. It seems my apt run when the vscode find pom.xml changed.
But when I change some code and run the changed code , no log out, it seems that my apt not run at all.

Environment
  • Operating System: windows
  • JDK version: 11
  • Visual Studio Code version: 1.64.2
  • Java extension version: 1.3.0
Steps To Reproduce
  1. change maven pom.xml with annotaton processing support
  2. save the change
  3. change some code
  4. run

The apt projcet
Please use the asm branch
The log file path define here, I have changed it to ~/jasync.log for device independent.
The test project

Current Result

After step 2, my apt runs.
After step 4, my apt not runs.

Expected Result

After step 2, my apt runs.
After step 4, my apt runs.

Additional Informations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported reproduction: the Maven pom.xml in the asm branch and the annotation processor's Logger.java at line 19, then follow the VS Code Java extension's annotation-processing entry point. Reproduce steps 1–4 with JDK 11 and VS Code 1.64.2; done means the processor runs and logs after code changes, not only after pom.xml changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.