-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
feat: add sonic json support #3184
Conversation
It seems not completely drop-in. |
IMO we provide the ability and whether to use should depend on users. we can add more statement in readme. |
@RainshawGao please update ci, see #3214 |
Codecov Report
@@ Coverage Diff @@
## master #3184 +/- ##
==========================================
- Coverage 98.37% 98.36% -0.02%
==========================================
Files 43 42 -1
Lines 3148 3124 -24
==========================================
- Hits 3097 3073 -24
Misses 38 38
Partials 13 13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
unit test error on sonic tag. |
The better solution is for us to identify those incompatible scenarios and then provide compatibility code to ensure the ease of use of the Gin framework. We should add some |
done, but the fail ci test should be considered more.... golang/go#25956 indicates whether one failed test in ci should be designed or modified still needs discussion. |
I dig into the fail test cases, all these cases are about trying to use Should this behavior must be the same? |
c7d9ee0
to
25caaee
Compare
@Bisstocuz @thinkerou sonic has fixed the fail tests, see Rainshaw#1 with action https://github.com/RainshawGao/gin/actions/runs/2607644458 |
@@ -11,7 +11,7 @@ TESTTAGS ?= "" | |||
test: | |||
echo "mode: count" > coverage.out | |||
for d in $(TESTFOLDER); do \ | |||
$(GO) test -tags $(TESTTAGS) -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \ | |||
$(GO) test $(TESTTAGS) -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(GO) test -tags "$(TESTTAGS)" -v ...
and test-tags is:
test-tags: ['', 'nomsgpack', 'sonic avx', 'go_json']
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I try to fix the error showed in the action summary page, and move the -tags
string to the action settings, but it seems not work..
test-tags: ['', '-tags nomsgpack', '-tags "sonic avx"', '-tags go_json']
should this be moved back?
waiting @appleboy approval, thanks! |
Good job! But, I think |
@@ -204,6 +204,11 @@ go build -tags=jsoniter . | |||
```sh | |||
go build -tags=go_json . | |||
``` | |||
[sonic](https://github.com/bytedance/sonic) (you have to ensure that your cpu support avx instruction.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Introduce a new drop-in json enhancement: sonic.