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

Spin compatibility: remove wasi-experimental-http #109

Closed
vdice opened this issue Aug 23, 2022 · 10 comments · Fixed by #111
Closed

Spin compatibility: remove wasi-experimental-http #109

vdice opened this issue Aug 23, 2022 · 10 comments · Fixed by #111

Comments

@vdice
Copy link
Member

vdice commented Aug 23, 2022

Spin removed support for wasi-experimental-http in fermyon/spin#699.

I believe Bartholomew needs to do the same for compatibility with Spin.

(To be clear, the last v0.4.0 release of Spin is compatible)

For instance, when I try to run the docs site with Spin built from HEAD, I see:

$ spin -V
spin 0.4.0 (232567f 2022-08-22)

$ spin up
Error: unknown import: `wasi_experimental_http::close` has not been defined
Error: exit status: 1
@vdice vdice changed the title Spin compatibility: remove wasi_experimental_http Spin compatibility: remove wasi-experimental-http Aug 23, 2022
@vdice
Copy link
Member Author

vdice commented Aug 23, 2022

Actually, I may have this wrong. I don't see Bartholomew using wasi-experimental-http directly, it is just in the Cargo.lock. Perhaps what is necessary is to bump the spin SDK version?

@karthik2804
Copy link
Contributor

I just tested it and the SDK version is not causing it. It is a dependency handlebars-sprig which causes this. Downgrading that to v0.2.0 solves this.

v0.3.0 introduced the tweets and gists functions which rely on wasi_experimental_http. I am not sure what the approach towards this must be.

@vdice
Copy link
Member Author

vdice commented Aug 23, 2022

Thanks for checking this out, @karthik2804. Interesting... would we lose functionality if we go with the v0.2.0 downgrade?

@rajatjindal
Copy link
Contributor

i had been working on a branch to fix it. but don't have a fix for it right now. v0.3.0 was working fine with Bartholomew when we released it first. i am not too sure why it stopped working

downgrading to v0.2.0 will lose tweets/gists embedding functionality. we can downgrade until we can fix it?

@karthik2804
Copy link
Contributor

It doesn't work because one of the latest commits to spin removed support for wasi-experimental-http (fermyon/spin#699) as mentioned in the OP. It will still work with Bartholomew when using spin built from a commit prior to that.

@radu-matei
Copy link
Member

Yeah, we don't need to remove functionality — rather than using the bespoke wasi_experimental_http crate, it can use the Spin SDK directly, or import wasi_outbound_http from Spin.

@rajatjindal
Copy link
Contributor

I was able to get it working with spin sdk, but not able to publish new release as it needs a released version of spin-sdk.

Is that something we can do @radu-matei ?

I will spend more time on it tomorrow and will try to get a release pushed (worst case try to implement outbound http in handlebars sprig repo).

Thank you everyone for the inputs.

@karthik2804
Copy link
Contributor

@rajatjindal can we not just switch from using a release of handlebars-sprig in Bartholomew to using a git as a source in the dependancy?

@rajatjindal
Copy link
Contributor

We can, i was just not sure of it will be acceptable.

If the team is ok with that, i am happy to open pr for it.

@radu-matei
Copy link
Member

That definitely works, @rajatjindal!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants