-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Lock command removes comments from configuration file #170
Comments
What are your use cases for comments? |
The basic use case is that I have a gitman.yml with a bunch of source dependencies. |
This would require using a different YAML library (https://stackoverflow.com/a/27103244/429533) in the upstream YAML library. I might consier this down the road, but this would be a pretty major change. We could add a
I would eventually like to address this in the upstream YAML library. |
I do understand the impact. Maybe another solution is not to modify the gitman.yml and store the An extension of this could be to use the untouched gitman.yml as a template and just replace the Just some ideas... |
I agree that this would be nicer and if I were building this again today, I think I would have opted for a separate lock file. Let's consider this a feature request for 2.0. 😄 |
Could we tag this to group feature request for gitman 2.0? |
I'm working on rewriting the underlying YAML library with the intention of being able to preserve comments: https://github.com/jacebrowning/datafiles |
|
A given gitman.yml like:
will be transformed after a lock operation to:
Unfortunately, most importantly the comments are removed and secondly the structure of the gitman.yml will be changed.
In this matter, all available but unused parameters for an source entry will be added.
I see the benefit to keep the comments and also not to spoil the gitman.yml with unused settings (at least for the
sources
section.Maybe it is an approach to seperate the
source_locked
section in a seperate file.The text was updated successfully, but these errors were encountered: