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: module variables not evaluated properly #2877

Merged
merged 1 commit into from Feb 15, 2024

Conversation

aliscott
Copy link
Member

@aliscott aliscott commented Feb 9, 2024

This was causing a case where variables could not be evaluated properly if they were nested inside a module, that was inside another expanded module.

The moduleConfig would incorrectly store module.parent[0].module.child as the key instead of module.parent.module.child, since the unexpandedName was only making sure the child module part was unexpanded, not the full module address. This meant that the module was being skipped when evaluating the variable because at that stage we are looking up module.parent.module.child in the moduleConfig.

To fix this we use the block's original name to add the module to the moduleConfig since that should be fully unexpanded.

This was causing a case where variables could not be evaluated properly if they were nested inside a module, that was inside another expanded module.

The moduleConfig would incorrectly store `module.parent[0].module.child` as the key instead of `module.parent.module.child`, since the `unexpandedName` was only making sure the child module part was unexpanded, not the full module address. This meant that the module was being skipped when evaluating the variable because at that stage we are looking up `module.parent.module.child` in the moduleConfig.

To fix this we use the block's original name to add the module to the moduleConfig since that should be fully unexpanded.
@aliscott aliscott self-assigned this Feb 9, 2024
@aliscott aliscott marked this pull request as ready for review February 9, 2024 15:53
@aliscott aliscott requested a review from hugorut February 9, 2024 15:53
Copy link
Contributor

@hugorut hugorut left a comment

Choose a reason for hiding this comment

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

nice find

@aliscott aliscott merged commit 9c67a57 into master Feb 15, 2024
10 checks passed
@aliscott aliscott deleted the fix/module-call-input-evaluation branch February 15, 2024 08:15
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

2 participants