-
Notifications
You must be signed in to change notification settings - Fork 270
Http-go template fails #820
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
Comments
Could you please share which versions for Spin and TinyGo this is? Just validated this with Spin from canary, TinyGo 0.26, and the latest template version and it fails for me as well. For reference, I also tested our C# template, which is built on top of the same C interop, and that one works well. cc @adamreese |
As it passes on CI, it looks like there are some breaking changes between 0.22 and 0.26 - https://github.com/fermyon/spin/actions/runs/3245485308/jobs/5323079898 This is from the log on CI (0.22):
|
I've been testing the 0.5.0 release and the canary release (from October 14th) and both fail, with both SDK, Spin runtime, and template being from the same version. TinyGo: |
I did a little research about it - it works fine up to 0.25.0 (incl). Unfortunately, I'm unfamiliar with the internals and can't tell if it's the upstream bug or not without further debugging. UPD: This in-progress PR seems to fix the issue so now it looks more like an upstream bug |
Validated that TinyGo v0.25 works. Thanks for investigating this! |
Removing
|
Finally getting back to this... The backtrace appears to point at the indexing operation here: ptr := unsafe.Pointer(&buf[0]) Suggesting that the panic could be caused by |
This makes sense with the patch identified in #820 (comment), which changed the underlying |
Almost certainly fixed by tinygo-org/tinygo#3303 |
When I patch tinygo with #3303 I get a different error
Looks like the bindings expect a pointer returned from |
|
Hi, any idea of whats is happening?
OS: Fedora 37 |
Can you try TinyGo 0.25.0? 0.26.0 has an issue, but haven't been fully investigated yet. |
Same problem with TinyGo 0.25.0! |
|
@tomaswarynyca You may need to install clang? |
@lann I have it installed
|
Did you install Tinygo as a package? I am not too familiar with Fedora. |
Yeah, as it says on the TinyGo website Installing TinyGo 0.25 installs a few more dependencies |
The most obvious interpretation of this is a missing package. From a quick search the only other one that makes sense to me for Fedora might be |
tinygo-org/tinygo#3410 should fix the original error, though it revealed another issue with the SDK bindings as well so it isn't a complete fix. |
#1114 might have fixed the issue with tinygo 0.26. |
I'd suggest to keep this issue open until we have a v0.9.0 version shipped, and this fix will be part of the default SDK version being used by the template. |
With tinygo 0.27.0 although the For example, the http-tinygo-outbound-http example (here using spin and sdk from #1153, which is current with
If someone who is still on tinygo 0.26.0 can compare notes, that'd be handy. If it is indeed particular to 0.27.0, I/we can create a separate issue. |
That could be a bug in the SDK that managed to stay hidden with earlier tinygo versions. I'm working on updating the Go SDK right now to add key-value support and update outbound-redis. I can take a look at this while I'm at it. |
This does look vaguely like the kind of bug I (thought I) fixed. |
This should be addressed in #1165 |
With the recent v0.9.0 release (and corresponding go SDK), compatibility with tinygo should be restored. Thanks @dicej @lann @adamreese for the fixes! |
Creating a new Spin application using the http-go template fails without any modifications to the code:
The text was updated successfully, but these errors were encountered: