Display environment variables for rustc commands
This picks up on the work done in PR #5683.
The extra output is only displayed with `-vv`.
The Windows output has the form `set FOO=foo && BAR=bar rustc ...` instead of
the form that suggested in #5683 to make escaping easier and since it's
simpler.
This picks up on the work done in PR #5683.
The extra output is only displayed with `-vv`.
The Windows output has the form `set FOO=foo && BAR=bar rustc ...` instead of
the form that suggested in #5683 to make escaping easier and since it's
simpler.
Use "test" profile for `cargo build` benchmarks.
When using `cargo build` (without `--release`), build benchmarks using the "test" profile. This was causing some confusion where the benchmark is placed in the `target/debug` directory, and also causing some duplicates that may not be expected. It also makes it easier to debug benchmarks (previously you had to edit the `[profile.bench]` profile).
Closes#5575, closes#6301, closes#4240, closes#4929.
If rustc exits with a signal, previously all you saw was:
```
Compiling foo ...
error: Could not compile `foo`.
To learn more, run the command again with --verbose.
```
Now it shows the complete error by default:
```
Compiling foo ...
error: Could not compile `foo`.
Caused by:
process didn't exit successfully: `rustc ...` (signal: 6, SIGABRT: process abort signal)
```
build: export repository information
The repository string is made available via the `CARGO_PKG_REPOSITORY`
environment variable similar to other metadata.
Validate that the package name contains no invalid characters.
Fixes#2388.
Invalid characters are currently defined as alphanumeric, _, and -. This matches the rustc restrictions but is not as restrictive as `cargo new` or crates.io.
Mostly this is just so there will be better error messages in the case where characters in the package name aren't valid path characters.
Invalid characters are currently defined as alphanumeric, _, and -. This matches the rustc restrictions but is not as restrictive as `cargo new` or crates.io.
Mostly this is just so there will be better error messages in the case where characters in the package name aren't valid path characters.
Don't print crates.io-index URL when Updating
Following the lead from PackageId's Display, only display the registry's
URL if it's not the default registry (aka crates.io).
Before:
$ cargo install lazy_static
Updating registry `https://github.com/rust-lang/crates.io-index`
After:
$ dcargo install lazy_static
Updating crates.io index
Fixes#4208
This change ensures cargo will output file paths in the expected format
(C:\foo\... on Windows, /foo/... elsewhere). Previously it would output
file:// URLs instead.
To support this change, additional changes were made to the test suite
string processing such that [ROOT] is now replaced with the appropriate
file path root for the platform.
The CWD template was also updated to use [CWD] like other replacement
templates and to do the replacement on the expected value rather than
the actual value to avoid replacing things we don't expect with CWD.
This commit stabilizes the `edition` key in `Cargo.toml`, both in the
`[package]` section and inside subtargets. Additionally the `cargo new` and
`cargo init` subcommands have been enhanced with a `--edition` flag to allow
explicitly specifying the edition to be generated.
This commit does not yet change the default edition that's generated.
Closes#5980
.. with mutliple calls of:
fastmod --accept-all '\.cargo\("([^"]+)"\)\.arg\("([^"]+)"\)' '.cargo("${1} ${2}")' tests/testsuite/
until no changes are left.
This changes it so that filters like `--bin`, `--test`, `--example`,
`--bench`, `--lib` will work in a workspace. Today, these filters
require that they match *every* package in a workspace which makes
them not very useful. This change makes it so that they only must
match at least one package.