Skip to content
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

Mention new Tinygo feature branch in README #581

Closed
wants to merge 6 commits into from

Conversation

fxamacker
Copy link
Owner

@fxamacker fxamacker commented Sep 8, 2024

Update Quick Start section of README to mention new branch: feature/cbor-tinygo-beta.

See announcement (September 8, 2024) for more details.

tinygo v0.33 doesn't support Value.SetIterKey() and
Value.SetIterValue(), which are in go1.20 and newer.

This commit adds tinygo build tag to use MapIter.Key() and
MapIter.Value() instead to iterate map elements using reflect.
Return value of tinygo's Type.String() for function type doesn't
match equivalent call using Go's reflect package.

More details at tinygo-org/tinygo#4458

This commit modifies tests to handle function type string being
different for tinygo and Go.
tinygo v0.33 fails with roughly 24+ levels of nested objects.

This commit modifies TestUnmarshalDeepNesting to reduce nested
levels to 24 when testing marshaling and unmarshaling deeply
nested object.
tinygo v0.33 doesn't implement Type.AssignableTo(), which is
needed under the hood when decoding registered CBOR tag data
to Go interface.

More details in tinygo-org/tinygo#4277.

This commit returns error of UnmarshalTypeError type when
decoding registered CBOR tag data to Go interface.

This change can be reverted after tinygo implements
Type.AssignalbeTo().
Currently, tests panic if compiled with tinygo v0.33 when
decoding data with 24+ nested levels.

This commit reduces default MaxNestedLevels to 16 (was 32).
To allow testing, etc. the user configurable limits
are unchanged (allows up to 65535).
Update Quick Start section of README to mention new branch:
- feature/cbor-tinygo-beta

It can be compiled using tinygo v0.33+ and go1.20+.
@fxamacker fxamacker added docs TinyGo TinyGo compatibility labels Sep 8, 2024
@fxamacker fxamacker self-assigned this Sep 8, 2024
@fxamacker fxamacker changed the base branch from feature/cbor-tinygo-beta to master September 8, 2024 16:48
@fxamacker
Copy link
Owner Author

Closing this PR and opening a new PR to only include README changes.

@fxamacker fxamacker closed this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs TinyGo TinyGo compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant