-
Notifications
You must be signed in to change notification settings - Fork 242
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
Rust template 2.1 fails on Windows #2190
Comments
I was able to reproduce by following the steps given (thank you!), and I was also able to reproduce the errors by building Spin directly on Windows with Changing I see that Windows is added to the build CI here - feels like this should already be caught in the CI step |
Adding this to the 2.2 milestone as a reminder to wrangle the scripts so the released templates reference Although it would still be good to also fix on main, so that Windows folks could use canary templates. @fibonacci1729 are you the knowledgeable person for the Rust SDK WIT stuff? |
@itowlson Happy to help with any Rust SDK WIT stuff but from reading the above, it seems like the symlink created to link Worst-case scenario here if we can't address the above would be to just (yet-again) create another copy of the wits into |
My guess would be that CI runs against the local SDK (path reference) rather than the remote SDK (git reference), I believe that Windows + Git + symlinks is a whole exciting world of hurt that Windows + symlinks alone is not. (Cf. the lengthy, nuanced. and occasionally terrifying answers on this SO post (although the post itself is not directly relevant to this situation).) (Which is presumably why |
I don't have any brighter ideas than this for unblocking Windows users when using the |
Note: with the forthcoming 2.2.0 release and thereafter, the Rust templates will use crate references rather than git (ref #2221). This should fix the issue for Windows users. |
I've marked the 2.2 work involved as Done, but I'm leaving this open until 2.2 ships so that 2.1 users can find it! |
Spin v2.2.0 is out and the corresponding Rust templates now pull in the spin-sdk via the "2.2.0" crate reference. (Note: you'll need to run |
Reported by a Discord user (https://discord.com/channels/926888690310053918/1186493596501803059/1186700173397721122).
Follow these steps on Windows (it works fine on Linux):
Download and unzip Spin 2.1 from the GH release page, and install the 2.1 templates.
Create an application using the
http-rust
template. TheCargo.toml
looks like this:spin build
.Expected behaviour
It builds.
Actual behaviour
A slew of errors, mostly "failed to resolve/cannot find type", but the first of which is:
If I change the SDK reference to the
crates.io
reference (spin-sdk = "2.1"
) it works fine; but that is not what the template uses. (Although they should, once we get the scripts properly wrangled!)The text was updated successfully, but these errors were encountered: