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

command/format: Fix rendering of unknown elements in set/map/list #20067

Merged
merged 4 commits into from
Jan 22, 2019

Conversation

radeksimko
Copy link
Member

Fixes #19998

The diff we produce may not be the best (see test cases), but the definition of "best" is kind of subjective here.

AFAIK 0.11 used to render [a, b, c] -> [a, (unknown), c] as

[
  a,
~ b -> (unknown),
  c,
]

but we now render it as

[
  a,
- b,
+ (unknown),
  c,
]

neither of which is not necessarily right or wrong. LCS is however most likely better than simple index-based comparison.

@radeksimko radeksimko requested a review from a team January 21, 2019 15:16
@hashicorp-cla
Copy link

hashicorp-cla commented Jan 21, 2019

CLA assistant check
All committers have signed the CLA.

@radeksimko radeksimko added this to the v0.12.0 milestone Jan 21, 2019
Copy link
Contributor

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

(Remember to complete the CLA process before merging this.)

@radeksimko radeksimko merged commit 7e0be7d into master Jan 22, 2019
@radeksimko radeksimko deleted the b-cmd-fmt-unknown-set branch January 22, 2019 16:09
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.12.0-alpha4 crash in plan diff printer
3 participants