Skip to content

Commit

Permalink
[guppy] updates, prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Feb 22, 2025
1 parent a7b1c61 commit 25af128
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 7 additions & 0 deletions guppy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.17.17] - 2025-02-21

### Added

- Add `PlatformEval::target_specs` to obtain the list of `TargetSpec` instances backing a platform evaluator. Thanks to [anforowicz](https://github.com/anforowicz) for the contribution!

## [0.17.16] - 2025-02-15

### Added
Expand Down Expand Up @@ -755,6 +761,7 @@ lazy_static = "0.2"

- Initial release.

[0.17.17]: https://github.com/guppy-rs/guppy/releases/tag/guppy-0.17.17
[0.17.16]: https://github.com/guppy-rs/guppy/releases/tag/guppy-0.17.16
[0.17.15]: https://github.com/guppy-rs/guppy/releases/tag/guppy-0.17.15
[0.17.14]: https://github.com/guppy-rs/guppy/releases/tag/guppy-0.17.14
Expand Down
16 changes: 10 additions & 6 deletions guppy/src/platform/platform_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ pub enum EnabledTernary {
Disabled,
/// The status of this dependency is unknown on this platform.
///
/// This may happen if evaluation involves unknown target features. Notably, this will not be
/// returned for `Platform::current()`, since the target features for the current platform are
/// known.
/// This may happen if evaluation involves unknown target features. Notably,
/// this will not be returned for [`Platform::build_target()`], since the
/// target features for the build target platform are determined at compile
/// time.
Unknown,
/// The dependency is enabled on this platform.
Enabled,
Expand Down Expand Up @@ -174,9 +175,12 @@ impl<'g> PlatformEval<'g> {
res
}

/// Returns the target specs.
pub fn specs<'a>(&'a self) -> impl Iterator<Item = &'g TargetSpec> + 'a {
self.specs.iter()
/// Returns the [`TargetSpec`] instances backing this evaluator.
///
/// The result of [`PlatformEval::eval`] against a platform is a logical OR
/// of the results of evaluating the platform against each target spec.
pub fn target_specs(&self) -> &'g [TargetSpec] {
self.specs
}
}

Expand Down

0 comments on commit 25af128

Please sign in to comment.