-
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
make dist vendoring configurable #130110
make dist vendoring configurable #130110
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
This PR modifies If appropriate, please update This PR modifies If appropriate, please update |
4d980a1
to
427af35
Compare
This comment has been minimized.
This comment has been minimized.
50f7227
to
c2a510b
Compare
This comment has been minimized.
This comment has been minimized.
c2a510b
to
0207cd5
Compare
☔ The latest upstream changes (presumably #130179) made this pull request unmergeable. Please resolve the merge conflicts. |
0207cd5
to
7e0fb6e
Compare
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.
Thank you!
You can r=me (unless you want to wait for Mark :) ). |
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.
r=me
set(&mut config.dist_include_mingw_linker, include_mingw_linker) | ||
set(&mut config.dist_include_mingw_linker, include_mingw_linker); | ||
config.dist_vendor = vendor.unwrap_or_else(|| { | ||
// If we're building from git or tarball sources, enable it by default. |
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.
What's the alternative option to these two? Someone clones git and then deletes .git?
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.
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.
Another case that fits this scenario is using this download button:
That produces a broken source archive as all git submodules missing. You can't even build the standard library from that archive as both stdarch (core::arch
) and backtrace (std::backtrace
) are submodules.
@bors r=Kobzol,Mark-Simulacrum |
…r, r=Kobzol,Mark-Simulacrum make dist vendoring configurable Adds a new option `dist.vendor` which allows people to decide whether to vendor dependencies for their custom distribution tarball builds. Note that our builds will not be affected, as the default for this option is the same as the previous vendoring condition from bootstrap.
…r, r=Kobzol,Mark-Simulacrum make dist vendoring configurable Adds a new option `dist.vendor` which allows people to decide whether to vendor dependencies for their custom distribution tarball builds. Note that our builds will not be affected, as the default for this option is the same as the previous vendoring condition from bootstrap.
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
@bors r- |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
7e0fb6e
to
13542cd
Compare
Rebased. @bors r=Kobzol,Mark-Simulacrum |
@@ -942,3 +942,6 @@ | |||
# Copy the linker, DLLs, and various libraries from MinGW into the Rust toolchain. | |||
# Only applies when the host or target is pc-windows-gnu. | |||
#include-mingw-linker = true | |||
|
|||
# Whether to vendor dependencies for the dist tarball. | |||
#vendor = if "is a tarball source" || "is a git repository" { true } else { false } |
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.
It shouldn't be necessary to vendor when building from a source tarball. We can just reuse the existing vendor directory.
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.
I thought about that, but then decided to leave the task to cargo
instead of handling it manually. I couldn't get rid of the paranoia about users potentially cluttering the vendor folder.
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.
It shouldn't be necessary to vendor when building from a source tarball. We can just reuse the existing vendor directory.
Exactly!
I'm building using a source release tarball (when packaging for pkgsrc), and expect the tarball to be self-contained. Ref. issue #130708.
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#129439 (Implement feature `string_from_utf8_lossy_owned` for lossy conversion from `Vec<u8>` to `String` methods) - rust-lang#129828 (miri: treat non-memory local variables properly for data race detection) - rust-lang#130110 (make dist vendoring configurable) - rust-lang#130293 (Fix lint levels not getting overridden by attrs on `Stmt` nodes) - rust-lang#130342 (interpret, miri: fix dealing with overflow during slice indexing and allocation) Failed merges: - rust-lang#130394 (const: don't ICE when encountering a mutable ref to immutable memory) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130110 - onur-ozkan:configurable-dist-vendor, r=Kobzol,Mark-Simulacrum make dist vendoring configurable Adds a new option `dist.vendor` which allows people to decide whether to vendor dependencies for their custom distribution tarball builds. Note that our builds will not be affected, as the default for this option is the same as the previous vendoring condition from bootstrap.
Adds a new option
dist.vendor
which allows people to decide whether to vendor dependencies for their custom distribution tarball builds. Note that our builds will not be affected, as the default for this option is the same as the previous vendoring condition from bootstrap.