My types.zeek in ‘plugin/scripts’ is not preloaded.
I have created a plugin using zkg create --feature plugin --packagedir foobar. zkg.meta contains the following:
[template]
source = https://github.com/zeek/package-template
version = v3.1.7
zkg_version = 3.0.1-33
features = plugin
The created C++ code now needs a zeek type. I have inserted this type in plugin/scripts/types.zeek (and made sure that this file is loaded by plugin/scripts/__preload__.zeek).
Whether I install the plugin using zkg install or by calling zeek directly (whereby I have inserted the package folder in ZEEK_PLUGIN_PATH), I get the error message that my zeek type was not found.
If I now copy the __preload__.zeek and types.zeek from plugin/scripts to scripts, then both methods work as expected, my type is found and the plugin is working
What surprises me is that the build process creates a link to scripts in the build directory. I would expect this to point to plugin/scripts.