spin icon indicating copy to clipboard operation
spin copied to clipboard

Spurious warning "skipping duplicate package `spinhelloworld`" when using Rust SDK

Open itowlson opened this issue 1 year ago • 3 comments

When you build Rust application that references the Rust SDK, you get a spurious warning:

warning: skipping duplicate package `spinhelloworld` found at `/home/ivan/.cargo/git/checkouts/spin-91500438ac5656d2/b316f47/examples/http-rust`

Looking at the directory, it seems Cargo checks out out the entire Spin repo into the Cargo cache. So I think the issue is that the repo contains several projects called spinhelloworld, and Cargo is looking at all of them as well as the SDK crate itself?

I don't think we used to see this, and I now see it on SDK revs going right back to 0.1.0, so I wonder if this is a new warning added to a recent version of Rust?

itowlson avatar Sep 27 '22 21:09 itowlson

Warning doesn't happen in Rust 1.62.1 but does in 1.63.0.

itowlson avatar Sep 27 '22 21:09 itowlson

Also affects programs that import Spin crates, it seems.

itowlson avatar Oct 02 '22 22:10 itowlson

https://github.com/rust-lang/cargo/issues/10752

itowlson avatar Oct 03 '22 00:10 itowlson