Open SarahFrench opened 8 months ago
homedir
was added with https://github.com/GoogleCloudPlatform/magic-modules/pull/3971, following the guidance for upgrading to sdkv2. Copying the code for PathOrContents()
brought in the explicit dependency on homedir
, which is used to allow ~
to be included in the access token path or credentials path provided by the user.
The implementation of homedir
is primarily supporting multiple environments, which we would need to preserve. We might be able to do without the caching, in our particular case. Without a blessed alternative, it seems like the best option for this one would be to copy the Go source and test (2 files) directly into our repo. It is under MIT license: https://github.com/mitchellh/go-homedir.
hashstructure
is used in resourceComputeInstanceUpdate()
to hash the full compute disk object, for the purpose of quickly comparing disks (old val vs new val). We would need to preserve that behavior, but it doesn't necessarily need to be through the same hash function (or any hash function). hashstructure
also includes a lot of options and generalized behavior we don't need.
Recommendation would be to write a simpler hash function for compute disks (for example, a hash of the string representation). We could fall back to copying the hashstructure
implementation, but there would be a slightly larger maintenance burden. It uses MIT license: https://github.com/mitchellh/hashstructure.
Background
Mitchell Hashimoto / mitchellh announced that he's archiving multiple packages, including ones that are used in the Google providers:
Projects using these dependencies will continue to work, but if any updates are required then we'll need to migrate to using a fork.
What kind of contribution is this issue about?
Related PR(s), if any:
Details
There currently don't appear to be any official/endorsed forks for mitchellh/go-homedir or mitchellh/hashstructure