Skip to content

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

Open
SimonThalvorsen wants to merge 2 commits intocfengine:masterfrom
SimonThalvorsen:ENT-13879
Open

ENT-13879: Expanded syntax-description to include if param is optional#6079
SimonThalvorsen wants to merge 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).

…r func

Ticket: ENT-13879
Changelog: title

Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
Comment thread libpromises/fncall.h

typedef union {
struct { int min, max; };
int raw[2];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please explain why the int raw[2] is there :)

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