jdx/mise · error
Expected a Zip source
Error message
Expected a Zip source
What it means
Sentinel panic in the plugin-source parsing unit test: the match on PluginSource::parse("https://example.com/plugins/my-plugin.zip") fell through to a non-Zip variant, meaning the parser misclassified a .zip URL. It fires when PluginSource::parse stops recognizing .zip (or uppercase .ZIP with query) URLs as PluginSource::Zip.
Source
Thrown at src/plugins/mod.rs:756
assert_eq!(url, "https://example.com/plugins/my-plugin.zip");
}
_ => panic!("Expected a Zip source"),
}
}
#[test]
fn test_plugin_source_parse_uppercase_zip_with_query() {
// Test parsing zip URL with query
let source =
PluginSource::parse("https://example.com/plugins/my-plugin.ZIP?version=v1.0.0");
match source {
PluginSource::Zip { url } => {
assert_eq!(
url,
"https://example.com/plugins/my-plugin.ZIP?version=v1.0.0"
);
}
_ => panic!("Expected a Zip source"),
}
}
#[test]
fn test_plugin_source_parse_remote_git_zip_subdir() {
let source = PluginSource::parse(
"git::https://github.com/user/plugin.git//plugins/my-plugin.zip?ref=main",
);
match source {
PluginSource::Git {
url,
git_ref,
subdir,
} => {
assert_eq!(url, "https://github.com/user/plugin.git");
assert_eq!(git_ref, Some("main".to_string()));
assert_eq!(subdir, Some("plugins/my-plugin.zip".to_string()));
}View on GitHub (pinned to afd2eddd3a)
Solutions
- Fix PluginSource::parse so URL suffix (case-insensitive) detection of .zip yields PluginSource::Zip before other variants
- Check whether a new source variant added earlier in the match is now capturing zip URLs and reorder the match arms
- Rerun test_plugin_source_parse_uppercase_zip_with_query after the parser change
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at src/plugins/mod.rs:756 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/6545952b7f258b4c.
Report an issue: GitHub.