-
Notifications
You must be signed in to change notification settings - Fork 540
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
glide get
deletes all comments from glide.yaml
#691
Comments
Yaaaaargghhhh...yes, it's not OK that we do this, and you're exactly right about why it happens. Your particular use case is even one that I've literally recommended - pinning a dep is a rather drastic measure that should be temporary, and come with an explanatory comment. This is gonna require a wholly different approach to how we write out the config files. |
looks like upstream has discussed this before: go-yaml/yaml#132 |
Just thinking out loud here: a workaround, without switching to/waiting for a comment-preserving yaml parser, might be to just add a new key |
i'd be open to that. @mattfarina ? |
We've found that in practice, when we pin a dependency to a particular version, we like to leave a comment indicating why that version is needed, a link to an upstream issue, etc. next to the explicit version.
It looks like running
glide get
or one of the glide commands that can editglide.yaml
will however delete all comments.I'm guessing this is because it parses it -- discarding comments -- then edits the in-memory conf representation before writing the whole thing back out at once, thus deleting the original comments.
The text was updated successfully, but these errors were encountered: