-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature to use YAML in .butane #62
Comments
Or TOML. Anything but JSON, really. ;-) |
Hmm, talk me through the rationale. Why? I certainly won't claim that JSON is perfect, but it's human-readable and ubiquitous. TOML is better for configuration files, but that's not really what these are. I've never been a big fan of YAML due to the indentation-dependence and general complexity, but I'll grant that it's more human-writable than JSON. But these files aren't supposed to be written by humans, they're just a persisted representation of state intended to be operated on only by the butane library/cli. Moreover, regardless of the merits of any particular format I do think there's value in having a single format. Otherwise either everybody working on a project using the non-default format has to compile their Butane CLI with special flags when installing it, or the CLI needs to support all the formats by default and try to intelligently figure out which one any given project is using. Which is certainly doable, but it seems undesirable. None of this is to say I'm set against it, I just want to understand the why before it goes forward. |
The reason is JSON is terrible for being stored in a repository, especially if the file will change. The |
Another example of the problem is handling merge conflicts. Line based formats handle merge conflicts better. This is most obvious in |
Overall, the source control diff rationale makes sense and seems like a good motivation for a different format. I'm curious to hear more about how checking the diff of |
The code review of |
Would you mind if I created a feature to use serde_yaml to use YAML instead of JSON for the files under
.butane
?The text was updated successfully, but these errors were encountered: