cm: implement JSON [un]marshaling for List types#279
Merged
Conversation
Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
sd2k
added a commit
to sd2k/tinygo
that referenced
this pull request
Feb 24, 2025
This commit switches from wasm-tools-go to the newer go.bytecodealliance.org repository. Right now it's pinned to the latest commit on the `main` branch because there were some important fixes in bytecodealliance/go-modules#287, but once there's been a new release we can switch to a proper version. The `cm` package moved from a submodule to a separate module, so the Makefile has been updated to reflect that. The `wasi-syscall` and `wasi-cm` Make targets needed updating to work with the latest versions of the tooling. Unfortunately, building with this version doesn't actually work due to an import cycle. For example, trying to build the [example] with: ```bash $ GOTOOLCHAIN=go1.23.6 ../../go/tinygo/build/tinygo build -target=wasip2 -o add.wasm -wit-package wit/add.wit -wit-world adder main.go package command-line-arguments imports runtime imports internal/cm imports encoding/json imports fmt imports os imports io/fs imports time imports syscall imports internal/cm: import cycle not allowed package command-line-arguments imports runtime imports internal/cm imports encoding/json imports encoding/base64 imports encoding/binary imports slices imports iter imports runtime: import cycle not allowed ``` I'm pretty sure this was caused by bytecodealliance/go-modules#279 which added the `encoding/json` import. [example]: https://component-model.bytecodealliance.org/language-support/go.html
sd2k
added a commit
to sd2k/tinygo
that referenced
this pull request
Feb 24, 2025
This commit switches from wasm-tools-go to the newer go.bytecodealliance.org repository. Right now it's pinned to the latest commit on the `main` branch because there were some important fixes in bytecodealliance/go-modules#287, but once there's been a new release we can switch to a proper version. The `cm` package moved from a submodule to a separate module, so the Makefile has been updated to reflect that. The `wasi-syscall` and `wasi-cm` Make targets needed updating to work with the latest versions of the tooling. Unfortunately, building with this version doesn't actually work due to an import cycle. For example, trying to build the [example] with: ```bash $ GOTOOLCHAIN=go1.23.6 ../../go/tinygo/build/tinygo build -target=wasip2 -o add.wasm -wit-package wit/add.wit -wit-world adder main.go package command-line-arguments imports runtime imports internal/cm imports encoding/json imports fmt imports os imports io/fs imports time imports syscall imports internal/cm: import cycle not allowed package command-line-arguments imports runtime imports internal/cm imports encoding/json imports encoding/base64 imports encoding/binary imports slices imports iter imports runtime: import cycle not allowed ``` I'm pretty sure this was caused by bytecodealliance/go-modules#279 which added the `encoding/json` import. [example]: https://component-model.bytecodealliance.org/language-support/go.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Evolution of #266.