dolmen
February 16, 2022, 1:59pm
1
The Go client API for Vault recently got a huge list of dependencies and many are not related to a library that is just a wrapper around REST API calls.
Details: Go API: too many dependencies · Issue #14017 · hashicorp/vault · GitHub
Apparently, the Vault development team considers that bloatware is not a bug but a feature.
Am I the only one to disagree?
As a user of that library, I have to take care of managing in my program the module versions brought by the packages I use. 45 modules is a huge list I have to take care of.
dolmen
February 16, 2022, 2:14pm
2
dolmen
February 18, 2022, 8:59am
3
I submitted a fix for that issue. Let’s see how it goes.
hashicorp:main
← dolmen-go:lighter-api-package
opened 08:26AM - 18 Feb 22 UTC
This simple copy of [a struct from package `sdk/logical`](https://pkg.go.dev/git… hub.com/hashicorp/vault/sdk/logical#WALState) allows a huge reduction of package dependencies: **144 packages removed** which were dragged by `sdk/logical` (almost halved).
This fixes #14017 and allows end-users of the vault/api package to have less dependencies to manage.
Before:
```console
$ go list -deps github.com/hashicorp/vault/api | wc -l
313
```
After:
```console
$ go list -deps github.com/hashicorp/vault/api | wc -l
169
```
That might not be the patch that the Vault dev team wants, but at least that shows that fixing that depdendency problem is possible and easy to do.
Cc: @hsimon-hashicorp @jefferai @vinay-gopalan