Skip to content

feat(source): replace source filters with filesets#244

Merged
dpc merged 1 commit into
rustshop:masterfrom
dpc:dpc/jj-yvmrsuxpsrty
Jul 24, 2026
Merged

feat(source): replace source filters with filesets#244
dpc merged 1 commit into
rustshop:masterfrom
dpc:dpc/jj-yvmrsuxpsrty

Conversation

@dpc

@dpc dpc commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Posted by Tau

Summary

Replace Flakebox’s bespoke source filtering API with a thin flakeboxLib.source namespace built on nixpkgs filesets. The new API validates literal paths, exposes upstream set composition, retains an explicit directory-pruning predicate escape hatch, and offers glob traversal as an explicit alternative. Migrate Flakebox, its template, checks, and documentation to raw path roots and remove the legacy API without compatibility aliases.

Details

Add filesetFromPaths, fromFileset, fromPaths, and feature-detected fromGlobs, plus canonical all, any, not, and excludeDirectoriesNamed filters. Focused fixtures verify source identity under excluded and selected content changes, literal validation, out-of-root rejection, missing and optional paths, overlap/duplicate set semantics, composition, symlinks, nested pruning, basename boundaries, combinator short-circuiting, and glob behavior. The migration also removes stale nonexistent .cargo selections that fileset validation exposed in two check fixtures.

Reviews

An independent holistic review passed with no actionable correctness, completeness, Nix semantics, API, test, documentation, or migration findings.

Validation

nix develop -c selfci check passes all main, treefmt/lint, and flake-check jobs. The focused source test build and nix flake check --no-build also pass.

@dpc
dpc marked this pull request as ready for review July 24, 2026 18:24
### Summary

Replace Flakebox’s bespoke source filtering API with a thin `flakeboxLib.source` namespace built on nixpkgs filesets. The new API validates literal paths, exposes upstream set composition, retains an explicit directory-pruning predicate escape hatch, and offers glob traversal as an explicit alternative. Migrate Flakebox, its template, checks, and documentation to raw path roots and remove the legacy API without compatibility aliases.

### Details

Add `filesetFromPaths`, `fromFileset`, `fromPaths`, and feature-detected `fromGlobs`, plus canonical `all`, `any`, `not`, and `excludeDirectoriesNamed` filters. Focused fixtures verify source identity under excluded and selected content changes, literal validation, out-of-root rejection, missing and optional paths, overlap/duplicate set semantics, composition, symlinks, nested pruning, basename boundaries, combinator short-circuiting, and glob behavior. The migration also removes stale nonexistent `.cargo` selections that fileset validation exposed in two check fixtures.

### Reviews

An independent holistic review passed with no actionable correctness, completeness, Nix semantics, API, test, documentation, or migration findings. GitHub lint subsequently caught invalid placeholder TOML in the focused fixtures; replace it with valid empty workspace manifests so the repository-wide Cargo check can parse them.

### Validation

`nix develop -c selfci check` passed all main, treefmt/lint, and flake-check jobs after the rebase and fixture correction. The repository pre-commit hook, focused source test build, and `nix flake check --no-build` also passed.
@dpc
dpc force-pushed the dpc/jj-yvmrsuxpsrty branch from 9750cb8 to f544a0d Compare July 24, 2026 18:28
@dpc
dpc merged commit 633949e into rustshop:master Jul 24, 2026
4 checks passed
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.

1 participant