Relax acceptable XS-Go-Import-Path syntax#305
Open
rhansen wants to merge 2 commits intoDebian:masterfrom
Open
Conversation
Explicitly allow maintainers to add a trailing comma for VC-friendly
multiline values:
XS-Go-Import-Path:
example.com/foo,
example.com/bar,
Currently all code that consumes the map returned from
`getGolangBinaries` ignores the empty string entry, so this commit
should not change behavior at all. However, this commit improves
readability by making it easy to see what happens in this corner case;
developers don't need to look at every caller of `getGolangBinaries`
to see how the empty string entry is handled. It is also defensive;
it avoids surprises for any future consumers of `getGolangBinaries`.
For example:
XS-Go-Import-Path:
example.com/foo
example.com/bar
This avoids forcing package maintainers to look up whether a trailing
comma after the final item is allowed or not. (Separating by
whitespace or permitting a trailing comma makes it easier to construct
a readable and VC-friendly multiline list of values.) Spaces cannot
exist in a module path, so there is no risk of parsing ambiguity.
The make subcommand doesn't produce space-separated lists, and
dh-golang doesn't yet support it, so this is just a step towards
generally allowing it everywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR relaxes how
XS-Go-Import-Pathvalues are parsed to improve maintainer friendliness:XS-Go-Import-Path(in particular, ignore a trailing comma).