Repository navigation
Update Rust crate guppy to 0.19 - #20
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
2 times, most recently
from
September 7, 2026 19:14
e1eef43 to
905dc12
Compare
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
3 times, most recently
from
September 19, 2026 03:42
d0724b7 to
ba164f3
Compare
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
2 times, most recently
from
September 30, 2026 21:34
aadb74f to
81a40df
Compare
renovate
Bot
force-pushed
the
renovate/guppy-0.x
branch
from
October 13, 2026 13:45
81a40df to
681114f
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.19Release Notes
guppy-rs/guppy (guppy)
v0.19.1: guppy 0.19.1Compare Source
Added
New features:
custom-platforms: Add support for custom platforms specified as JSON.custom-cfg-platforms: Add support for custom platforms specified asrustc --print=cfgoutput.These features forward to
target-spec'scustomandcustom-cfgfeatures, respectively.Thanks UebelAndre for your contribution!
v0.19.0: guppy 0.19.0Compare Source
Added
ConditionalLink::declarations, which returns a newLinkDeclarationsenum: whether the link's platform statuses were derived from every
declaration of the dependency (
Unsplit), only the ones withoutoptional = true(Required), or only the ones with it (Optional).LinkDeclarations::includes_requiredandincludes_optionalanswer whethera link covers a given kind of declaration.
Changed
ConditionalLink::package_linkis replaced bypackage_links, an iteratorover every
PackageLinkthe conditional link was derived from. This isusually one link, but one dependency name can resolve to several packages,
either through a
package = "..."rename or through different versions ofone package declared for different targets. For example, consider this
Cargo.toml:The package graph has two links out of
main,main -> serde_coreandmain -> serde, both with the dependency nameserde. The featureserdeproduces three conditional links:
main/serde -> main/dep:serde, fromdep:serde. This activates thedependency name, so
package_linksreturns bothmain -> serde_coreandmain -> serde.main/serde -> serde_core/std, fromserde/std.package_linksreturnsonly
main -> serde_core.main/serde -> serde/std, also fromserde/std.package_linksreturnsonly
main -> serde.FeatureQuery::resolve_withandresolve_with_fnnow visit a weak dependencyfeature (
dep?/feature) once for each kind of declaration ofdep, not oncefor the whole edge. Consider:
The visitor sees
weak -> foo/stdas aRequiredlink covering[dependencies]. Ifdep:foois activated, it sees the same endpoints againas an
Optionallink covering[build-dependencies]. The edge is followed ifthe visitor accepts either link. Use
ConditionalLink::declarationsto tellthe two apart.
FeatureSet::conditional_linksis unchanged: it returns oneUnsplitlink for the edge.This is part of the fix to weak dependency features described below.
Fixed
Features that refer to a dependency name shared by several packages now take
all of those packages into account (#682).
One dependency name can resolve to several packages, either through a
package = "..."rename or through different versions of one packagedeclared for different targets. For example,
semver1.0.28 does somethinglike this:
The name
serderesolves to bothserde_coreandserde. Previously, thefeature graph kept only one of the packages under each name. For
semver,that was
serde, whichcfg(any())never builds, so enabling theserdefeature left
serde_coreout of guppy's feature resolution, and thereforeout of
CargoSetresults.Now, matching Cargo:
dep:serdeis activated wherever any declaration ofserdeapplies.serde/featureturns onfeaturein each package, under that package'sown platform conditions. It also activates
dep:serdewherever anoptional declaration of any of the packages applies.
serde?/featureturns onfeaturein each package that is otherwiseactivated, again under that package's own platform conditions.
As a result, if only some of the packages under a name have a feature that
name/featureorname?/featurerefers to, the feature graph now reports amissing-feature warning for the others. (Cargo itself rejects such a
manifest, so this only happens with metadata that didn't come from Cargo.)
Thanks UebelAndre for your first
contribution!
With the version 2 and 3 feature resolvers, an optional build dependency
activated only through its own package's features was never built (#699):
Enabling
bundlednow buildsccon the host, as Cargo does.cc/featureentries and the version 1 resolver were not affected.
Fixed a number of more contrived cases in guppy's simulation of Cargo's
feature resolution:
Several bugs with weak dependency features (
dep?/feature). guppy trackedwhether
depwas activated at all, whereas Cargo resolves each declarationof
depon its own. Consider:Previously, enabling
weak:dep:foo, sofoowas also built on the host. It no longerdoes, and the feature graph no longer has an edge from
weaktodep:foo. A dependency required on one platform and optional on anotherhad
dep:fooadded the same way.stdon thefoothathelperbuilds on the host, even thoughnothing had activated foo's optional build declaration. Now only the
foobuilt on the target gets
std.dep:barin the same way, sobarwas also built on thetarget. Now
baronly getsstdon the host, where it is required, andis not built on the target.
Of these, the second did not affect the version 1 resolver, which unifies
features across the host and the target.
As part of this fix,
FeatureQuery::resolve_withandresolve_with_fnvisit a weak dependency feature once for each kind of declaration. See the
entry under "Changed" above.
Reverse feature queries with
FeatureQuery::resolve_withorresolve_with_fncould leave out weak dependency features, depending onwhich features the query started from. For example,
regex-automatahas:A reverse query from
aho-corasick/loggingdid not returnregex-automata/logging.Reverse queries now offer both links of a weak dependency feature as soon as
it is reached. With a visitor that accepts every link, a reverse query
returns the same set as
FeatureQuery::resolve. Forward queries areunchanged.
A
foo/stdentry could also turn on a feature namedfooin the samepackage, in cases where Cargo doesn't. For example:
On Unix:
foo-stdturns onfoo'sstdfeature. It doesn't turn onmain'sfoofeature, becausefoois only optional on Windows.bar-stdturns onbar'sstdfeature. It doesn't turn onmain'sbarfeature, becausebaris never optional.Previously, guppy also turned on:
main'sfoofeature on Unix.main'sbarfeature on all platforms.guppy now matches Cargo:
foo/stdonly turns onmain'sfoofeature if an optional declarationof
fooapplies to the platform. Here, that is true only on Windows.barhas no optional declarations, sobar/stdnever turns onmain'sbarfeature.As part of this change,
ConditionalLink::declarationsreturnsOptional,not
Unsplit, for the links fromfoo-stdtodep:fooand tofoo.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.