Skip to content
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

fix encoding RawMessage that contains leading space #136

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

extemporalgenome
Copy link
Contributor

This library currently returns a syntax error when asked to encode
a RawMessage that happens to contain leading space byte(s).
Since some space bytes are valid JSON, these should be accepted.

This behavior also deviates from the stdlib,
which does not assume that a provided RawMessage is free of leading spaces.

@extemporalgenome extemporalgenome changed the title fix encoding RawMessage that contains leading space. fix encoding RawMessage that contains leading space Nov 25, 2023
@extemporalgenome extemporalgenome marked this pull request as ready for review November 25, 2023 20:25
@@ -19,7 +19,7 @@ test-json:
go test -cover -race ./json

test-json-bugs:
go test -cover -race ./json/bugs/...
go test -race ./json/bugs/...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for removing the coverage for this run?

Copy link

@nainya nainya Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got reply over slack: https://twilio.slack.com/archives/G01CPV0P0SE/p1701104274453339?thread_ts=1701100801.803679&cid=G01CPV0P0SE

Coverage is non-applicable, since it only covers non-test code in the same package. Since those bug packages have no non-test code, sampling coverage has no benefit.
I'm pretty sure whomever set up the makefile just copy-pasted the same command to each target

@extemporalgenome extemporalgenome merged commit 6dfc1b0 into master Nov 27, 2023
7 checks passed
@extemporalgenome extemporalgenome deleted the fix-encode-rawmessage-leading-space branch November 27, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants