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

feat: special case true / false boolean values in variant config #801

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Apr 15, 2024

@pavelzw this should fix #691, although it doesn't attack the problem at the parsing level but later on, when we insert the values into minijinja.

I think I prefer this behavior although it might not be completely obvious.

We could also make it work at parsing time but we would need to change the type of the variant config to allow for either a string or a boolean value. I was too lazy to do that right now :)

We should note that if we change the type later (so that variatn config is a map of bool | string), then hashes would also change, if we don't continue to normalize them to strings.

@pavelzw
Copy link
Collaborator

pavelzw commented Apr 17, 2024

Sounds reasonable to me 👍🏻 I'm looking forward to a CEP for the variant file 😄

@wolfv
Copy link
Member Author

wolfv commented Jun 4, 2024

Hmm, this implementation is actually flawed because you can't opt out of the integer / bool thing by using "true" ...

So maybe we should do the proper thing.

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.

Values from variant file are always evaluated as a string and not boolean
2 participants