-
Notifications
You must be signed in to change notification settings - Fork 257
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
Windows deploy broken due to Cargo bug #258
Comments
I wonder how cargo gets the absolute path without canonizalizing? Maybe following the same approach in shuttle will fix it for us 🤷♂️ |
Just following the discord bot example and running into the same problem:
Unfortunately I can't continue with trying this out until I get a solution for this :( |
@chrisheib I had the same problem and worked around it by using github actions. If that's a possiblity for you |
Hi @chrisheib ! As urtokk said above, until we find a way to work around this bug in cargo, Windows users can deploy remotely using a GitHub Action. When deploying certain projects (projects that rely on getting secrets in the Here is an example repo where I deployed the |
This appears to be due to abonander/mime_guess#78 which is fixed in abonander/mime_guess#79 You might try adding something like this to your [patch.crates-io.mime_guess]
git="https://github.com/NathanSWard/mime_guess.git"
branch="platform-path-separators" |
Thanks for this @xobs ! I tested this out on Windows (briefly), and it did indeed fix Hopefully you can play around with |
@chrisheib, I had the same problem and solved it by running |
So if you don't want to use GH actions - I have a quick and easy workaround using Docker. Haven't tested it on Windows yet but I don't see why it wouldn't work. First you need to create a FROM rust:latest
RUN rustup default nightly
RUN cargo install cargo-shuttle and then build an image (while in the same directory as the Dockerfile):
This will create the image called The last step is this docker command which mounts your shuttle credentials and your project directory to the container:
The Modification may be necessary as I don't have a windows machine - but hope this works! |
I can confirm that Christos' solution works for deploying on Windows, I tested it by deploying this project on Windows. Thanks Christos! Note: I first tried to do this with Git Bash, which didn't work due to pathing issues. Doing it in PowerShell went without a hitch, though. |
Using |
Great catch @RagibHasin! We did discover this fix too yesterday: #721, but we have had this bug for months. 😅 This fix will be included in the next release which is scheduled for monday, so I'll close this issue (at long last!). |
I was about to make a PR on the main branch 😅. Is all future development happening on the shuttle-next branch? |
Haha, thanks anyway! 😂 No, shuttle-next is a development branch for a major refactor we've been working on for a while now. We will return to developing on main after this release. 👍 |
Windows currently fails to deploy. The bug is related to this Cargo meta-issue. Cargo is still trying to determine how to fix them properly in general.
I forked Cargo, fixed our instance of the bug by canonicalizing the malformed path, and patched Shuttle with it here which I've tested working on Windows/WSL(Ubuntu) and the normal CI tests. The change may be small and innocuous enough that the Cargo folks would accept a PR?
The text was updated successfully, but these errors were encountered: