Having symbols in a yaml array is less natural than an array of strings, yet if you set an array of strings for custom_associations then Packwerk will simply ignore them without any error.
And actually, the example config itself has an array of strings:
Just convert them to symbols when assigning from yaml.
What should reviewers focus on?
Why wasn't Sorbet blowing up on this? There's a T.let assigning to an array of symbols, yet it was assigning an array of Strings, that should be a problem. 🤔
Type of Change
[ ] Bugfix
[ ] New feature
[X] Non-breaking change (a change that doesn't alter functionality - i.e., code refactor, configs, etc.)
Additional Release Notes
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Include any notes here to include in the release description. For example, if you selected "breaking change" above, leave notes on how users can transition to this version.
If no additional notes are necessary, delete this section or leave it unchanged.
What are you trying to accomplish?
Having symbols in a yaml array is less natural than an array of strings, yet if you set an array of strings for
custom_associations
then Packwerk will simply ignore them without any error.And actually, the example config itself has an array of strings:
https://github.com/Shopify/packwerk/blob/066bd486b355e7e2f5f0101fc8ad64735767deea/lib/packwerk/generators/templates/packwerk.yml.erb#L15-L17
What approach did you choose and why?
Just convert them to symbols when assigning from yaml.
What should reviewers focus on?
Why wasn't Sorbet blowing up on this? There's a
T.let
assigning to an array of symbols, yet it was assigning an array of Strings, that should be a problem. 🤔Type of Change
Additional Release Notes
Include any notes here to include in the release description. For example, if you selected "breaking change" above, leave notes on how users can transition to this version.
If no additional notes are necessary, delete this section or leave it unchanged.
Checklist