-
Notifications
You must be signed in to change notification settings - Fork 1k
Formating arrays in Gopkg.lock makes it undiffable #972
Comments
mmm yeah, this is a very good point. we quite intentionally sort those packages in order to produce diffable output, but don't output them one per line, which makes the sorting pointless. (in the meantime, |
The TOML lib doesn't have any settings so that you can tweak the output formatting yet. I think if we wanted to add something like this (and I agree the current formatting is hard to read, let alone diff), the place to start looking would be herey |
The TOML lib doesn't have any settings so that you can tweak the output formatting yet. I think if we wanted to add something like this (and I agree the current formatting is hard to read, let alone diff), the place to start looking would be here. |
Adding formatting options seems like a good idea to me. Seems like you are using toml.Marshal, I just wouldn't add the options to this method (to keep it consistent with other uses of Marshal in go), but maybe a MarshalWithOptions that takes a struct that defines a few formatting options? |
This week we started using It’s great, with one exception: the diffs for The logical fix (to us, anyway) would be to sort the OK if we submit a pull request that implements this? |
I thought this was already fixed dep in 0.4.x. Merged here: #1461 |
Ah, maybe what we have is a subtly different issue, perhaps created by the fix for this bug (multi-line arrays). The packages array can be several lines long, pushing |
|
What version of Go (
go version
) anddep
(git describe --tags
) are you using?go version go1.8.3 linux/amd64
dep - v0.3.0-22-g11758a7
This is part of my Gopkg.lock file. If I ever change one of these packages that will be one ugly diff :/ I am not sure if this is a limitation of TOML or
dep
just doesn't apply formatting there but did you consider doing one package per line?The text was updated successfully, but these errors were encountered: