-
Notifications
You must be signed in to change notification settings - Fork 147
Conversation
This is a really simple file format! Easy to read, write, and parse, even in raw shell scripting. +1 here |
Do you envision specifying version ranges or constraints in this format somehow later, or planning to keep it really simple? |
This package just parses the file into wrt. questions about ranges and constraints, the decision in #536 is to use this file to specify a direct mapping of import path prefix to version number. Maybe if gb is extended to work with libraries, ranges could be added, but that's up to the calling code to interpret it, not this package. |
@kostya-sh yup, that's about the size of it. I'm tired of JSON's inability to deal with numbers, and there are no other encodings save text/csv and xml in the standard library, so this will suffice. |
Right, makes sense -- I was just curious if you think this format is
expressive enough to cover that use case (which is likely to come up
eventually). 👍
|
@tianon should be, it's just
|
Yeah, apologies -- I didn't want to get this straying too far from the actual file format (since how to use the file format for dependencies is definitely a separate discussion), but IMO thinking about the use case for the format is helpful when designing it. 👍 Seems sane enough to me! |
One case which is not covered is quoting whitespace. I don't plan to add it til it is needed. |
@davecheney, I am actually quite like this format. Still I beleive having a single format for all Go dependency management tools would be better. Very minor nit: depfile is not very suitable name for a package does not assign semantic meaning to the contents of the map[string]map[string]string |
I'll probably move this package out of gb, I think it'll be called taggedkv. re: no single format, yes I am disappointed as well.
|
This package parses an io.Reader consisting of key/value pairs into a
map[string]map[string]string
. The format of the line isThe intention is this package will be used to parse a dependency file, or
depfile
, consisting of lines like thisnote: this package does not assign semantic meaning to the contents of the
map[string]map[string]string
.