shuttle: [Bug]: .cargo/config.toml is not deployed

What happened?

While working on an example app, I found out that .cargo/config.toml is not deployed. Yet this is needed to successfully compile, because the app is using uuid v7 which requires setting specific rustflags and that by default happens in .cargo/config.toml.

More details can be found at https://discord.com/channels/803236282088161321/1109452835214590123.

To reproduce the issue, use tag shuttle-issue-928: https://github.com/hseeberger/ticklist/releases/tag/shuttle-issue-928.

Version

0.16.0

Which operating systems are you seeing the problem on?

macOS

Which CPU architectures are you seeing the problem on?

ARM64

Relevant log output

No response

Duplicate declaration

  • I have searched the issues and there are none like this.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Shuttle uses a “global” Cargo configuration (i.e. $CARGO_HOME/config.toml) to patch the shuttle-* crates and to register their crates.io mirrors. This global config takes precedence over the per-project configuration (because Cargo doesn’t to configuration merging; pretty annoying). Not sure if the local run does that, too?

I ran into pretty much the same issue and ended up forking the uuid crate and patching it in.

Hey @imor, thanks a lot for investigating! I am currently also trying to set up a local dev environment, but as I am a Shuttle newbie, this is taking some time 😉

Yes, --cfg uuid_unstable is essential for my project to build. Is the deployer not using “standard Cargo”? Sorry if this question sounds stupid, I yet don’t know how it is working. Because if you run cargo check (or cargo build or …) the options under .cargo/config.toml are always considered.

Hence I assume that the deployer does not use cargo, but instead tries to do the same thing. If that is the case, then considering the cargo configuration options seems to be missing.