https://linen.dev logo
Error deploying workspace with library crate
# help
c
I've created a very simple Discord bot with serenity to test Shuttle: https://github.com/casperstorm/discord-bot-einar/tree/workspace-lib-crates. Running
cargo shuttle run
works just fine. However when running
cargo shuttle deploy
i get the following error:
Copy code
{error="Build error: failed to select a version for the requirement data = \"^0.1.0\"\ncandidate versions found which didn't match: 0.0.0\nlocation searched: crates.io index\nrequired by package discord-bot-einar-c1fabb48-fb8c-4b83-9977-ad647b5ecea9 v0.1.0 (/opt/shuttle/shuttle-builds/discord-bot-einar)"}
Do i have to do something different with my current structure of the bot? The structure is as follows?
Copy code
├── Cargo.lock
├── Cargo.toml
├── data
│   ├── Cargo.toml
│   └── src
│       ├── data_time.rs
│       ├── lib.rs
│       └── rss.rs
└── src
      ├── lib.rs
      ├── rss.rs
      └── settings.rs
k
Hey Async, thanks for opening a thread for this (and the github issue!). Currently we use cargo package () to package users crates before sending them to the build server. This means that all crates used must be indexed on crates.io, so depending on an unpublished crate from a workspace won't work (neither will git dependencies).
This is something we want to support, but haven't been able to solve yet.
c
Alrite, thanks. I refactored my project for now just wanted to know as well. Thanks for coming back 🙂
k
No problem. Have a good weekend and let us know if there is anything else we can help with!
m
Adding to the breadcrumb trail for others who come across this issue: https://github.com/shuttle-hq/shuttle/issues/190
f
https://github.com/shuttle-hq/shuttle/pull/507 I am experiencing the same issue with the last version (0.13) while the PR was merged and issue closed 🫢
Thank you!
k
No problem!