This commit fixes the interaction of `cargo fix` and `RUSTC_WRAPPER`, ensuring
that Cargo at least doesn't die internally. For now `RUSTC_WRAPPER` is
overridden for normal execution but we can eventually one day probably support
`RUSTC_WRAPPER`!
Closes#5981
Force `cargo fix` to rebuild
Fixes#5736
This is a resubmit of @killercup's #5750, rebased on current master.
@alexcrichton From browsing the code I feel like `-p` would still restrict the packages to rebuild, despite the rebuild flag added. But I might be misreading or not-fully-reading the code. Could you give me some mentoring instructions for the test cases you're concerned with?
Add `--allow-staged` to `cargo fix`
Fixes#5737
This is @jljusten's branch, adapted to the testsuite changes in master.
Submitted as an alternative to #5910 to expedite #5737 resolution in time for Edition RC 1.
* master: (25 commits)
Migrate from tests fom assert_that/execs to .run()
Wrap ProcessBuilder in Execs & make .cargo return that
Make old Execs methods take not consume self
Extract Execs::match_process
Add #[must_use] to Execs
Inline Execs::_with_stderr
Remove an unrun "cargo build" ProcessBuilder
Add documentation for creating test dependencies.
Only use non-absolute paths for `path` dependencies
Fix test failure on nightly due to `codemap::Span` change.
New metabuild strategy using custom src_path enum.
Remove unnecessary change.
Address review comments.
Metabuild (RFC 2196)
Handle Window's missing file error message
Make "cargo uninstall" uninstall the cwd bins
update comment based on further research
List URL in HTTP download failures
Fix compilation error
Improve the `cargo install` deprecation messaging
...
Previously Cargo would use a non-absolute path for any dependency contained
within the workspace root but this switches Cargo to only using relative paths
for `path` dependencies. In practice this shouldn't make much difference, but
for vendored crates and moving around `CARGO_HOME` it can produce more
consistent results when target directories are shared.
Closes#5923
- Use new enum `TargertSourcePath` for Target::src_path to make it explicit that metabuild has a special path.
- `cargo metadata` now skips the metabuild Target.
- JSON artifacts include the true path to the metabuild source file. This may not be the best solution, but it's unclear what it should be, and I would prefer to avoid breaking the output. Alternatively it could just not emit anything? I'm not completely familiar with the use case of these artifact messages.
- Place the file in `target/.metabuild/metabuild-pkgname-HASH.rs` instead of in the debug/release directory. Its contents do not depend on the profile.
- Fix bug in write_if_changed.
- More tests.