Skip to content

checks: improve robustness#320

Merged
NotAShelf merged 11 commits intomasterfrom
robust-checks
Jun 8, 2025
Merged

checks: improve robustness#320
NotAShelf merged 11 commits intomasterfrom
robust-checks

Conversation

@NotAShelf
Copy link
Member

@NotAShelf NotAShelf commented Jun 5, 2025

Changes Nix environment checks to a trait-based, less monolithic design to avoid redundant feature checks for commands that don't require checked features in the first place. There is a performance impact, but in my experience it is... not noticable as per my testing.

Regardless I think this is more robust in design, and introduces further future-proofing the current implementation is not fully capable of. Also provides groundwork for supporting more Nix variants in the future cleanly, without utility functions to check everything one-by-one.

Fixes #305, #309

Closes #315

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and seems to work just fine in my brief testing! Thanks!

@NotAShelf NotAShelf marked this pull request as draft June 6, 2025 11:53
@NotAShelf
Copy link
Member Author

Actually, I think I want to add some regression tests while I'm at it. Property testing is probably not enough.

NotAShelf added 2 commits June 6, 2025 16:45
stdlib has a clean alternative since Rust 1.70
@NotAShelf NotAShelf marked this pull request as ready for review June 8, 2025 19:03
@NotAShelf NotAShelf merged commit 003dd72 into master Jun 8, 2025
5 checks passed
@github-actions github-actions bot deleted the robust-checks branch August 1, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nh checks v2 Failed to extract version Regression 4.0.3 -> 4.1.0 Flakes required when not using flakes

3 participants