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
reference: ParseNamed updated to enforce canonical format #2142
reference: ParseNamed updated to enforce canonical format #2142
Conversation
LGTM |
Current coverage is 51.21% (diff: 75.00%)@@ master #2142 diff @@
==========================================
Files 125 125
Lines 11448 11435 -13
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 7008 5856 -1152
- Misses 3552 4833 +1281
+ Partials 888 746 -142
|
Needs a rebase. |
96c40bf
to
08808ce
Compare
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
The registry uses partial Named values which the named parsers no longer support. To allow the registry service to continue to operate without canonicalization, switch to use WithName. In the future, the registry should start using fully canonical values on the backend and WithName should no longer support creating partial values. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
08808ce
to
d8fcbee
Compare
Rebased and tests passing, this change should get a review from @stevvooe though |
@dmcgowan Should |
@stevvooe wdyt? Not returning an error so it could be combined with other methods |
@dmcgowan That's not exactly what I mean. Usually, |
@stevvooe understood. I would like to see |
@dmcgowan This package seems like it is experiencing some serious bloat. I am not sure if I have the full context to add anything here, but LGTM |
Updates the
ParseNamed
function to require that the input be in canonical form. Throws an error if the input is not canonical. This protects against usingParseNamed
to create partialNamed
values. These partial values can still be created explicitly throughWithName
andParse
, as used now used by the registry server.In the future, the registry should start using fully canonical values on the backend and
WithName
should no longer support creating partial values.