Packages can declare conflicts in orbit.json. The solver keeps them apart, and a global install offers to replace the installed ones in the way. Rollback now checks for clashes before it unlinks anything. Planning: 8m9kt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.1 KiB
Markdown
21 lines
1.1 KiB
Markdown
---
|
|
data:
|
|
priority: normal
|
|
status: done
|
|
tags:
|
|
- solver
|
|
type: feature
|
|
id: 8m9kt
|
|
title: Package conflicts
|
|
---
|
|
Packages such as `moonbit` and `moonbit-nightly` can't be installed together, but only a clash of command names stops it, and the user must remove one by hand first.
|
|
|
|
Acceptance criteria:
|
|
|
|
- `orbit.json` takes `"conflicts": { "<name>": "<constraint>" }`, as in Arch. One side declaring it is enough. `*` includes prereleases.
|
|
- The solver never selects conflicting packages, in a project or globally, and says why when that leaves no solution.
|
|
- A global install that conflicts with installed packages asks before replacing them. Without a terminal it fails unless `--replace` is given. It refuses if another package needs the one to be removed, and downloads first.
|
|
- Conflicts are kept in `state.json` and `orbit.lock`; rollback checks them.
|
|
|
|
Outcome: `src/main/conflicts.mbt` and the solver. Checked end to end against `registry:2`, including the prompt. `moonbit-nightly` declares its conflict in orbit-packages. Arch's `provides` and `replaces` are not included: one package can't satisfy a dependency on another.
|