jdx/mise · error
install_command cannot be used with filter_bins
Error message
install_command cannot be used with filter_bins
What it means
The SPM backend treats 'install_command' (a fully custom source install command) and 'filter_bins' (selecting which binaries to expose) as mutually exclusive configuration strategies: a custom install command controls the whole build, so filtering its produced binaries via filter_bins is unsupported and rejected.
Solutions
- Remove either install_command or filter_bins from the tool's options
- If using a custom install_command, drop filter_bins (or have the command itself place only the desired binaries)
- If you only need binary filtering, drop the custom install_command and let the default build run
Example fix
# before [tools."spm:mypkg"] install_command = "swift build -c release" filter_bins = ["mypkg"] # after [tools."spm:mypkg"] install_command = "swift build -c release"
Defensive patterns
Strategy: validation
Validate before calling
# detect the conflict before running mise
awk '/^\[tools/{t=1} t&&/install_command/{a=1} t&&/filter_bins/{b=1} END{if(a&&b) print "conflict: install_command + filter_bins"}' mise.toml Prevention
- Choose one install strategy per tool: custom install_command OR filter_bins
- Review a tool's whole options block after incremental edits
- Move binary selection into the custom command itself when using install_command
When it happens
Trigger: source_install_command finds both install_command and filter_bins set in the same spm tool's options and bails instead of guessing which takes precedence.
Common situations: Incrementally editing tool options and leaving both keys present; combining example snippets from different configs; trying to trim a custom build's outputs with filter_bins.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- artifactbundle must be true, false, 1, or 0, got
- install_command must be a non-empty string
- agent ' ' cannot set both `keep_alive` and…
- No matching SwiftPM artifact bundle found for
- packslip: list_identity_prefix cannot be combined with…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/242b217b7ea7ed5e.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/spm.rs:154
fn install_command(&self) -> eyre::Result<Option<String>> {
let Some(value) = self.values.raw().opts.get("install_command") else {
return Ok(None);
};
let Some(command) = value.as_str() else {
bail!("install_command must be a non-empty string");
};
let command = command.trim();
if command.is_empty() {
bail!("install_command must be a non-empty string");
}
Ok(Some(command.to_string()))
}
fn source_install_command(&self) -> eyre::Result<Option<String>> {
let command = self.install_command()?;
if command.is_some() && self.filter_bins().is_some() {
bail!("install_command cannot be used with filter_bins");
}
Ok(command)
}
}
#[async_trait]
impl Backend for SPMBackend {
fn get_type(&self) -> BackendType {
BackendType::Spm
}
fn ba(&self) -> &Arc<BackendArg> {
&self.ba
}
fn get_dependencies(&self) -> eyre::Result<Vec<&str>> {
Ok(vec!["swift"])
}View on GitHub (pinned to 533346cc37)