Skip to content

Merging v1.3 development changes into master #420

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

Merged
merged 245 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
40703a7
codec: prep work for v1.3
Mar 1, 2025
6e8ea50
codec: v1.3: remove go/ module
Mar 1, 2025
fa3b06d
codec: [major re-architecture] use generics across codebase for perfo…
Mar 7, 2025
c4d074d
codec: separate codec_test.go into format specific files
Mar 7, 2025
411f5d2
codec: refactor some shared functions out of simple.go
Mar 7, 2025
81aff20
codec: add encodeAs/decodeAs to support json's extension support
Mar 7, 2025
1d596ac
codec: abstract creating of Decoder/Encoder into shared functions
Mar 8, 2025
0f0a67d
codec: fix json support
Mar 8, 2025
87b863b
codec: cleanup
Mar 8, 2025
e0f11a4
codec: fixes for fast-path using type parameters
Mar 8, 2025
d1ef255
codec: fixed support for all formats: binc, json, msgpack, simple, cbor
Mar 9, 2025
1d7e0a5
codec: eliminate escape of a slice when looking up enc fn
Mar 9, 2025
415293c
codec: update fastpath to support storing the reflect types during init
Mar 9, 2025
81218e5
codec: support benchmarking
Mar 9, 2025
3c5dc81
codec: use global vars for the fastpathES/DS values
Mar 9, 2025
ed2a5fe
codec: lazy initialize side Decoder
Mar 9, 2025
0da812a
codec: nit
Mar 10, 2025
5a677ee
codec: remove unused isBytes methods on format drivers
Mar 10, 2025
d925103
codec: comment out driverStateManager's (restore|capture)State methods
Mar 10, 2025
7b102a0
codec: review escape analysis and reduce escapes and allocation
Mar 13, 2025
bf22cb1
codec: removed old commented blocks from simple.go
Mar 14, 2025
3c33118
codec: callMake calls through an interface and not reflect
Mar 14, 2025
d7196d5
codec: cleanups, use better nil value for reset
Mar 14, 2025
90c2a32
codec: nit (remove comments)
Mar 15, 2025
fd91e07
codec: comment out some delegate methods done to try and force generi…
Mar 15, 2025
c48039a
codec: rearrange the structs to reduce GC pressure (per GC guide)
Mar 15, 2025
f0bce77
codec: nit
Mar 16, 2025
7fd8db4
codec: make bigenWriter[T] a field of encDriver, so that we don't kee…
ugorji Mar 19, 2025
384ae68
codec: rename rtidfn.go to enc_rtidfn.go (for symmetry with dec_rtidf…
ugorji Mar 19, 2025
809b935
codec: remove bigenWriter[T] and just inline calls to writen directly
ugorji Mar 19, 2025
f25dc1d
codec: separate generics containing code out of helperXXX.go into hel…
ugorji Mar 19, 2025
27edabd
codec: removed fmt.Printf comments
ugorji Mar 19, 2025
cd427ac
codec: fastpathAvIndex() now returns a ok bool (if rtid was found)
ugorji Mar 19, 2025
bb0c74c
codec: test for containerLen should use NewEncoderBytes
ugorji Mar 19, 2025
e2d700f
codec: removed some hints for me to review code changes
ugorji Mar 19, 2025
26ad794
codec: remove generics from helper_(unsafe|not_unsafe).go
ugorji Mar 20, 2025
da9a6f8
codec: merge enc_rtidfn.go into encode.go, and same for dec
ugorji Mar 20, 2025
9b9007e
codec: removed comment
ugorji Mar 20, 2025
7781f5e
codec: gen.go: comment out unused functions and introduce functions t…
ugorji Mar 23, 2025
9d7f259
codec: refactor code to make generics easier to manage and monomorphize
ugorji Mar 23, 2025
67bd94d
codec: ResetXXX doesn't throw an error (to maintain compatibility)
ugorji Mar 23, 2025
02fedbb
codec: forgot to add init.go to repo. Fixing
ugorji Mar 23, 2025
62a3058
codec: honor rules allowing monomorphization via code generation
ugorji Mar 23, 2025
5a53f9d
codec: move everything to do with generic instantiation and wrappers …
ugorji Mar 25, 2025
8377132
codec: separate gen.go (general code gen) from gen_mono.go (monomorph…
ugorji Mar 25, 2025
1c16b34
codec: use sync.Pool and shared encoders for side encoding/decoding
ugorji Mar 25, 2025
ac3f359
codec: remove legacy sideEncode code
ugorji Mar 25, 2025
a414b34
codec: remove getDecDriver call and add nextValueBytes to decoderI in…
ugorji Mar 25, 2025
bf13c04
odec: make decByteSlice a top-level non-generic function
ugorji Mar 25, 2025
9e757b5
codec: fix monomorphization for a single format.
ugorji Mar 25, 2025
c719da2
codec: fix issue monomorphizing multiple formats and clean up comments
ugorji Mar 25, 2025
4b1e743
codec: include generating monomorphization files
ugorji Mar 26, 2025
dac3044
codec: json: do not pass e.w to a variable
ugorji Mar 26, 2025
94554e9
codec: inline encStructFieldKey and decStructFieldKey into the one pl…
ugorji Mar 26, 2025
30d4a03
codec: move callMake into init.go, and update new(En|De)cDriver to ne…
ugorji Mar 26, 2025
ed92688
codec: mono: handle fields in method receivers, params/result and str…
ugorji Mar 26, 2025
17dc32a
codec: add initialization file for monomorphization
ugorji Mar 26, 2025
22abe4f
codec: push generated monomorphization files
ugorji Mar 26, 2025
df993ad
codec: update docs to reflect build tag model
ugorji Mar 26, 2025
d18e2af
codec: fix RPC tests to use a pointer to rpcCodec (due to its use of …
ugorji Mar 27, 2025
94183b2
codec: fix builds, test suite execution and go versions supported
ugorji Mar 27, 2025
6ef16f6
codec: update list of tests to run
ugorji Mar 27, 2025
31a3153
codec: fix cbor tests to work in suites (ie with diff Handle parameters)
ugorji Mar 27, 2025
6fedf19
codec: fix build - use *rpcCodec
ugorji Mar 27, 2025
b6e3c85
codec: fix reinit to work by fully re-creating the Handles, as you sh…
ugorji Mar 27, 2025
28bee3f
codec: fix rvGetArrayBytes in safe mode
ugorji Mar 27, 2025
4f006e3
codec: comprehensive clean-up for monomorphization
ugorji Mar 27, 2025
2720000
codec: inline decoderShared.stringZC
ugorji Mar 27, 2025
3736173
codec: use if-else blocks for short conditional in kStruct, and reorg…
ugorji Mar 27, 2025
f4ead96
codec: nit
ugorji Mar 27, 2025
3fd5de0
codec: nit
ugorji Mar 27, 2025
7c39940
codec: clean up build, combine go invocations into one, remove old an…
ugorji Mar 27, 2025
5d05e6e
codec: update generated files
ugorji Mar 27, 2025
498c3c6
codec: refactor decoderShared to decoderBase, same for encoder
ugorji Mar 27, 2025
acf7c9d
codec: refactor to make monomorphized code smaller
ugorji Mar 27, 2025
7ade5b6
codec: json minor refactoring
ugorji Mar 27, 2025
1a219a4
codec: change build tag codec.gen --> codec.build
ugorji Mar 27, 2025
1d5fd27
codec: add str4byte function to create a string value that only conta…
ugorji Mar 28, 2025
f143d8f
codec: optimize str4bytes
ugorji Mar 28, 2025
00d3d79
codec: make jsonDecDriver.nakedNum a top level function (no generics)
ugorji Mar 28, 2025
b7cbce0
codec: cleaned up nextValueBytes model
ugorji Mar 29, 2025
0fa6fc2
codec: minor: less copying in binc.go and refactor switch to if/else …
ugorji Mar 29, 2025
c5c4624
codec: remove brittle decByteState.
ugorji Mar 29, 2025
8e1f2ad
codec: Decode(StringAs)?Bytes smarter and more performant
ugorji Mar 29, 2025
10a00c4
code: refactor monomorphization to reduce file sizes via de-duplication
ugorji Apr 1, 2025
b661a61
codec: added a helper print(...) function (to call fmt.Printf without…
ugorji Apr 1, 2025
314cf07
codec: inline common code in kStructFieldKey for ascii field names
ugorji Apr 1, 2025
c3bc16c
codec: update monomorphized code
ugorji Apr 1, 2025
978758b
README.md: go-codec now only has 1 module
ugorji Apr 1, 2025
1e9315b
README.md updates
ugorji Apr 1, 2025
1d6e827
codec: improve monomorphization by capturing types for tracking sepat…
ugorji Apr 2, 2025
cd76015
codec: updating generated monomorphization files
ugorji Apr 2, 2025
7417db5
codec: update doc in gen_mono.go
ugorji Apr 2, 2025
451bd13
codec/test: use b.Loop() for benchmarks
ugorji Apr 4, 2025
32e2cef
codec: inline kStructFieldKey in encoder.kStructNoOmitEmpty
ugorji Apr 4, 2025
6d517dc
codec: cleanup build.sh
ugorji Apr 4, 2025
887fd20
codec: optimize encoder.kStruct
ugorji Apr 4, 2025
04ea969
codec: add typeInfo.simple field (replacing anyOmitempty) and decoder…
ugorji Apr 5, 2025
fcd5e5f
codec: use a trie to search for struct fields during decoding (not a …
ugorji Apr 5, 2025
8d424b7
codec: use const to flag whether to use sync.Pool for loading typeInfo
ugorji Apr 8, 2025
c6b5595
codec: abstract side(Enc|Dec)ode function and use flag to control if …
ugorji Apr 8, 2025
48458be
codec: use const flag to determine whether to use bytesFreeList or sf…
ugorji Apr 8, 2025
5a2ebf5
codec: fix mono initialization error within side(En|De)code
ugorji Apr 8, 2025
2eba798
codec: clean up RawExt messaging and tests
ugorji Apr 8, 2025
f8af0fc
codec: clean up encoding and decoding of RawExt
ugorji Apr 9, 2025
067f9eb
codec: do not cache decoder.bytes within each driver
ugorji Apr 9, 2025
077f8ee
codec: update generated monomorphization code
ugorji Apr 9, 2025
707a65b
codec: support fast encoding/decoding using builtins
ugorji Apr 12, 2025
7b85319
codec: inline handle and check methods into structFieldInfoPathNode.f…
ugorji Apr 12, 2025
c64f1ca
codec: fix decoding of builtin types (intX, uintX, floatX, slices or …
ugorji Apr 12, 2025
aca1239
codec: refactor structFieldInfo and structFieldInfoPathNode
ugorji Apr 12, 2025
581e4f2
codec: rename fast-path.go.tmpl and mammoth-test.go.tmpl
ugorji Apr 13, 2025
d39a300
codec: cleanup helper_(not_)unsafe.go to remove commented code and re…
ugorji Apr 15, 2025
e62e1c3
codec: test infra: use go-cmp package to diff values when not match
ugorji Apr 15, 2025
48c0b9b
codec: include ptrIds when determining whether a rtid is a builtin
ugorji Apr 15, 2025
ba57944
codec: refactor circularRefChecker
ugorji Apr 15, 2025
3cd0f63
codec: update builtin support to work robustly
ugorji Apr 15, 2025
61ff710
codec: clean up structFieldInfo handling
ugorji Apr 15, 2025
74f2384
codec: pass baseTyp when determining structFieldInfo.(enc|dec)Builtin
ugorji Apr 15, 2025
5b4cd7e
codec: fix circularRefChecker: only push pointers to container (struc…
ugorji Apr 15, 2025
3e8ec46
codec: remove old commented out code (that is not longer applicable)
ugorji Apr 15, 2025
f4a7947
codec: refactor decByteSlice into decReader.readxb
ugorji Apr 15, 2025
0ea0e97
codec: handle omitEmpty appropriately
ugorji Apr 15, 2025
37109f5
codec: updating latest generated files for monomorphization
ugorji Apr 15, 2025
a149d9c
codec: cleanup and introduce rvPtrIsNil to check if a ptr is nil
ugorji Apr 17, 2025
89aec40
codec: kInterfaceNaked: call makeMapReflect directly instead of makin…
ugorji Apr 17, 2025
afe1e8a
codec: cleanup - remove old debugf calls and document more
ugorji Apr 17, 2025
be93448
codec: remove references to selferViaCodecgen
ugorji Apr 17, 2025
3fc9c02
codec: include runtime metrics in output of benchmarks
ugorji Apr 24, 2025
100afc9
codec: refactor structFieldInfo
ugorji Apr 24, 2025
31cc8af
codec: fix support for swissmaps introduced in go 1.24
ugorji Apr 24, 2025
caef3ff
codec: update mono generated files
ugorji Apr 24, 2025
f9ed1f5
codec: refactor New(En|De)coder(Bytes) into Handle interface calls
ugorji Apr 25, 2025
07ca18b
codec: support go 1.22 and above
ugorji Apr 25, 2025
b60420d
codec: github actions: update go matrix to include 1.24 and 1.22 and …
ugorji Apr 25, 2025
b10672d
codec: test: remove unused global variable for cmpOpts
ugorji Apr 25, 2025
6e88bd2
codec: workflow: go get go-cmp/cmp if on devel branch
ugorji Apr 25, 2025
a25e7d0
codec: workflow: fix go get go-cmp/cmp
ugorji Apr 25, 2025
a2d1011
codec: updated doc
ugorji Apr 25, 2025
d940c4d
codec: nit
ugorji Apr 25, 2025
eb5be03
codec: workflow: separate workflows for master vs devel branches
ugorji Apr 25, 2025
5a66be4
codec: helper_unsafe requires go1.21+ (clear, etc) and benchmarks req…
ugorji Apr 25, 2025
b73c52d
codec: all benchmark files only built on go1.24
ugorji Apr 25, 2025
cc20b05
codec: only run benchmarks if go1.24+ and codec.nobench tag not set
ugorji Apr 25, 2025
376a0f8
codec: workflow: pass codec.nobench tag, so benchmarks are skipped
ugorji Apr 25, 2025
35f404b
codec: fix data race where atomic.Pointer loaded was stored back (not…
ugorji Apr 26, 2025
00d7994
codec/test: ensure flags are initialized first
ugorji Apr 26, 2025
c73ee74
codec: fix data races when running tests
ugorji Apr 26, 2025
f4b55e9
codec: refactor use of t.Parallel
ugorji Apr 26, 2025
907c750
codec: refactor ioDecReader's use of ioReaderBytesScanner
ugorji Apr 27, 2025
ad1d322
codec: ioDecReader: use bufr for readx also, and use blist to increas…
ugorji Apr 27, 2025
0515ae6
codec: support testUseDiff flag to either output diff of test results…
ugorji Apr 27, 2025
3079690
codec: refactor readxb so they can determine if a buf is used in the …
ugorji Apr 27, 2025
25b1444
codec: change deprecated ioutil calls
ugorji May 2, 2025
22b0fa8
codec: use testSimpleH for regression test for github issue 417
ugorji May 2, 2025
491604d
codec: streamline handling errors and panics
ugorji May 2, 2025
cf8f180
codec: json: streamline parsing strings
ugorji May 2, 2025
1ffab4a
codec: cbor test: use testJsonH (instead of new one) and change depre…
ugorji May 2, 2025
432346a
codec: json test: move init to post-init phase to use testJsonH, and …
ugorji May 2, 2025
270308e
codec: test (msgpack, simple): move init to post-init phase to use te…
ugorji May 2, 2025
7ba30a5
codec: streamline test initialization
ugorji May 2, 2025
0601936
codec: streamline reading map keys and when to use stringView safely
ugorji May 4, 2025
3e157e6
codec: cbor test: fix TestCborSkipTags
ugorji May 4, 2025
af89d72
codec: refactoring for performant ioDecReader (closing gap with bytes…
ugorji May 6, 2025
1e47419
codec: add outOfBoundsError and snip command, and fix freelistCapacity
ugorji May 6, 2025
a9831cd
codec: rpc: deprecate RPCNoBuffer and track whether a net.Conn and po…
ugorji May 6, 2025
d07d089
codec: refactor Decode(StringAs)Bytes and readx to not take input []b…
ugorji May 7, 2025
48fddcb
codec: refactor tests for recent code refactoring - Decode(StringAs)B…
ugorji May 7, 2025
2f6a15c
codec: remove str4byte and optimize decoderBase.string
ugorji May 7, 2025
bbe8872
codec: optimize decInferLen and default maxInitLen to 1024
ugorji May 7, 2025
1bc021c
codec: fix decoding for map key string using bufio in unsafe mode (an…
ugorji May 8, 2025
9c4e48d
codec: initial draft of refactored ioDecReader with performant bufio …
ugorji May 8, 2025
650ff4e
codec: fixes for bufio handling
ugorji May 9, 2025
31bf0fa
codec: reduce size of decoder.b (104 to 56) and use it for struct fie…
ugorji May 9, 2025
198acfd
codec: build.sh: pass -tdiff parameter in
ugorji May 10, 2025
aa3492c
codec: gen: use decodeBytesInto for fast-path call
ugorji May 10, 2025
a2aff07
codec: detach2Bytes: handle edge case when out parameter is nil
ugorji May 10, 2025
762dd48
codec: tests: more robust suites tests
ugorji May 10, 2025
3093f6a
codec: helper: set debug constants to false (standard value)
ugorji May 10, 2025
ccdfab9
codec: remove commented out debugf(...) and other commentary
ugorji May 10, 2025
0b0bc4d
codec: use byteSliceOf in spot areas
ugorji May 10, 2025
9877ca8
codec: update generated code
ugorji May 10, 2025
e8e9010
codec: optimize memory usage of ioDecReader when decoding from an io.…
ugorji May 10, 2025
7f696aa
codec: build.sh: align with (not checked-in) run.sh
ugorji May 12, 2025
e84fffd
codec: shared test files shouldn't call unexported fields/functions (…
ugorji May 12, 2025
cb5e802
codec: benchmark test files should add benchReinit to the testReinit …
ugorji May 12, 2025
9d8d2a4
codec: rename test files to force execution order for init functions
ugorji May 12, 2025
e766b1a
codec: gen_mono: use handle name (don't depend on h.Name anymore)
ugorji May 12, 2025
d2f716c
codec: remove init() from Handle interface
ugorji May 12, 2025
f8fd229
codec: test: simplify test initialization model
ugorji May 12, 2025
451b48f
codec: rename init test files to force sequence using prefix numbers
ugorji May 12, 2025
59badd2
codec: test: refactor test framework to fix benchmark suite
ugorji May 12, 2025
9833c3f
codec: wrongly commented out detaching bytes in naked mode
ugorji May 12, 2025
cf27cef
codec: support NilCollectionToZeroLength bool option for configuring …
ugorji May 12, 2025
32c49ff
codec: document that an error from Encode/Decode will render the (En|…
ugorji May 12, 2025
6555746
codec: use regular byte slicing instead of byteSliceOf helper function
ugorji May 12, 2025
e4c5c79
codec: remove marker2025 hacks
ugorji May 12, 2025
37d0b78
codec: remove okBytesN and byteSliceOf, and use idiomatic go code
ugorji May 12, 2025
7ec4099
codec: remove wrapper checkBreak() and ensure zero-len json array enc…
ugorji May 13, 2025
d420676
codec: optimize array/slice/map encoding
ugorji May 13, 2025
9bb917a
codec: follow up to optimize slice/array/map decoding
ugorji May 13, 2025
2d19c5a
codec: refactor common code into checkSep function
ugorji May 13, 2025
1e6e82a
codec: inline encoder functions: mapElemKey, arrayElem, mapEnd, arrayEnd
ugorji May 13, 2025
7834faa
codec: update generated/monomorphization files
ugorji May 13, 2025
ecbcb4e
codec: bufioWriter: default bufsize to minimum 16 and flush in a loop
ugorji May 14, 2025
33f433c
codec: cleanup some comments (especially tagged MARKER 2025 TODOs)
ugorji May 14, 2025
558ddc7
codec: bench: fix reporting gc scan bytes (for cases when it reduces …
ugorji May 14, 2025
aee1c75
codec: json: move d.tok=0 inline where tok was consumed
ugorji May 18, 2025
71ca9bc
codec: remove unnecessary reflect import in goversion_growslice_unsaf…
ugorji May 19, 2025
0e6a740
codec: remove decSliceHelper and inline code within fast-path and dec…
ugorji May 19, 2025
a948ddd
codec: move all map handling code into mapReqParams, encapsulated wit…
ugorji May 20, 2025
2f0d120
codec: decoding naked: do not initialize within kInterfaceNaked
ugorji May 20, 2025
fed802e
codec: fastpath: inline nil collection handling and remove code solel…
ugorji May 20, 2025
d620013
codec: fastpath: reduce LOC by eliminating some unnecessary variable …
ugorji May 20, 2025
ccbc196
codec: streamline nil handling and reduce unnecessary handling code
ugorji May 20, 2025
41f1817
codec: rename decoder.string to decoder.detach2Str (in line with deta…
ugorji May 20, 2025
83d6b7d
codec: missed some places for renaming decoderBase.string --> detach2Str
ugorji May 20, 2025
6f37e7e
codec: notJsonType is only type with isJson method outside jsonHandle
ugorji May 20, 2025
a19d73f
codec: update generated files
ugorji May 20, 2025
dc390dc
codec: tests: do not run tests in parallel if they are mutating Handl…
ugorji May 21, 2025
410fc29
codec: nit: mv commented out code to bottom of file, and add some com…
ugorji May 21, 2025
d569253
codec: set debugLogging=true (we need it a lot during dev)
ugorji May 21, 2025
9dc79d6
codec: nit
ugorji May 21, 2025
d62a08a
codec: binc: report right bytesAttachState for DecodeStringAsBytes
ugorji May 21, 2025
6796b49
codec: z_all_test: use defers to reset mutated Handle settings
ugorji May 21, 2025
1185a74
codec: bench: consistently call benchmark for bufio by bufsize ie use…
ugorji May 22, 2025
b61a8af
codec: bench: configure handles during reinit also
ugorji May 22, 2025
a928055
codec: introduce bytesOK and bytesOKs for getting bytes and ignoring …
ugorji May 22, 2025
18f2cc7
codec: ioDecReader: use readxb for readn and handle fillbuf more robu…
ugorji May 22, 2025
de320f8
codec: json: lens of array is a constant - no need to cache it elsewhere
ugorji May 23, 2025
ccff962
codec: nit on renaming benchmark functions, et al
ugorji May 23, 2025
1f23000
codec: bench: do not save cmd-line args outside of func scope
ugorji May 23, 2025
603488a
codec: updated mono generated files
ugorji May 23, 2025
5176cbc
codec: bench: do not hardcode ZeroCopy=true
ugorji May 23, 2025
c2c102a
codec: remove circularRefChecker.pushRV and handle it inline within e…
ugorji May 23, 2025
75d60e2
codec: robust decoding of []byte (via decodeBytesInto) and nil pointers
ugorji May 23, 2025
56225c4
codec: streamline transient use
ugorji May 24, 2025
b37cced
codec: change name to TestBenchOnePass and run it even if no verbose
ugorji May 24, 2025
33c6f5a
codec: changes to support go1.21 minimum
ugorji May 24, 2025
3da8748
codec: support growslice from go1.21
ugorji May 24, 2025
aa5c9fd
codec: rename file to goversion_check_supported
ugorji May 24, 2025
7dd8b91
codec: ensure that codec package is only used for go1.21+
ugorji May 24, 2025
5d57afb
codec: clean up comments, removing some and moving others to bottom o…
ugorji May 24, 2025
d2493f9
codec: updated generated mono files
ugorji May 24, 2025
fc87261
Resolve merge conflict by deleting unnecessary files and accepting de…
ugorji May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 44 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ name: Build and Test go-codec
on:
workflow_dispatch: {}
push:
branches: [ master ]
paths: [ '**.go' ]
branches: [ master, devel ]
paths: [ '**.go', '.github/workflows/*' ]
pull_request:
branches: [ master ]
paths: [ '**.go' ]
paths: [ '**.go', '.github/workflows/*' ]
jobs:
tests:
master_tests:
if: github.ref_name == 'master'
strategy:
fail-fast: false
matrix:
go: [ '1.19', '1.17', '1.11', '1.20.0-rc.1', '1.24' ]
go: [ '1.24', '1.19', '1.17', '1.11' ]
arch: [ amd64 ]
os: [ ubuntu-latest ]
include:
Expand All @@ -24,7 +25,7 @@ jobs:
GO111MODULE: 'on'
COVER_GO_VERSION: '1.19'
GOARCH: ${{ matrix.arch }}
name: go ${{ matrix.go }} on ${{ matrix.arch }}
name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand All @@ -35,12 +36,47 @@ jobs:
run: |
cd codec
go mod edit -droprequire github.com/ugorji/go
t=( "" "safe" "notfastpath" "codecgen" )
for i in "${t[@]}"; do go test "-tags=alltests ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"; done
t=( "" "safe" "notfastpath" "notmono" )
for i in "${t[@]}"; do
go test "-tags=alltests codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
done
- uses: codecov/codecov-action@v3
if: matrix.go == env.COVER_GO_VERSION
with:
directory: ./codec
devel_tests:
if: github.ref_name == 'devel'
strategy:
fail-fast: false
matrix:
go: [ '1.24', '1.22' ]
arch: [ amd64 ]
os: [ ubuntu-latest ]
include:
- go: '1.22'
arch: '386'
os: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
GO111MODULE: 'on'
GOARCH: ${{ matrix.arch }}
name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- shell: bash
run: cd codec; go get github.com/google/go-cmp/cmp
- name: Run tests
shell: bash
run: |
cd codec
go mod edit -droprequire github.com/ugorji/go
t=( "" "safe" "notfastpath" "notmono" )
for i in "${t[@]}"; do
go test "-tags=alltests codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
done


# No need to go get, as github knows its working out of this folder.
Expand Down Expand Up @@ -68,8 +104,6 @@ jobs:
# Now is a good time to remove that requirements cycle.
#
#
#
#
# --- SCRATCH ---
# coverage:
# if: ${{ always() }}
Expand Down
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,19 @@
This repository contains the `go-codec` library, the `codecgen` tool and
benchmarks for comparing against other libraries.

This is a High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library
This is a High Performance, Feature-Rich Idiomatic Go 1.20+ codec/encoding library
for binary and text formats: binc, msgpack, cbor, json and simple.

It fully supports the legacy `GOPATH` and the new `go modules` modes.
It supports generics and monomorphization, based on build tags set.

## Code Organization and Module Support

This repository consists of 4 modules:
This repository consists of 1 module:

- `github.com/ugorji/go/codec` [README](codec/README.md)
- `github.com/ugorji/go/codec/codecgen` (requires `github.com/ugorji/go/codec`) [README](codec/codecgen/README.md)
- `github.com/ugorji/go/codec/bench` (requires `github.com/ugorji/go/codec`) [README](codec/bench/README.md)
- `github.com/ugorji/go` (requires `github.com/ugorji/go/codec`)

For encoding and decoding, the `github.com/ugorji/go/codec` module is sufficient.

To install:

```
go get github.com/ugorji/go/codec
```

The other modules exist for specific uses, and all require `github.com/ugorji/go/codec`

- `github.com/ugorji/go/codec/codecgen` generates high performance static encoders/decoders for given types
- `github.com/ugorji/go/codec/bench` benchmarks codec against other popular go libraries
- `github.com/ugorji/go` is here for [historical compatibility reasons, as modules was initially introduced only at repo root](https://github.com/ugorji/go/issues/299)
Loading