Closed jbardin closed 4 years ago
Merging #118 into master will increase coverage by
0.02%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #118 +/- ##
=========================================
+ Coverage 68.98% 69% +0.02%
=========================================
Files 98 98
Lines 10323 10324 +1
=========================================
+ Hits 7121 7124 +3
+ Misses 2873 2871 -2
Partials 329 329
Impacted Files | Coverage Δ | |
---|---|---|
hcl/hclsyntax/expression.go | 62.9% <100%> (+0.27%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5b39d9f...c899efe. Read the comment docs.
While there might be room to improve the unification algorithm, after digging in to this, I think unify just wasn't quite the right tool for the expression as a whole. It still appears to be part of the solution, as the logic seems sound for cases where both values are known, but the unknown cases don't need unification, because they are disjoint.
If an expression in a conditional contains a DynamicVal, we know that the opposing condition can pass through with no conversion since converting to a DynamicPseudoType is a noop. We can also just pass through the Dynamic val, since it is unknown and can't be converted.