Document source group API in the grimoire#789
Conversation
File portions were an intermediate pairing of a file path with a set of line numbers used during file group resolution. They predate the range set merging that file-groups-resolve performs, which makes them obsolete: resolution now produces entries mapping file sources to line range sets directly, and nothing outside the module ever used file portions. Removing them also removes a latent contract mismatch, since the file-portion constructor accepted mutable range sets while file-portion-lines promised immutable ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude <claude@users.noreply.github.com>
There was a problem hiding this comment.
Resyntax analyzed 1 file in this pull request and found no issues.
Co-Authored-By: Claude <claude@users.noreply.github.com>
There was a problem hiding this comment.
Resyntax analyzed 1 file in this pull request and found no issues.
Also, move the source group section to just after the source section in the grimoire.
There was a problem hiding this comment.
Resyntax analyzed 1 file in this pull request and found no issues.
- "install" should have been "analyze" for Git repositories - The diff-based line restriction includes a margin of context lines, not just the touched lines - Single-source groups correspond to file sources specifically, not source? values in general (which include string sources) - Make the bullet labels parallel Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Resyntax analyzed 1 file in this pull request and found no issues.
Source groups now form a commutative monoid: source-group-union combines any number of groups into one, and empty-source-group is the identity element. Since unioning is also idempotent, they're in fact a bounded join-semilattice. The laws hold up to equal?, which is achieved by an internal union-source-group struct that holds a normalized set of non-union subgroups: flattening makes union associative, set semantics make it commutative and idempotent, and collapsing singleton and empty sets makes the identity law hold exactly rather than up to wrapping. Consequently, source-groups-resolve is now source-group-resolve and takes a single group; the CLI unions its target flags into one group before resolving. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
source-group-union-all accepts any sequence of source groups, so callers with collections don't need apply and list coercions; the varargs source-group-union is now a convenience wrapper around it. The CLI unions its vector of target flags with it directly. The kind-specific predicates are no longer exported, since source groups shouldn't be discriminated by kind, and the constructors now just promise source-group? values. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Resyntax analyzed 2 files in this pull request and found no issues.
There was a problem hiding this comment.
Resyntax analyzed 2 files in this pull request and found no issues.
There was a problem hiding this comment.
Resyntax analyzed 2 files in this pull request and found no issues.
There was a problem hiding this comment.
Resyntax analyzed 2 files in this pull request and found no issues.
There was a problem hiding this comment.
Resyntax analyzed 2 files in this pull request and found no issues.
Continuing from #785, this PR documents how Resyntax searches for files to refactor.