elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.41k stars 24.56k forks source link

Painless annotation validation #68323

Open nik9000 opened 3 years ago

nik9000 commented 3 years ago

As we've started adding more and more "annotations" to painless's method whitelist we're bumping into the need for annotations to validate things. Mostly its that some annotations only fit on certain kinds of methods. The @compile_time_only annotation that we added in #68088 can only go on from_class imported method and instant bindings and can't go on regular methods or augmentations, for example. But there are likely lots of examples I haven't thought of. For our own sanity, we need to make it easier to annotations to validate themselves.

elasticmachine commented 3 years ago

Pinging @elastic/es-core-infra (Team:Core/Infra)