encoding/json: Add custom JSON package with build tag support for Sonic (#1623)

* tag optional sonic and allow full library conversion

* Add workflow and disallow arm and darwin usage

* Add basic hotswap benchmark

* linter: fix

* use bash

* linter: fix?

* Fix whoopsie, add to make file, also add mention in features list.

* test enforcement

* actually read documentation see if this works

* linter: fix

* linter: fix

* sonic: bump tagged version

* encoding/json: drop build tag arch and os filters

* encoding/json: consolidate tests

* encoding/json: log build tag usage

* rm superfluous builds

* glorious/nits: add template change and regen docs

* glorious/nits: update commentary on nolint directive

* glorious/nits: rm init func and log results in main.go

* Test to actually pull flag in

* linter: fix

* thrasher: nits

* gk: nits 4 goflags goooooooooo!

* gk: nits rn

* make sonic default json implementation

* screen 386

* linter: fix

* Add commentary

* glorious: nits Makefile not working

* gk: nits

* gk: nits whoops

* whoopsirino

* mention 32bit systems won't be sonic

* gk: super-duper nit of extremes

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2025-02-20 16:05:55 +11:00
committed by GitHub
parent 3748c97b12
commit e99adca86f
156 changed files with 321 additions and 170 deletions

View File

@@ -13,22 +13,32 @@ jobs:
goarch: amd64
psql: true
skip_wrapper_tests: false
sonic: true
- os: ubuntu-latest
goarch: 386
psql: true
skip_wrapper_tests: true
sonic: true # sonic is disabled for 386 this ensures fall back to legacy code
- os: macos-latest
goarch: amd64
psql: true
skip_wrapper_tests: true
sonic: true
- os: macos-13 # beta
goarch: amd64
psql: true
skip_wrapper_tests: true
sonic: true
- os: windows-latest
goarch: amd64
psql: true
skip_wrapper_tests: true
sonic: true
- os: ubuntu-latest
goarch: amd64
psql: true
skip_wrapper_tests: false
sonic: false
runs-on: ${{ matrix.os }}
@@ -84,6 +94,13 @@ jobs:
echo "CGO_ENABLED=1" >> $GITHUB_ENV
shell: bash
- name: Set GOFLAGS
run: |
if [ "${{ matrix.sonic }}" = "false" ]; then
echo "GOFLAGS=${GOFLAGS} -tags=sonic_off" >> $GITHUB_ENV
fi
shell: bash
- name: Test
run: | # PGSERVICEFILE isn't supported by lib/pq and will cause a panic if set
unset PGSERVICEFILE
@@ -169,4 +186,4 @@ jobs:
cd web/
npm install
npm run lint
npm run build
npm run build