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

fix so dict val parsing isn't deferred #1773

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

Conversation

aryeh
Copy link

@aryeh aryeh commented Sep 9, 2022

Currently, you cannot reference another value within the cookiecutter.json file if the referenced value is a dict, because those values are deferred to a second pass for parsing. The cookiecutter.json is parsed as an OrderedDict, therefore there is no benefit to do multiple passes as it only prevents the use of some vars (dicts) in later values. If a val depends on another value within the json file, it only needs to be put earlier/higher within the file and then can be used anywhere later in the file.

Currently, you cannot reference another value within the cookiecutter.json file if the referenced value is a dict, because those values are deferred to a second pass for parsing.  The cookiecutter.json is parsed as an OrderedDict, therefore there is no benefit to do multiple passes as it only prevents the use of some vars (dicts) in later values.  If a val depends on another value within the json file, it only needs to be put earlier/higher within the file and then can be used anywhere later in the file.
Copy link
Member

@kurtmckee kurtmckee left a comment

Choose a reason for hiding this comment

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

@aryeh It appears that this change has caused the test suite to fail.

Please rebase on main (or merge main into this branch), verify that the test suite passes, and add tests that demonstrate that this feature is working. Thanks!

@ericof
Copy link
Member

ericof commented Jun 13, 2023

@aryeh Tests are failing. Could you check it, please?

@ericof ericof requested a review from jensens June 13, 2023 13:47
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

4 participants