jdx/mise · error
systemDependencies entry must set exactly one of…
Error message
systemDependencies entry must set exactly one of bin/pkgconfig/sharedlib/command
What it means
Schema validation in the `TryFrom<vfox::SystemDependency>` conversion: a `systemDependencies` entry must declare exactly one check kind — `bin`, `pkgconfig`, `sharedlib`, or `command`. Any combination that isn't exactly one Some (zero or multiple set) bails with this message.
Solutions
- Keep only one of `bin`, `pkgconfig`, `sharedlib`, `command` per entry; split multi-check requirements into multiple entries.
- Pick the most appropriate single check (e.g. drop `command` if `bin` already names the binary).
- If the entry is empty, add the intended check field instead of shipping a placeholder.
Example fix
# before [[systemDependencies]] bin = "ffmpeg" command = "ffmpeg -version" # after [[systemDependencies]] bin = "ffmpeg"
Defensive patterns
Strategy: validation
Validate before calling
let set = [d.bin.is_some(), d.pkgconfig.is_some(), d.sharedlib.is_some(), d.command.is_some()]; assert_eq!(set.iter().filter(|&&x| x).count(), 1, "systemDependencies entry must set exactly one check kind");
Type guard
fn exactly_one_check(d: &SystemDependency) -> bool {
[d.bin.is_some(), d.pkgconfig.is_some(), d.sharedlib.is_some(), d.command.is_some()]
.iter().filter(|&&x| x).count() == 1
} Prevention
- Declare one check kind per systemDependencies entry; split alternatives into separate entries.
- Lint plugin manifests for entries with zero or multiple check fields.
- Prefer `bin` when a plain executable check suffices.
When it happens
Trigger: Converting a vfox plugin's `SystemDependency` where the entry sets none of the four fields, or sets two or more (e.g. both `bin` and `command`, or `sharedlib` with `pkgconfig`).
Common situations: Plugin authors writing `systemDependencies` entries with `bin` plus a `command` fallback for portability; copy-paste leaving both `pkgconfig` and `sharedlib` filled; entries with all fields empty because the author intended a placeholder.
Related errors
- [bootstrap.files]." ": absent files must not declare source…
- [bootstrap.files]." ": source and content are mutually…
- brew-cask: command_wrapper has unsupported option
- brew-cask: command_wrapper requires content or executable…
- brew-cask: command_wrapper requires content or executable…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/5406b4821701efdf.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/deps.rs:201
pub(crate) struct DepStatus {
pub dep: SystemDep,
/// detected version, if a version was extracted
pub found: Option<String>,
pub satisfied: bool,
/// why it is unsatisfied (or a note when satisfied)
pub reason: Option<String>,
}
impl TryFrom<vfox::SystemDependency> for SystemDep {
type Error = eyre::Error;
fn try_from(d: vfox::SystemDependency) -> eyre::Result<Self> {
let check = match (&d.bin, &d.pkgconfig, &d.sharedlib, &d.command) {
(Some(b), None, None, None) => SystemDepCheck::Bin(b.clone()),
(None, Some(p), None, None) => SystemDepCheck::PkgConfig(p.clone()),
(None, None, Some(s), None) => SystemDepCheck::SharedLib(s.clone()),
(None, None, None, Some(c)) => SystemDepCheck::Command(c.clone()),
_ => eyre::bail!(
"systemDependencies entry must set exactly one of bin/pkgconfig/sharedlib/command"
),
};
// A version constraint is only meaningful for bin/pkgconfig (we probe
// `--version` / `--modversion`). If declared on sharedlib/command,
// keep the check but drop the version with a warning rather than
// silently honoring a constraint that is never enforced.
let version = match (&check, &d.version) {
(_, None) => None,
(SystemDepCheck::Bin(_) | SystemDepCheck::PkgConfig(_), Some(v)) => {
Some(VersionConstraint::parse(v)?)
}
(check, Some(_)) => {
warn!(
"systemDependencies: `version` is only supported for bin/pkgconfig checks, ignoring it for the {} check",
check.kind()
);
NoneView on GitHub (pinned to 533346cc37)