jj/cli/examples
Yuya Nishihara e55d03a2ee revset: introduce type-safe user/resolved expression states
This helps add library API that takes resolved revset expressions. For example,
"jj absorb" will first compute annotation within a user-specified ancestor range
such as "mutable()". Because the range expression may contain symbols, it should
be resolved by caller.

There are two ideas to check resolution state at compile time:
<https://github.com/martinvonz/jj/pull/4374>

 a. add RevsetExpressionWrapper<PhantomState> and guarantee inner tree
    consistency at public API boundary
 b. parameterize RevsetExpression variant types in a way that invalid variants
    can never be constructed

(a) is nice if we want to combine "resolved" and "unresolved" expressions. The
inner expression types are the same, so we can just calculate new state as
Resolved & Unresolved = Unresolved. (b) is stricter as the compiler can
guarantee invariants. This patch implements (b) because there are no existing
callers who need to construct "resolved" expression and convert it to "user"
expression.

.evaluate_programmatic() now requires that the expression is resolved.
2024-11-08 09:56:33 +09:00
..
custom-backend backend: make write methods async 2024-09-04 18:34:11 -07:00
custom-command cli: pass &Ui to parse fileset/revset/template functions 2024-09-20 23:01:12 +09:00
custom-commit-templater revset: introduce type-safe user/resolved expression states 2024-11-08 09:56:33 +09:00
custom-global-flag cli: extract CommandError and helper functions to new module 2024-03-03 01:11:46 +09:00
custom-operation-templater templater: pass diagnostics receiver around 2024-09-23 07:07:07 +09:00
custom-working-copy cli: Support renaming workspaces 2024-09-16 19:35:36 -07:00