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

YAML - On load, convert all scalar types to strings #929

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

MLBZ521
Copy link
Contributor

@MLBZ521 MLBZ521 commented Jan 30, 2024

This change will use the YAML SafeConstructor to safely load YAML data and auto-convert scalar types to strings to provide a consistent experience with AutoPkg's current behavior and data type expectations.

Basically this change will perform a very similar result as what I proposed in #911, however, it will only convert scalar types while preserving non-scalar types. Doing it this way should prevent any issues with current recipes.

I think, short term, this is a better option that what I proposed in #911.

Long term, I think updating the do_variable_substitution function (or update_data function as whole) would create the best experience as suggested by @jgstew here. This would give recipe writers more flexibility and allow more data types to be passed through AutoPkg steps.

This change will use the YAML SafeConstructor to safely load YAML data and auto-convert scalar types to strings to provide a consistent experience with AutoPkg's current behavior and data type expectations.
@MLBZ521 MLBZ521 changed the base branch from master to dev January 30, 2024 16:07
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.

None yet

1 participant