zeek / spicy

C++ parser generator for dissecting protocols & files.
https://docs.zeek.org/projects/spicy
Other
246 stars 35 forks source link

spicyc -x is accidentally namespacing spicy version information incorrectly. #1823

Closed sethhall closed 1 month ago

sethhall commented 1 month ago

If I run spicyc -x foo foo.spicy, it generates foo___linker__.cc with the following two lines in it....

const char HILTI_EXPORT HILTI_WEAK * __hlt_foo_hlto_library_version = R"({"debug":false,"hilti_version":11100,"magic":"v1"})";
const char HILTI_EXPORT HILTI_WEAK * __hlt_foo_hlto_bind_to_version = spicy_version_1_11_0();

Those lines need to be generated without the _foo so that the resulting .hlto file will load correctly