spin
spin copied to clipboard
Guest and host "worlds" don't align
We are currently using two different sets of wit documents to define the guest's and the host's view of the spin "world". This is mainly because the guest is using an old version of wit-bindgen (which will be fixed in #1424) where the wit grammar is significantly different than the latest versions.
Ideally these two definitions would be semantically exactly the same, but alas they are not. The host definitions deal with an interface called "config" while the guests require an imported interface called "spin-config". spin-componentize has smoothed over this discrepancy, but in the future it would be ideal if we didn't have to worry about this difference at all.
We've discussed this elsewhere, but the bottom line is we need to update the guest SDKs to use the latest wit-bindgen and the new WIT files, at which point we can delete the old WIT files and eliminate the misalignment.
@rylev @dicej What are some next steps on this issue? I saw we updated wit-bindgen and there have been updates to the WIT files since May but I'm not sure those cover this issue.
I think @rylev's recent work to update the SDKs took care of this. If he agrees, we can close it.
This will be fixed when the Go SDK moves to the latest version of wit-bindgen. This is being tracked in #1630. Until then this should stay open.
@rylev #1630 is closed and TinyGo SDK for mysql and pg were implemented in https://github.com/fermyon/spin/pull/1794 and https://github.com/fermyon/spin/pull/1922. Do they complete this or is there still a gap the needs work here?
This is not quite ready to be closed. The issue is not the user facing API but rather the tooling that generates the low-level bindings allowing Go based components to communicate to the Spin host.
The Go SDK still uses a very old version of wit-bindgen and thus an old set of wit files. This is because wit-bindgen's Go support is not fully ready for the Spin 2.0.0 world, because it doesn't yet support resources. Until that lands this issue remains.