Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation Processor Error #38

Open
pmarchione opened this issue Jun 21, 2021 · 2 comments
Open

Annotation Processor Error #38

pmarchione opened this issue Jun 21, 2021 · 2 comments
Assignees

Comments

@pmarchione
Copy link

When trying to implement the Annotation Processor in our code, a syntax error is shown stating that the annotation is "disallowed for this location". It does not matter if the annotation is written in the correct location or some other random location in the code, the error appears every time.

@gluckzhang
Copy link
Member

Thanks @pmarchione for reporting this. I will take a look asap and come back to you with more details :)

@gluckzhang gluckzhang self-assigned this Jun 22, 2021
@gluckzhang
Copy link
Member

Hi @pmarchione , after trying some projects with ChaosMachine's annotation processor, I find that this is related to the version of Spoon that you are using. I also had the warning messages about "annotation disallowed for this location". But with Spoon version 7.4.0-beta-12 this does not prevent the processor from generating the configuration file.

For your reference, here is a concrete example of using ChaosMachineAnnotationProcessor in a real project: https://github.com/gluckzhang/DemoSite/tree/demo-for-cap

What I did in this project includes:

  • Build ChaosMachineAnnotationProcessor and import the jar file in the target project. This could be configured in the Maven pom.xml file. See here
  • Add some annotations in file SavedPaymentServiceImpl.java
  • Run mvn package in folder site and then there should be a perturbationPoints.csv generated in this folder

I will update the README to clarify this. Will also discuss this warning message with the Spoon team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants