-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Automate vendoring by invoking cargo-vendor when building src dist tarballs. #39728
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
bf4b5fa
to
919730f
Compare
src/ci/run.sh
Outdated
@@ -51,7 +51,7 @@ fi | |||
# all test suites have all their deps in there (just the main bootstrap) so we | |||
# have the ability to disable this flag | |||
if [ "$NO_VENDOR" = "" ]; then | |||
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-vendor" | |||
# RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-vendor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment this out rather than delete all this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I'm not sure yet what's supposed to happen. I guess I should remove it if we want to cache .cargo
instead through some other means.
69b92e0
to
38b67b7
Compare
Thanks for taking the time to make a PR @eddyb! Taking a look at this, here's my thoughts:
Other than that I think the biggest question is where does the That being said I think we could improve the logic here with:
I believe those points would cover my concerns at least! |
ffc1f6a
to
1bd57bf
Compare
a143460
to
aa44186
Compare
Successful build is at https://travis-ci.org/rust-lang/rust/builds/200955072, I'm killing this one. @bors r=alexcrichton |
📌 Commit aa44186 has been approved by |
…hton Automate vendoring by invoking cargo-vendor when building src dist tarballs. This avoids rust-lang#39633 bringing the `src/vendor` checked into git by rust-lang#37524, past 200,000 lines of code. I believe the strategy of having rustbuild run `cargo vendor` during the `dist src` step is sound. However, the only way to be sure `cargo-vendor` exists is to run `cargo install --force cargo-vendor`, which will recompile it every time (not passing `--force` means you can't tell between "already exists" and "build error"). ~~This is quite suboptimal and I'd like to somehow do it in each `Dockerfile` that would need it.~~ * [ ] Cache `CARGO_HOME` (i.e. `~/.cargo`) between CI runs * `bin/cargo-vendor` and the actual caches are the relevant bits * [x] Do not build `cargo-vendor` all the time * ~~Maybe detect `~/.cargo/bin/cargo-vendor` already exists?~~ * ~~Could also try to build it in a `Dockerfile` but do we have `cargo`/`rustc` there?~~ * Final solution: check `cargo install --list` for a line starting with `cargo-vendor ` cc @rust-lang/tools
⌛ Testing commit aa44186 with merge 311db02... |
💔 Test failed - status-travis |
aa44186
to
915d2f0
Compare
@bors r=alexcrichton |
📌 Commit 915d2f0 has been approved by |
⌛ Testing commit 915d2f0 with merge ba56cf2... |
💔 Test failed - status-travis |
f25be51
to
e104705
Compare
@bors r=alexcrichton |
📌 Commit e104705 has been approved by |
e104705
to
7bfd156
Compare
@bors r=alexcrichton |
📌 Commit 7bfd156 has been approved by |
⌛ Testing commit 7bfd156 with merge 702160d... |
💔 Test failed - status-travis |
7bfd156
to
d29f0bc
Compare
@bors r=alexcrichton |
📌 Commit d29f0bc has been approved by |
⌛ Testing commit d29f0bc with merge 19dcf06... |
💔 Test failed - status-travis |
@bors: retry |
Automate vendoring by invoking cargo-vendor when building src dist tarballs. This avoids #39633 bringing the `src/vendor` checked into git by #37524, past 200,000 lines of code. I believe the strategy of having rustbuild run `cargo vendor` during the `dist src` step is sound. However, the only way to be sure `cargo-vendor` exists is to run `cargo install --force cargo-vendor`, which will recompile it every time (not passing `--force` means you can't tell between "already exists" and "build error"). ~~This is quite suboptimal and I'd like to somehow do it in each `Dockerfile` that would need it.~~ * [ ] Cache `CARGO_HOME` (i.e. `~/.cargo`) between CI runs * `bin/cargo-vendor` and the actual caches are the relevant bits * [x] Do not build `cargo-vendor` all the time * ~~Maybe detect `~/.cargo/bin/cargo-vendor` already exists?~~ * ~~Could also try to build it in a `Dockerfile` but do we have `cargo`/`rustc` there?~~ * Final solution: check `cargo install --list` for a line starting with `cargo-vendor ` cc @rust-lang/tools
💔 Test failed - status-appveyor |
@bors retry
|
Automate vendoring by invoking cargo-vendor when building src dist tarballs. This avoids #39633 bringing the `src/vendor` checked into git by #37524, past 200,000 lines of code. I believe the strategy of having rustbuild run `cargo vendor` during the `dist src` step is sound. However, the only way to be sure `cargo-vendor` exists is to run `cargo install --force cargo-vendor`, which will recompile it every time (not passing `--force` means you can't tell between "already exists" and "build error"). ~~This is quite suboptimal and I'd like to somehow do it in each `Dockerfile` that would need it.~~ * [ ] Cache `CARGO_HOME` (i.e. `~/.cargo`) between CI runs * `bin/cargo-vendor` and the actual caches are the relevant bits * [x] Do not build `cargo-vendor` all the time * ~~Maybe detect `~/.cargo/bin/cargo-vendor` already exists?~~ * ~~Could also try to build it in a `Dockerfile` but do we have `cargo`/`rustc` there?~~ * Final solution: check `cargo install --list` for a line starting with `cargo-vendor ` cc @rust-lang/tools
☀️ Test successful - status-appveyor, status-travis |
This avoids #39633 bringing the
src/vendor
checked into git by #37524, past 200,000 lines of code.I believe the strategy of having rustbuild run
cargo vendor
during thedist src
step is sound.However, the only way to be sure
cargo-vendor
exists is to runcargo install --force cargo-vendor
, which will recompile it every time (not passing--force
means you can't tell between "already exists" and "build error").This is quite suboptimal and I'd like to somehow do it in eachDockerfile
that would need it.CARGO_HOME
(i.e.~/.cargo
) between CI runsbin/cargo-vendor
and the actual caches are the relevant bitscargo-vendor
all the timeMaybe detect~/.cargo/bin/cargo-vendor
already exists?Could also try to build it in aDockerfile
but do we havecargo
/rustc
there?cargo install --list
for a line starting withcargo-vendor
cc @rust-lang/tools