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>
1.1 KiB
1.1 KiB
data, id, title
| data | id | title | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
8m9kt | 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.jsontakes"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
--replaceis given. It refuses if another package needs the one to be removed, and downloads first. - Conflicts are kept in
state.jsonandorbit.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.