Fix corrupted JSON caused by goccy library#37214
Conversation
|
This PR only removes the goccy library from our code, just use the official library. No need to write test for the 3rd library's bug. |
|
BTW could we switch over to stdlib v2 once it's stable? I think we should drop all non-stdlib json libs eventually. |
We have been using v2 for a long time. It is enabled by default. This PR fixes the goccy in "chi-binding" package. |
|
Right, we can't control indirect deps. Just wondering how this bug came to be. |
Actually, we can write our "goccy-fake" package, and use "replace" in go.mod to force our package to be used. The bug is simply a bug, I have provided reproducible code in the issue. |
That might be dangerous because those dependencies could depend on things like goccy-specific errors or behaviours. Best would be to switch them to stdlib directly or find better dependencies. |
silverwind
left a comment
There was a problem hiding this comment.
Maybe add a test, if simple.
Just curious, why you seldom read code or comments? For most questions you asked, I have explained ahead, just like #37207 (comment) and more. If you can read before ask, you can save the time of us all, right? |
|
Is the bug not observable in first-party code/tests? |
The buggy library has been removed, why you want to test a non-existing bug? |
|
If the test change in |
No, don't waste time on the removed 3rd library.
|
751f12c to
185573a
Compare
|
Found more bugs. Fixed in 5f65a33 Added backward compatibility logic, so this PR isn't "breaking". |
|
I was unable to create a backport for 1.26. @wxiaoguang, please send one manually. 🍵 |
* main: Replace `dropzone` with `@deltablot/dropzone` (go-gitea#37237) Add `ExternalIDClaim` option for OAuth2 OIDC auth source (go-gitea#37229) Remove error returns from crypto random helpers and callers (go-gitea#37240) Use Content-Security-Policy: script nonce (go-gitea#37232) Remove htmx (go-gitea#37224) Refactor "htmx" to "fetch action" (go-gitea#37208) Fix UI regression (go-gitea#37218) Fix corrupted JSON caused by goccy library (go-gitea#37214) Add test for "fetch redirect", add CSS value validation for external render (go-gitea#37207) Fix incorrect concurrency check (go-gitea#37205) refactor: simplify ParseCatFileTreeLine and catBatchParseTreeEntries (go-gitea#37210) Update go js py dependencies (go-gitea#37204)


Fix #37211