Commit graph

15 commits

Author SHA1 Message Date
Alex Crichton 6514c289d2 Improve git error messages a bit
This commit is targeted at further improving the error messages
generated from git errors. For authentication errors the actual URL
fetched is now printed out as well if it's different from the original
URL. This should help handle `insteadOf` logic where SSH urls are used
instead of HTTPS urls and users can know to track that down.

Otherwise the logic about recommending `net.git-fetch-with-cli` was
tweaked a bit and moved to the same location as the rest of our error
reporting.

Note that a change piggy-backed here as well is that `Caused by:` errors
are now automatically all tabbed over a bit instead of only having the
first line tabbed over. This required a good number of tests to be
updated, but it's just an updated in renderings.
2020-06-25 08:47:15 -07:00
Eric Huss d267fac227 Fix panic with cargo tree --target=all -Zfeatures=all 2020-05-22 14:35:07 -07:00
Eric Huss 5907db6599 Fix warning for resolve mismatch in workspace. 2020-04-27 14:16:41 -07:00
Eric Huss 787e75b797 Add resolver opt-in for new feature resolver. 2020-04-19 08:45:18 -07:00
Eric Huss 86ee8cecd3 Fix -Zfeatures=itarget with certain host dependencies 2020-03-27 14:58:03 -07:00
Eric Huss b112255f37 Fix bug with -Zfeatures=dev_dep and check --profile=test. 2020-03-22 10:58:10 -07:00
Eric Huss 0b115f57aa -Zfeatures=host_dep: Support decoupling proc-macro features. 2020-03-15 15:59:42 -07:00
Eric Huss 887ee6cc70 Fix bug with new feature resolver and required-features. 2020-03-03 11:46:37 -08:00
Eric Huss 4d0fda7cd9 Fix bug where an optional dependency is disabled in one fork, and enabled in another. 2020-02-20 12:15:40 -08:00
Eric Huss 8973b95922 Fix bug where required-features didn't work with -Zfeatures=build_dep correctly. 2020-02-20 12:04:28 -08:00
Eric Huss da678a75d5 Add -Zfeatures=all option. 2020-02-20 12:04:28 -08:00
Eric Huss 899067fbec Add a cyclical dev-dep test. 2020-02-20 12:04:28 -08:00
Eric Huss 2c8b9fb5ee Add test for build script being run multiple times. 2020-02-20 12:04:28 -08:00
Eric Huss d728f386e7 Ensure dev-dep features are unified if any are used.
There is a complex issue where `cargo test -Zfeatures=dev_dep` was
building things incorrectly if there was a binary executable. The issue
is that lib.rs needed to be built twice (once linked against normal
dependencies, once against dev dependencies), but the current Unit
structure can't distinguish between the two, and thus it was picking the
wrong one.

Instead of allowing `cargo test` to build binaries without
dev-dependency features, just link main.rs against the
dev-dependency-unified versions.

We may need to revisit this in the future, but for now it is not clear
what people want or how this should work. Fixing this would require
substantial changes to how unit dependencies are computed (to properly
handle deduplication), so for now we'll use a simpler solution. It would
also mean `cargo test` would take longer on some projects (because it
would need to build the library 3 times instead of twice).
2020-02-20 12:04:28 -08:00
Eric Huss 7caa1612cf Add new feature resolver. 2020-02-20 12:04:28 -08:00