Coder Social home page Coder Social logo

Comments (8)

itowlson avatar itowlson commented on June 21, 2024 1

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 crates.io is fine - I'm guessing in that case the symlink is followed at publish time, so that when Windows downloads from crates.io the files are packaged in the right place.)

from spin.

vdice avatar vdice commented on June 21, 2024 1

Worst-case scenario here if we can't address the above would be to just (yet-again) create another copy of the wits into sdk/rust..... cc/ @vdice if you have any thoughts.

I don't have any brighter ideas than this for unblocking Windows users when using the "main" git ref.

from spin.

vdice avatar vdice commented on June 21, 2024 1

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.

from spin.

ogghead avatar ogghead commented on June 21, 2024

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 make build

Changing path: "./wit" to path: "../../wit" on this line referenced by the build error allowed my local build to succeed. I did not verify whether this change builds on Unix systems though. I do not have context on the wit file currently used as an intermediate - let me know if there is a reason that is needed! Otherwise, I am happy to publish a PR for this change tomorrow after the 9-5! Edit: Looks like this symlink was added to resolve an issue with cargo publish- #2151 (comment). One route could be to update templates to reference the published SDK crate rather than Spin repository artifacts.

I see that Windows is added to the build CI here - feels like this should already be caught in the CI step

from spin.

itowlson avatar itowlson commented on June 21, 2024

Adding this to the 2.2 milestone as a reminder to wrangle the scripts so the released templates reference crates.io instead of GH (which appears to fix this).

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?

from spin.

fibonacci1729 avatar fibonacci1729 commented on June 21, 2024

@itowlson Happy to help with any Rust SDK WIT stuff but from reading the above, it seems like the symlink created to link ./wit -> ../../wit isn't working on Windows as expected. As @ogghead mentions, i am befuddled by this not being caught in CI when building for windows.

Worst-case scenario here if we can't address the above would be to just (yet-again) create another copy of the wits into sdk/rust..... cc/ @vdice if you have any thoughts.

from spin.

itowlson avatar itowlson commented on June 21, 2024

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!

from spin.

vdice avatar vdice commented on June 21, 2024

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 spin templates upgrade after upgrading to Spin v2.2 to pull down the latest templates.) Closing for now but please let us know if other issues arise.

from spin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.