Commit Graph

42 Commits

Author SHA1 Message Date
Ed Page
a645c4fef0 refactor(source): Replace bool with enum 2022-07-21 09:27:01 -05:00
Ed Page
6a62d35458 refactor(registry): Move query out-param to be last 2022-07-20 12:54:16 -05:00
Arlo Siemsen
82093ad9dc Registry functions return task::Poll to enable parallel fetching of index data. 2022-02-28 12:22:11 -08:00
Alex Crichton
c687d83ada Remove authors directives from Cargo crates
Most of these are pretty dated and Cargo defaults nowadays to not
emitting an `authors` field so this commit also removes them from the
manifests.
2021-10-22 10:27:20 -07:00
Weihang Lo
0afd40b4de
Update tests to display dep-req info for dep-chain 2021-08-24 00:39:38 +08:00
Alik Aslanyan
8ee76f6082
Weather is not nice today.. 2021-07-23 17:15:14 +04:00
Dustin J. Mitchell
76a079cbd9 Factor version preferences into a struct
This concentrates all of the "prefer this version" logic previously
handled with `try_to_use` and `prefer_patch_deps` parameters into a
struct that hides both the reason a package version might be preferred
and the form that preference took (Dependency or PackageId).  Besides
simplifying `RegistryQuerier::query` slightly, this invites further
refinements to version preferences to support new cargo features.
2021-07-18 21:05:16 +00:00
Dustin J. Mitchell
bd4a353e98 Prefer patched versions of dependencies
When selecting among several versions of a paackage, prefer versions
from `[patch]` sections over other versions, similar to how locked
versions are preferred.

Patches come in the form of a Dependency and not a PackageId, so this
preference is expressed with `prefer_patch_deps`, distinct from
`try_to_use`.
2021-07-09 18:23:21 +00:00
David Tolnay
396bdd3a89
Remove parsing of broken version syntax from 5 years ago 2021-05-26 14:37:39 -07:00
Eric Huss
10eb56f2c4 Update clippy lint allow set. 2021-04-13 09:02:07 -07:00
bors
fb45eb132e Auto merge of #9292 - ehuss:cargo-util, r=alexcrichton
Split out cargo-util package for cargo-test-support.

This splits out code from `cargo` that was being used by `cargo-test-support` in order to remove the dev-dependency cycle on the `cargo` crate. The intent here is to improve development build times. On my system, `touch src/cargo/lib.rs ; cargo check --profile=test` goes from 6.4 seconds to 3.5. I suspect more substantial changes (more than just `touch`) should exhibit even more improvements.

This has a substantial downside that it is another package to manage publishing, particularly with making sure the version is updated correctly for crates.io. I'm uncertain if on balance it is worth it, but I lean towards moving forward with it.
2021-03-22 14:11:51 +00:00
Eric Huss
378b086f2c Fix redundant_semicolons warning in resolver-tests. 2021-03-20 17:44:08 -07:00
Eric Huss
dbfdd49559 Move is_ci to cargo-util. 2021-03-20 17:42:32 -07:00
Kornel
3f7f0942cd track_caller on custom assert functions 2021-03-03 17:17:07 +00:00
Joshua Nelson
a5720117fe Make nightly_features_allowed a field instead of a function
`nightly_features_allowed()` is no longer doing any work, so it can be
accessed directly. This also renames the `enable_nightly_features` field
to `nightly_features_allowed`.
2021-02-24 15:11:31 -05:00
Joshua Nelson
4b096beaed Fix masquerade_as_nightly_cargo in work threads
Previously, since `ENABLE_NIGHTLY_FEATURES` and
`NIGHTLY_FEATURES_ENABLED` were thread locals, reading them in any other
thread would always say nightly features were disabled. Now, they are
tied to the `Context` itself, so it is both more clear how the variables
are being set and fixes the behavior within work threads.

Note that `Context` is not thread-safe, so this passes a boolean through
to `BuildOutput::parse`.
2021-02-24 14:43:00 -05:00
Eric Huss
b731190daa Add a future-compatibility warning on allowed feature name characters. 2020-10-27 14:23:35 -07:00
Eric Huss
bcfdf9fbad New namespaced features implementation. 2020-10-23 16:04:41 -07:00
bors
5847787fef Auto merge of #8274 - Eh2406:8249-repro, r=alexcrichton
reset lockfile information between resolutions

