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

Eliminate different yaml parsing/serializing dependencies #265

Closed
ahmetb opened this issue Jul 17, 2019 · 0 comments · Fixed by #266
Closed

Eliminate different yaml parsing/serializing dependencies #265

ahmetb opened this issue Jul 17, 2019 · 0 comments · Fixed by #266
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@ahmetb
Copy link
Member

ahmetb commented Jul 17, 2019

Looks like we ended up with 3 different yaml parses in this repo (oops).

  1. k8s.io/apimachinery/pkg/util/yaml (originally used) used in pkg/index/indexscanner to parse plugin manifest files
  2. gopkg.in/yaml.v2 used by cmd/validate-krew-manifest
  3. github.com/ghodss/yaml used in pkg/receipt and pkg/info (added in Save install receipt #195)

Ideally, I'd be eliminating number 2 & 3. However, it looks like k8s.io/apimachinery/pkg/util/yaml actually doesn't know how to serialize yaml (no marshal method).

Looks like (https://godoc.org/k8s.io/apimachinery/pkg/util/yaml?import-graph&hide=1) that package is depending on sigs.k8s.io/yaml which depends on gopkg.in/yaml.v2. So I'll probably just depend on sigs.k8s.io/yaml instead.

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants