matrix: don't overwrite matrix eval context on attr only matrices #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Matrix blocks are used in several places and depending on the context we we need slightly different behavior when decoding them.
When we're decoding a "full matrix", i.e. one that must have variants and may have
include
andexclude
sub-blocks, we want to first decode the attributes and update thematrix
eval context so that it's available when decoding the next attribute or the the later blocks.When we're decoding
include
or excludeblocks
, they themselves are also decoded as an attrubute only matrix, but we don't want to update thematrix
eval context and instead want to inherit the parent matrix's eval context.This change makes that so, fixing a bug whereby the
matrix
block only included the parents eval context on the firstinclude
orexclude
block.We also end up pinning the version of
random
in our acceptance tests because a newly released version broke the test output that we expect. Since we only care about getting a diagnostic warning it should be fine to pin to that version.How to read this pull request
You may provide an optional explanation of the best way a review might
approach the changes that are being proposed in this pull request.
Checklist