Skip to content

feat: Introduce perma unstable --compile-time-deps option for cargo build #15674

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

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

ShoyuVanilla
Copy link
Member

Resolves #14434

@rustbot
Copy link
Collaborator

rustbot commented Jun 17, 2025

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler A-cargo-targets Area: selection and definition of targets (lib, bins, examples, tests, benches) A-cfg-expr Area: Platform cfg expressions A-cli Area: Command-line interface, option parsing, etc. A-documenting-cargo-itself Area: Cargo's documentation A-layout Area: target output directory layout, naming, and organization A-manifest Area: Cargo.toml issues A-timings Area: timings Command-build S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 17, 2025
@rustbot rustbot added the A-cli-help Area: built-in command-line help label Jun 17, 2025
Copy link
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured I'd share my quick thoughts rather than make all wait on a deeper one.

@ShoyuVanilla
Copy link
Member Author

ShoyuVanilla commented Jun 17, 2025

I've pondered upon this more and decided not to introduce new UserIntent/CompileMode and I'll re-request you for reviews once I finished it. Sorry for bothering you

@ShoyuVanilla
Copy link
Member Author

Oh, test failure looks strange 🤔 Maybe something related to Sized changed in rustc nightly?

 test failed running `/Users/runner/work/cargo/cargo/target/debug/cargo build --lib --target custom-target.json -v`
error: process exited with code 101 (expected 0)
--- stdout

--- stderr
   Compiling foo v0.0.1 (/Users/runner/work/cargo/cargo/target/tmp/cit/t1384/foo)
     Running `rustc --crate-name foo --edition=2015 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=d4fb0c790b31c5ca -C extra-filename=-cf2ab74374a2d944 --out-dir /Users/runner/work/cargo/cargo/target/tmp/cit/t1384/foo/target/custom-target/debug/deps --target /Users/runner/work/cargo/cargo/target/tmp/cit/t1384/foo/custom-target.json -L dependency=/Users/runner/work/cargo/cargo/target/tmp/cit/t1384/foo/target/custom-target/debug/deps -L dependency=/Users/runner/work/cargo/cargo/target/tmp/cit/t1384/foo/target/debug/deps`
error: requires `meta_sized` lang_item
  --> src/lib.rs:9:1
   |
9  | / pub trait Sized {
10 | |     // Empty.
11 | | }
   | |_^

@ShoyuVanilla
Copy link
Member Author

I filed a new issue addressing this CI failure #15678

@epage epage enabled auto-merge June 18, 2025 18:03
@epage
Copy link
Contributor

epage commented Jun 18, 2025

Thanks!

auto-merge was automatically disabled June 19, 2025 00:09

Head branch was pushed to by a user without write access

@ShoyuVanilla
Copy link
Member Author

Rebased on master to resolve the CI failure

@epage epage added this pull request to the merge queue Jun 19, 2025
Merged via the queue into rust-lang:master with commit 0b974c0 Jun 19, 2025
24 checks passed
@ShoyuVanilla ShoyuVanilla deleted the comp-time-deps branch June 19, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler A-cargo-targets Area: selection and definition of targets (lib, bins, examples, tests, benches) A-cfg-expr Area: Platform cfg expressions A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-layout Area: target output directory layout, naming, and organization A-manifest Area: Cargo.toml issues A-timings Area: timings Command-build Command-check S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce perma-unstable --compile-time-deps flag
4 participants