#8249 pointed out that some kind of lockfile data was leaking between calls to the resolver. @ehuss made a reproducing test case. This PR resets the `LockedMap` data structure when calling `register_previous_locks`.

lets see if CI likes it.
fix #8249
2020-06-01 16:01:10 +00:00
Eh2406
8ce0d02971 confirm that it is not a bug at resolver level 2020-05-28 15:43:30 -04:00
Daniel Wagner-Hall
556c236f9a Bump to semver 0.10 for VersionReq::is_exact
This stops using `to_string` as a proxy for this now-provided precise API.

This reverts commit b71927224f and bupms the
dependency version in Cargo.toml.
2020-05-25 11:11:45 +01:00
Linus Färnstrand
c428c0ef41 Use associated constants directly on primitive types instead of modules 2020-04-06 23:37:06 +02:00
Eric Huss
944f5049f1 Re-implement proc-macro feature decoupling. 2020-03-22 15:08:02 -07:00
Eric Huss
0b115f57aa -Zfeatures=host_dep: Support decoupling proc-macro features. 2020-03-15 15:59:42 -07:00
Eric Huss
0279e8e63a Fix using global options before an alias. 2020-01-31 13:56:06 -08:00
Eric Huss
0b653a43ba Rename Kind 2020-01-11 11:04:13 -08:00
Eric Huss
91015d52ce Add --config CLI option. 2019-12-19 09:44:02 -08:00
Eric Huss
381251aa1f Config refactoring. 2019-12-19 09:44:01 -08:00
Igor Makarov
1c5861c8b4 implement clippy suggestion to remove redundant clone 2019-11-12 10:56:27 +02:00
Igor Makarov
6d21f9e08c silence several clippy lints in tests 2019-11-12 10:54:59 +02:00
Alex Crichton
a92fd48fb4 Improve error message for cyclic dependencies
First reported in rust-lang/rust#65014 it looks like our error message
on cyclic dependencies may be confusing at times. It looks like this is
an issue because there are multiple paths through a graph for a
dependency, so using the generic `path_to_top` function isn't producing
the most useful path for this purpose.

We're already walking the graph though, so this commit adds an extra
parameter which collects the list of packages we've visited so far to
produce a hopefully always-accurate error message showing the chain of
dependencies end-to-end for what depends on what.
2019-10-07 16:50:42 -07:00
Eh2406
0750caffe8 add a test to show the new performance 2019-09-27 17:31:02 -04:00
Eh2406
c14bb6e073 minimal-copy deserialize for InternedString and use InternedString more places 2019-09-03 10:26:15 -04:00
Eric Huss
e26ef01743 Refactor resolve Method 2019-07-27 16:21:24 -07:00
Eric Huss
51a8206c38 Be more consistent about detecting CI. 2019-07-25 12:10:55 -07:00
Eric Huss
a4e9611453 Fix some formatting for some strings. 2019-07-13 16:00:47 -07:00
bors
37cb9bbe24 Auto merge of #7045 - Eh2406:resolver-test/debug-cleanup, r=alexcrichton
Resolver test/debug cleanup

This is several small things salvaged from abandoned PRs and implemented on top of #7011

In working on this I noted that the prop tests are very sensitive to whether backtrace are turned on. Maybe we should set that env to 0 for that builder?
2019-06-21 01:30:05 +00:00
Jeremy Stucki
930134c75b
Rename to_url -> into_url 2019-06-20 16:53:24 +02:00
Eh2406
034c5908d8 check that the SAT solver exempts the result from the resolver 2019-06-19 16:58:25 -04:00
Eh2406
f203deaa05 optimize conflict_store for looking up only older matches 2019-06-19 13:02:08 -04:00
Eh2406
f4bd3a4c6e dont have arg if it is all ways pkg_id("root") 2019-06-19 11:59:33 -04:00
Alex Crichton
290a727ad0 Extract resolver tests to their own crate
These tests take a good amount of time to run locally and they're also
causing a lot of dependencies to get pulled into rust-lang/rust, so
let's have a separate crate that we just test on our own CI
2019-06-18 10:50:48 -07:00