ASSERT-KTH / royal-chaos

Chaos engineering systems invented at KTH Royal Institute of Technology. http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-320638
MIT License
132 stars 27 forks source link

Annotation Processor Error #38

Open pmarchione opened 3 years ago

pmarchione commented 3 years ago

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 commented 3 years ago

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

gluckzhang commented 3 years ago

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:

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