Closed bbannier closed 4 months ago
I made another pass over this. It seems that this wasn't a bug after all, just an API which could be easily misused, see e.g., https://github.com/zeek/zeek/pull/3699. All this should be helped by using the same attribute name in Spicy and HILTI. I removed the new test since we already had a test which showed that Spicy hook priorities worked correctly.
While in Spicy code hook priorities are spelled
priority
in HILTI code and also in our handling of its AST the corresponding attribute is still called&priority
. We also do not perform any translation of "Spicy attributes" to "HILTI attributes", so us usingpriority
as attribute name for Spicy lead to Spicy priorities being ignored. This seems to have been broken since at least 2020.This patch fixes Spicy AST generation to emit attributes named
&priority
instead of the previouspriority
to be consistent with the HILTI handling. We also add a test validating that Spicy hook priorities are handled correctly.