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 |
| 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.
$(GO) test -tags "$(TESTTAGS)" -v ...
and test-tags is:
test-tags: ['', 'nomsgpack', 'sonic avx', 'go_json']
right?
There was a problem hiding this comment.
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 |
| ```sh | ||
| go build -tags=go_json . | ||
| ``` | ||
| [sonic](https://github.com/bytedance/sonic) (you have to ensure that your cpu support avx instruction.) |
Introduce a new drop-in json enhancement: sonic.