Skip to content

Conversation

@nigoroll
Copy link
Member

@nigoroll nigoroll commented Jul 2, 2025

With a lot of folding going on, the warnings can easily bury more relevant CLI output.

@nigoroll nigoroll added the a=RunByUPLEX This PR is being run by UPLEX in production label Jul 2, 2025
@nigoroll nigoroll force-pushed the silent branch 2 times, most recently from 985258f to ee1c7b9 Compare September 16, 2025 07:43
@nigoroll
Copy link
Member Author

nigoroll commented Oct 7, 2025

bugwash with @bsdphk : +silent sounds too general, as if we would suppress +log or other errors.
We discussed several options, and ended with the usual "write the docs first to see how it works" (which I had done for +silent, but did not see the problem with it).

So I have adjusted the docs but also the rest of the PR, just because it's easy enough.

@nigoroll nigoroll changed the title vcc_acl: Add +silent acl option to omit +fold warnings vcc_acl: Add +fold,noreport modifier omit +fold warnings Oct 7, 2025
@nigoroll
Copy link
Member Author

I have updated the patch to the last suggestion with the sub-flag in parenthesis, but I stuck with report, because the fold reports are just that, not really warnings. warn was brought back on the table as a generic flag, but this is a sub flag for fold.

From the docs:

Exactly one sub-flag is supported following fold in parenthesis:

  • +fold(+report) - Fold with reporting (default)

    Report about folding as described above

  • +fold(-report) - Fold without reporting

    Enable folding, but do not output folding-related warnings during VCL
    compilation

The report sub-option is only valid with +fold.

@nigoroll nigoroll changed the title vcc_acl: Add +fold,noreport modifier omit +fold warnings vcc_acl: Add +fold(-report) sub-flag omit +fold warnings Nov 12, 2025
} else if (vcc_IdIs(tl->t, "fold")) {
acl->flag_fold = sign;
vcc_NextToken(tl);
vcc_parseAclFold(tl, sign);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should stop the loop if we failed in vcc_parseAclFold, otherwise we might get double error reporting. Maybe we can turn the loop into a while (!tl->error) ?

to reduce nesting in the next commit
With a lot of folding going on, the warnings can easily bury more relevant CLI
output.
@nigoroll nigoroll merged commit 155e834 into varnishcache:master Nov 19, 2025
1 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a=Bugwash Today a=RunByUPLEX This PR is being run by UPLEX in production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants