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

gocty type alias support #18

Merged
merged 2 commits into from
Apr 24, 2019
Merged

gocty type alias support #18

merged 2 commits into from
Apr 24, 2019

Conversation

paultyng
Copy link
Contributor

Each commit is discrete, happy to open multiple PRs if you prefer (or just close this if you aren't interested).

@paultyng
Copy link
Contributor Author

The Change interface change (and related struct changes) are breaking, so care necessary there probably.

@apparentlymart
Copy link
Collaborator

This diff package is, to be honest, kinda abandoned at this point. I eventually concluded it better to just retain full old/new values and produce a visual diff for humans when needed, as Terraform does.

I'm okay with making changes to it if you see a useful reason for it, and wouldn't worry at all about backward compatibility in cty/diff in particular (there should be no callers of it because it doesn't actually work) but on the other hand maybe there's enough stuff in this codebase already that this would be better off split out into its own repository and maintained separately, so that cty can get a v1.0.0 release without this experimental functionality in it.

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #18 into master will increase coverage by 0.02%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   75.01%   75.04%   +0.02%     
==========================================
  Files          77       77              
  Lines        5684     5678       -6     
==========================================
- Hits         4264     4261       -3     
+ Misses       1044     1042       -2     
+ Partials      376      375       -1
Impacted Files Coverage Δ
cty/path.go 64.7% <0%> (-4.05%) ⬇️
cty/gocty/out.go 65.18% <100%> (-0.14%) ⬇️
cty/convert/compare_types.go 97.61% <0%> (+4.76%) ⬆️

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 fd76348...98750b6. Read the comment docs.

@paultyng
Copy link
Contributor Author

@apparentlymart just found a minor bug in gocty, I can split it out to a new PR, basically issues handling alias types (JSON does, so I looked at its implementation). I've only tested strings, now looking at other primitives.

@paultyng
Copy link
Contributor Author

I'm fine with losing the diff functionality, the Path helpers may be useful to others though to start paths (for example, in error messages).

@paultyng paultyng changed the title A few minor convenience things after using the package gocty type alias bugs Apr 24, 2019
@paultyng paultyng changed the title gocty type alias bugs gocty type alias support Apr 24, 2019
@apparentlymart apparentlymart merged commit a56900c into zclconf:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants