Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue992 - re-parse values using correct type for add_options from flow_callbacks. #999

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

petersilva
Copy link
Contributor

@petersilva petersilva commented Mar 24, 2024

close #992

repackaging of stuff from work with @mshak2 on wis2... there were enough patches that it made sense to deal with this separately. The problem is explained in #992. when options were declared in callbacks, and their type was not list (the default) they would be parse as lists anyways, because parsing encountered the type declarations after already having parsed the values.

At the end of option processing... there is already logic to re-examine "undeclared" variables. The existing logic removes variables that were declared in callbacks from the undeclared lists so that we don't generate bogus "undeclared" messages. These patches add, that when you find a declared option... re-parse the value to have it match the type declared for the option.

The string parsing for set values, was done weirdly with code in two places, Since we now needed it in a third place, the original two were consolidated into a set value parsing routine, and call it from all three places.

@petersilva
Copy link
Contributor Author

discussed and blessed.

@petersilva petersilva merged commit 8e10b01 into development Mar 25, 2024
50 of 70 checks passed
@petersilva petersilva deleted the issue992 branch May 15, 2024 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type of options added with add_option wrong...
2 participants