internal/schema: Replace TupleConsExpr
with SetExpr
#169
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.
Part of hashicorp/terraform-ls#496
The attributes in question will never be treated as data, so the data type doesn't really matter as much in this context. The main effect is hints in the completion and hover data.
Set seems most appropriate of all options (list, set, tuple), given that every element is of the same type (which rules out tuple) and order of elements doesn't matter (which rules out list).
The attributes in question will never be treated as data, so the data type doesn't really matter as much in this context. The main effect is hints in the completion and hover data.
Set seems most appropriate of all options (list, set, tuple), given that every element is of the same type (which rules out tuple) and order of elements doesn't matter (which rules out list).
UX Impact
(This implies hashicorp/hcl-lang#175 also in effect)
This has some relatively minor side effects in the completion and hover UX. One is mostly positive (experiments) and others are still okay (displaying singular instead of plural).
We can discuss whether the singular/plural thing is worth addressing and what the best version is there, but the PR is mainly meaning to solve the bug which is mis-rendering multiple constraints under collection types.
Also I am not sure if using more concrete description of a type, such as
experiment
is actually more helpful than justkeyword
. 🤷🏻Before
After