atree icon indicating copy to clipboard operation
atree copied to clipboard

Bump fxamacker/cbor to latest feature/stream-mode

Open fxamacker opened this issue 7 months ago • 4 comments

Closes #539

Currently, atree is using a feature branch of fxamacker/cbor that was based on cbor v2.4.0.

This commit bumps version of fxamacker/cbor to use the updated feature/stream-mode branch based on fxamacker/cbor v2.7.0.

For more info about changes between cbor v2.4.0 and v2.7.0, see fxamacker/cbor/releases.

IMPORTANT: Do not merge this to main branch until this update passes:

  • longer duration smoke testing
  • backward compatibility tests using testnet blocks
  • backward compatibility tests using mainnet blocks
  • integration tests in other projects.

Example programs using different versions of fxamacker/cbor/v2

I used go get on the last commit of this PR like this when testing example programs:

$ go get github.com/onflow/atree@3b2c3017dce96aaa9db324cae7708b07765f9752

$ cat go.mod

module foo

go 1.23.7

require (
	github.com/fxamacker/cbor/v2 v2.7.1-0.20250319155730-379167c29d12
	github.com/onflow/atree v0.9.1-0.20250319161108-3b2c3017dce9
	...
)

// NOTE: replace directive is not needed.
...

The compiled example program specifying cbor v2.7.1-0.2025... (feature branch) having dependencies specifying cbor v2.7.0 (main branch) will use v2.7.1-0.2025...

This approach is backward compatible and avoids bloating the executable because only one version of fxamacker/cbor is compiled into the executable.


  • [x] Targeted PR against main branch
  • [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • [x] Code follows the standards mentioned here
  • [x] Updated relevant documentation
  • [x] Re-reviewed Files changed in the Github PR explorer
  • [x] Added appropriate labels

fxamacker avatar Mar 19 '25 16:03 fxamacker