Skip to content

ENT-13879: Expanded syntax-description to include if param is optional#6079

Merged
olehermanse merged 2 commits intocfengine:masterfrom
SimonThalvorsen:ENT-13879
Apr 24, 2026
Merged

ENT-13879: Expanded syntax-description to include if param is optional#6079
olehermanse merged 2 commits intocfengine:masterfrom
SimonThalvorsen:ENT-13879

Conversation

@SimonThalvorsen
Copy link
Copy Markdown
Contributor

Ticket: ENT-13879
Changelog: title

@SimonThalvorsen
Copy link
Copy Markdown
Contributor Author

cfengine/cfengine-cli#74

@SimonThalvorsen SimonThalvorsen marked this pull request as draft April 20, 2026 14:47
@SimonThalvorsen SimonThalvorsen force-pushed the ENT-13879 branch 4 times, most recently from 1e71add to 6ad9bba Compare April 22, 2026 13:46
Comment thread libpromises/syntax.c Fixed
Comment thread libpromises/syntax.c Fixed
@SimonThalvorsen SimonThalvorsen marked this pull request as ready for review April 22, 2026 14:28
@olehermanse olehermanse requested a review from larsewi April 22, 2026 14:52
Comment thread libpromises/syntax.h Outdated
Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/syntax.c Outdated
Copy link
Copy Markdown
Member

@olehermanse olehermanse left a comment

Choose a reason for hiding this comment

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

Looks good overall, just some smaller suggestions.

@olehermanse
Copy link
Copy Markdown
Member

olehermanse commented Apr 22, 2026

@SimonThalvorsen When this one is done and merged, you should try to adjust cf-promises / cf-agent to also use these minimums and maximums. Right now, before this change, there is no way to know if a call has too many args without actually running it (IIRC). With this new info, cf-promises could detect more errors earlier.

(Do this in a separate PR).

Comment thread libpromises/fncall.h Outdated
Copy link
Copy Markdown
Member

@olehermanse olehermanse left a comment

Choose a reason for hiding this comment

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

Please adjust FnArgcRange as discussed above - union can be removed or raw could be used and there could be an explaining comment.

…r func

Ticket: ENT-13879
Changelog: title

Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
@olehermanse olehermanse merged commit 455f629 into cfengine:master Apr 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants