Non-obvious interaction @if &analyze and @load in deactivated context #3098
Labels
Implementation: Core
Implementation requires modification of the Zeek core
Type: Bug 🐛
Unexpected behavior or output.
Looking more at #3093, one surprising behavior of
@if &analyze
is that a@load
is recognized and processed in a non-activated context. A later@load
for the same file in an activated context is, however, is then skipped and the code never activated.This seems non-obvious and gotcha behavior and probably just a bug. For the time being I'd make a
@load
not happening in a non-activated context at the cost of missing out on the coverage. The more proper fix might be to re-parse the file in activated mode instead.The following test fails with:
It's obvious in the test case, but can imagine it being quite difficult to trace back for users in more complex examples and common utility scripts. Concrete behavior was the docs generation producing an empty
trim-trace-file.rst
after switching to@if &analyze
.The text was updated successfully, but these errors were encountered: