clearlinux / autospec

RPM packaging automation tool
GNU General Public License v3.0
100 stars 60 forks source link

cargo_vendor doesnt account for sources not from crates.io #837

Closed K1ngfish3r closed 1 week ago

K1ngfish3r commented 3 weeks ago

Trying to vendor zed, I came across github sources being vendored as part of the command. When running cargo vendor > .cargo/config.toml, it looks something like this

[source.crates-io]
replace-with = "vendored-sources"

[source."git+https://github.com/KillTheMule/nvim-rs?branch=master"]
git = "https://github.com/KillTheMule/nvim-rs"
branch = "master"
replace-with = "vendored-sources"

[12 sources]...

[source."git+https://github.com/zed-industries/lsp-types?rev=72357d6f6d212bdffba3b5ef4b31d8ca856058e7"]
git = "https://github.com/zed-industries/lsp-types"
rev = "72357d6f6d212bdffba3b5ef4b31d8ca856058e7"
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"

Whilst the vendor tarball is created with those deps, Autospec currently doesn't echo in the github sources to account for this, and the builder tries to access the internet.

K1ngfish3r commented 1 week ago

I tried v16 and I'm currently unable to see anything being appended to .cargo/config,toml automatically. I believe this behaviour will also affect other rust packages

K1ngfish3r commented 1 week ago

can confirm working with v16 after sync to 42020