Update Rust crate guppy to 0.18 - #20
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
from
September 3, 2026 00:27
09d5269 to
e1eef43
Compare
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
from
September 7, 2026 19:14
e1eef43 to
905dc12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.17→0.18Release Notes
guppy-rs/guppy (guppy)
v0.18.0: guppy 0.18.0Compare Source
Added
PlatformSpec::Platforms, a new variant holding a list of platforms(#438, #630), and
PlatformSpec::platforms, a constructor that acceptsany iterator of
PlatformorArc<Platform>. A query againstPlatformsisenabled if it is enabled on at least one of the platforms.
Platforms([])isthe union of no platforms: nothing is enabled on it, not even unconditional
dependencies.
Per-platform results are combined with the same Kleene K3
OR
that
guppyalready uses to combine a dependency's target specs for a singleplatform:
Enabledwins, thenUnknown, thenDisabled.Changed
PackageQueryandFeatureQueryare now represented as a set of initialnodes plus a direction, sharing their internal bitset representation with
PackageSetandFeatureSet(#609, #610).PackageQuery::initialsnow returns a&PackageSet, andFeatureQuery::initialsa&FeatureSet, rather than iterators overmetadatas. To obtain the old iterators, use
initials().packages(direction)andinitials().features(direction).PackageQuery::starts_fromandFeatureQuery::starts_fromare removed.Use
initials().contains(id)instead, which returns the sameResult<bool, Error>.Debugoutput of both query types now goes through the set types'Debugimpls.PackageQuery'sDebugno longer dumps the entirepackage graph, and
FeatureQuery's now prints its initial packages withtheir features.
opaque context (#497, #601, #602, #604):
PackageResolveris nowPackageLinkVisitor, andFeatureResolverisnow
FeatureLinkVisitor. The "resolver" name was easily confused withthe Cargo feature resolver, and the trait visits links rather than
packages or features.
acceptis nowvisit_linkon both traits.visit_link(and the closures passed toPackageQuery::resolve_with_fnand
FeatureQuery::resolve_with_fn) takes a&PackageLinkContextor&FeatureLinkContextinstead of a&PackageQueryor&FeatureQuery.The query is available via
query(); the context also providesdirection()andstarts_from_initial(&link).CargoSet::with_package_resolveris nowCargoSet::with_cargo_link_visitorand takes a newCargoLinkVisitortrait (in
guppy::graph::cargo). ItsCargoLinkContextexposes whichpass the link is being evaluated for (
build_platform()), the platformspecs in effect (
platform_spec()andbuild_dep_platform_spec()), andwhether dev and build dependencies are under consideration for the link
(
considers_dev_depsandconsiders_build_depsrespectively).proptest1feature,Prop010Resolveris nowProp010LinkVisitorandPackageGraph::proptest1_resolver_strategyisnow
proptest1_link_visitor_strategy.CargoOptions::newnow defaults to version 3 of the Cargo featureresolver
rather than version 1 (#624). To restore the old behavior, call
set_resolver(CargoResolverVersion::V1).CargoSetInputsstruct inguppy::graph::cargocombinesCargoOptionsand the features-only set, andCargoSetnow keeps a copyof the inputs it was built with, available via
CargoSet::inputs(#627).
CargoSet::features_onlyis removed; useinputs().features_onlyinstead.summariesfeature,CargoOptionsSummaryis renamed toCargoSetInputsSummary, andCargoSet::to_summaryuses the inputs theset was built with (#625). Each
features-onlyentry now recordswhether the package's base feature is enabled, writing
base = falsewhenit isn't (#626). The field defaults to true, so existing summaries
continue to work.
PlatformSpec::Platformis removed in favor ofPlatformSpec::Platforms(see above). With the
summariesfeature,PlatformSpecSummary::Platformis likewise replaced by
PlatformSpecSummary::Platforms(Vec<PlatformSummary>)(#630).continues to work. Zero or several platforms are serialized as an array
(
target-platform = []or[[target-platform]]), which older versions ofguppycannot read.summariesfeature,PlatformSpecSummary::to_platform_specnowreturns
PlatformSpecSummaryError, which names the platform that could notbe converted, instead of a bare
TargetSpecError(#628). The error alsorecords the position of the failing platform within a list, available via
its
indexandcountmethods. Both itsDisplayoutput andError::InvalidPlatformSpecSummary's name the triple and, for a list, theposition.
element or key, rather than serde's "data did not match any variant"
message (#629). The following are rejected:
"always"and"any"insidea list;
specalongside any platform key such astripleortarget-features; unknown keys in a platform table; empty triples; andspecvalues other than"always"or"any". (Previously,spec = "<triple>"was silently treated as that platform.)PackageMetadata::minimum_rust_versionis renamed toPackageMetadata::rust_version, replacing the deprecated method of thatname (#616). As a result,
rust_versionnow returnsOption<&Version>rather than
Option<&VersionReq>..matches(version)on the old return value will fail tocompile; use
version >= *rust_versioninstead.change from a requirement such as
>=1.65.0to a plain version such as1.65.0.summariesfeature,tomlis updated to 1.1.4 (#600).Error::TomlSerializeErrornow wrapstoml1.x'sser::Error, a breakingchange for code that names that type. Summaries are parsed strictly
according to the TOML 1.1 specification; documents that the lenient
toml0.5 parser accepted but that are not valid TOML are now rejected.
Removed
The following deprecated APIs are removed (#616):
PackageMetadata::rust_version's old form, deprecated since 0.17.1, whichreturned an
Option<&VersionReq>with a single>=X.Y.Zcomparatorsynthesized from the
rust-versionfield. See the rename above for thereplacement.
BuildTarget::doc_tests, deprecated since 0.17.16. UseBuildTarget::doctest_by_defaultinstead.PlatformSpec::current, deprecated since 0.17.13. UsePlatformSpec::build_targetinstead.debug_ignorecrate at the root ofguppy.Depend on
debug-ignoredirectly ifyou need it.
Fixed
FeatureSet::union,intersection,differenceandsymmetric_differencenow panic, as documented, if the two sets were built from different package
graphs (#608). Previously the check compared
self's graph against itselfand could never fire, so mismatched sets silently produced an invalid result.
(The corresponding
PackageSetoperations already checked this correctly.)summariesfeature, rebuilding Cargo set inputs from a summary nolonger silently drops the features-only set (#625).
v0.17.26: guppy 0.17.26Compare Source
Fixed
A node with a self-loop edge -- typically a package with a
pathdev-dependency on its own crate, or a feature node like
base/[base]arising from one -- was treated inconsistently by several APIs. The root
cause was that self-edges were counted as incoming edges in the SCC and
topological-sort machinery, which transitively confused everything built
on top:
Sccs::externals/ forward roots. Previously, a package whose onlyincoming edge was its own self-loop was excluded from the set of forward
roots, so callers iterating over
query_workspace().resolve().root_ids(_)did not see it, and forwardlink enumeration on it was broken. Now, self-loop edges no longer
disqualify a node from being a forward root: a single-node SCC is
external iff it has no incoming edges from outside its own SCC.
(#586)
TopoWithCycles::newfilteredself-looping nodes out of its root set for the same reason, dropping
them from the DFS and then placing them and their descendants at the
end of the topological order via a best-effort fallback. Now, the
root-set predicate accepts a node whose only incoming edge is its own
self-loop, so such nodes are visited in DFS order alongside other
roots. (#589)
Cycles::is_cyclicandfeature::Cycles::is_cyclic. Previously,these were reflexively
truefor every package or feature, regardlessof actual cycle membership. Now, they return
trueonly when theargument lies on a directed cycle: either in a multi-node SCC, or in a
single-node SCC with a self-loop edge. This is a behavior change, but
in the context of the rest of this release is being treated as a
bugfix. (#590)
Cycles::all_cyclesandfeature::Cycles::all_cycles. Previously,these reported only SCCs of two or more elements. Now, they also yield
single-node SCCs whose node has a self-loop edge, in topological order
alongside multi-node SCCs. This makes
all_cycles()andis_cyclic(x, x)agree on what counts as a cycle. (#590)FeatureGraphWarning::SelfLoop. Previously, this warning wasemitted for every self-loop edge in the feature graph, including
legitimate ones such as a path dev-dependency on the package's own
crate. Now, it is restricted to named-feature self-loops like
[features] a = ["a"], which really are user errors. (#592)Documentation
PackageGraph::directly_depends_onandFeatureGraph::directly_depends_on. Previously, both documentedthemselves as returning
falsewhen the two IDs were equal. Theimplementation has always called
dep_graph.contains_edge(a, b),which correctly returns
truefor self-loop edges, so thedocumentation contradicted the behavior. The documentation has now
been corrected to match.
FeatureGraph::directly_depends_on. Previously, the docstringread "returns true if
feature_ais a direct dependency offeature_b," with the operands inverted relative to the actualimplementation. Now the docstring reflects the implementation:
returns true if
feature_bis a direct dependency offeature_a.(#591)
Cycles] type-level documentation. Previously, the long-formdocumentation talked exclusively about multi-node cycles (like
serdeandserde_derive). It now also acknowledges single-nodeself-loop cycles as a case.
v0.17.25: guppy 0.17.25Compare Source
Added
Cargo metadata generated on Windows is now parseable on Unix. Windows paths are always normalized to forward slashes on Unix, which allows operations like
.parent()to work. (Cross-platform parsing is not fully tested yet so you might run into issues. Please file a bug if you do.)v0.17.24: guppy 0.17.24Compare Source
Added
Workspace::build_directory()returns the build directory for intermediate build artifacts (requires Cargo 1.91+).Workspace::default_members()andWorkspace::default_member_ids()iterate over workspace default members (requires Cargo 1.71+; returns empty iterator for older Cargo versions).PackageLink::registry()returns the registry URL for a dependency, if it uses a non-default registry.PackageLink::path()returns the file system path for path dependencies.v0.17.23: guppy 0.17.23Compare Source
Changed
cargo_metadataupdated to 0.23.0.v0.17.22: guppy 0.17.22Compare Source
Fixed
Replaced obsolete
doc_auto_cfgwithdoc_cfg, to fix Rust nightly builds with thedoc_cfgflag enabled.v0.17.21: guppy 0.17.21Compare Source
Changed
cargo_metadataupdated to 0.22.0.v0.17.20: guppy 0.17.20Compare Source
Changed
cargo_metadataupdated to 0.21.0.v0.17.19: guppy 0.17.19Compare Source
Changed
cargo_metadataupdated to 0.20.0.cargo_metadata. If you run into an error, please update your nightly toolchain. Nightly versions from at least 2024-07 do not appear to produce invalid metadata.v0.17.18: guppy 0.17.18Compare Source
Added
CargoSet::with_package_resolversupports passing in aPackageResolverfor additional dynamic filtering of dependency edges.CargoSet::target_linksandhost_linksreturn the set ofPackageLinkinstances followed on the target and host platforms, respectively.Thanks to anforowicz for these contributions!
v0.17.17: guppy 0.17.17Compare Source
Added
PlatformEval::target_specsto obtain the list ofTargetSpecinstances backing a platform evaluator. Thanks to anforowicz for the contribution!v0.17.16: guppy 0.17.16Compare Source
Added
BuildTarget::test_by_defaultreturns true if tests are run for a build target by default.BuildTarget::doc_by_defaultreturns true if documentation is enabled for a build target, respectively.Changed
BuildTarget::doc_testsis nowBuildTarget::doctest_by_default. The old name has been deprecated, but is kept around for compatibility.v0.17.15: guppy 0.17.15Compare Source
Added
BuildTarget::tests_enabledandBuildTarget::docs_enabledreturn true if tests and documentation is enabled for a build target, respectively.Changed
BuildTarget::doc_testsis nowBuildTarget::doc_tests_enabled. The old name has been deprecated, but is kept around for compatibility.v0.17.14: guppy 0.17.14Compare Source
Added
MetadataCommand::envadds environment variables to thecargo metadatacommand.Thanks to anforowicz for your first contribution!
v0.17.13: guppy 0.17.13Compare Source
Changed
PlatformSpec::currenttoPlatformSpec::build_targetto indicate that it is determined at build time, not at runtime. The old method is still available but has been marked deprecated.v0.17.12: guppy 0.17.12Compare Source
Added
Added support for custom sparse registries (
sparse+https://...). Thanks to jonhoo for your first contribution!v0.17.11: guppy 0.17.11Compare Source
Added
Added support for the upcoming Cargo resolver version
3:
within guppy,
CargoResolverVersion::V3. Resolver version 3 enables MSRV-awareversion resolution in Cargo.
The portion of dependency resolution that guppy works with (package and feature
resolution) happens after dependency versions have been resolved and
Cargo.lockis refreshed. This means that from guppy's perspective, resolverversion 3 is the same as version 2, and
CargoResolverVersion::V3acts as analias for
CargoResolverVersion::V2.v0.17.10: guppy 0.17.10Compare Source
Changed
cargo_metadataupdated to 0.19.1.v0.17.9: guppy 0.17.9Compare Source
Fixed
Cargo.tomlis within a subdirectory of oneof its members. (This is an uncommon situation, but one that is supported by Cargo.)
Changed
cargo_metadataupdated to 0.19.0.v0.17.8: guppy 0.17.8Compare Source
Fixed
Changed
target-specto 3.2.2.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.