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

Replace mitchellh/* with maintained forks #1546

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Dec 22, 2023

  • Replace mitchellh/cli with hashicorp/cli
  • Replace mitchellh/mapstructure with go-viper/mapstructure
  • Replace mitchellh/go-homedir with ?

@dbanck dbanck added the dependencies Auto-pinning label Dec 22, 2023
@dbanck dbanck self-assigned this Dec 22, 2023
@radeksimko
Copy link
Member

Replace mitchellh/cli with hashicorp/cli

👍🏻

Replace mitchellh/mapstructure with go-viper/mapstructure

👍🏻

Replace mitchellh/go-homedir with ?

I think we may be able to yank that dependency altogether. It needs double checking but since the library was born, there was some more work done in stdlib, specifically in os. Assuming it no longer requires CGO, the homedir.Dir() part could be replaced with os.UserHomeDir(). The stdlib still doesn't provide a convenience equivalent Expand() function but we could just copy these few LOC out into our codebase. 🤷🏻

There is still a risk of missing some edge cases described by Mitchell in mitchellh/go-homedir#20 (comment) but I think the cost vs risk here is in our favour given the size of our user base compared to e.g. Vagrant or Terraform (CLI), i.e. it's statistically less likely our users will run into these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Auto-pinning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants