rez-resolve
БесплатноБез исполняемых скриптовНе проверенRez resolve and solver internals — how the solver works, reading -v debug output, conflicts, cycles and total reductions, graph inspection, patching, caching…
от loonghao350 установок в других каталогахОб этом скилле
Rez resolve and solver
One-sentence summary: the solver narrows scopes of candidate variants until each contains exactly one variant; if it cannot, it reports the failure reason — a conflict, a cycle, or a total reduction.
Skill scope: how the solver works and how to read its output. For request/version syntax see
rez-core-concepts; for the CLI surface see rez-cli. For a failing resolve you need to attribute,
see rez-resolve-troubleshooting.
The algorithm
State model:
- A phase is one state of the solve; it holds a list of scopes.
- A scope is one package request plus the list of variants matching it.
Five operations drive a phase (EXTRACT, MERGE-EXTRACTIONS, INTERSECT, ADD, REDUCE). A sixth, SPLIT, is the cross-phase operation that runs when a phase can go no further:
| Operation | What happens |
|---|---|
| EXTRACT | a dependency common to all variants in a scope is pulled out |
| MERGE-EXTRACTIONS | extracted requests are merged; may simplify, or conflict |
| INTERSECT | an extracted dependency narrows an existing scope — or conflicts |
| ADD | an extraction introduces a new package → new scope |
| REDUCE | a scope drops variants that conflict with another scope |
| SPLIT | phase is exhausted but unsolved → split the first multi-variant scope into two phases, push both |
The solver keeps a phase stack (not recursion): pop a phase, solve it; if exhausted, split and push two; if solved, done; if failed, pop — empty stack means no solution.
Two implementation notes that explain its behavior and speed:
- Scopes cache a set of package families to skip unnecessary reductions — reducing a
fooscope that only touchespython/bahagainstmayais effectively a no-op. - Solver objects are immutable; each change creates a new object built on a shallow copy. That is copy-on-demand, so phases on the stack share state cheaply.
Reading -v debug output
Enable with rez-env -v, up to -vvv.
Scope syntax
| Notation | Meaning |
|---|---|
[foo==1.2.0] |
one variant; null variant (package has no variants) |
[foo-1.2.0[1]] |
one variant; the 1-index variant of foo-1.2.0 |
[foo-1.2.0[0,1]] |
two variants from one package version |
foo[1.2.0..1.3.5(6)] |
6 variants across 6 package versions |
foo[1.2.0..1.3.5(6:8)] |
8 variants across 6 package versions |
trailing * |
the scope still has outstanding extractions |
Output sections in order
request: foo-1.2 bah-3 ~foo-1 # initial request, printed once
merged request: foo-1.2 bah-3 # simplified; ~foo-1 absorbed by foo-1.2
pushed {0,0}: [foo==1.2.0[0,1]]* bah[...] # phase pushed: {stack depth, phases solved at depth}
--------------------------------------------------------------------------------
SOLVE #1...
--------------------------------------------------------------------------------
popped {0,0}: ...
EXTRACTING:
extracted python-2 from [foo==1.2.0[0,1]]*
MERGE-EXTRACTIONS:
merged extractions are: python-2 utils-1.2+
INTERSECTING:
python[2.7.3..3.3.0(3)] was intersected to [python==2.7.3] by range '2'
ADDING:
added utils[1.2.0..5.2.0(12:14)]*
REDUCING:
removed blah-35.0.2[1] (dep(python-3.6) <--!--> python==2.7.3)
[blah==35.0.2[0,1]] was reduced to [blah==35.0.2[0]]* by python==2.7.3
<--!--> marks a conflict between two requirements.
Failure modes
| Failure | Message | Usual cause |
|---|---|---|
| Dependency conflicts | The following package conflicts occurred: (...) |
two requirements that cannot both hold |
| Cycle | A cyclic dependency was detected: ... |
packages depending on each other in a loop |
| Total reduction | all variants of a scope removed | rarer; usually a conflicting intersect fails first |
Typical output:
The context failed to resolve:
The following package conflicts occurred: (.foo-1 <--!--> .foo-2)
Triage workflow
Work cheapest-first; do not jump to -vvv.
- Reproduce without entering a shell
rez-env <reqs> --output context.rxt # or -o - Ask rez what it thinks
rez-env <reqs> -v # solver steps rez-context --so # source order of the last resolve rez-status # environment/repo sanity - Inspect the failure graph — usually the fastest way to see who introduced a requirement
rez-env <reqs> --fail-graph # render on failure rez-context --dependency-graph # dot graph of the resolve rez-context --print-graph # compact text graph rez-env <reqs> --max-fails N # collect more than the first failure - Find the real requirer — the package you asked for is rarely the one causing it
rez-depends <pkg> # reverse lookup: who depends on <pkg> rez-search <pkg> # what versions exist - Narrow the request — bisect
Установить rez-resolve в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rez-resolve?
Rez resolve and solver internals — how the solver works, reading -v debug output, conflicts, cycles and total reductions, graph inspection, patching, caching and timestamps. Use when the user asks how the solver works or how to read its -v output. For a resolve that already failed and needs attributing, use rez-resolve-troubleshooting. Covers Rez 3.4.0.
Как установить скилл rez-resolve?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rez-resolve запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic