jdx/mise · error
Expected a git plugin
Error message
Expected a git plugin
What it means
Sentinel panic in the plugin-source unit test: PluginSource::parse of a git::...//plugins/my-plugin.zip?ref=main URL did not return the Git variant with the expected url/ref/subdir fields. It fires when the git:: scheme prefix, //subdir syntax, or ?ref= query handling in parse regresses.
Source
Thrown at src/plugins/mod.rs:775
}
}
#[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()));
}
_ => panic!("Expected a git plugin"),
}
}
#[test]
fn test_plugin_source_parse_edge_cases() {
// Test parsing git url which contains `.zip`
let source = PluginSource::parse("https://example.com/.zip/plugin");
match source {
PluginSource::Git { .. } => {}
_ => panic!("Expected a git plugin"),
}
}
#[test]
fn test_plugin_source_parse_remote_git_https() {
let source = PluginSource::parse(
"git::https://github.com/org/repo.git//dev/plugins/tool?ref=feature/test",
);View on GitHub (pinned to afd2eddd3a)
Solutions
- Ensure parse detects the git:: scheme prefix and returns PluginSource::Git with url, git_ref, and subdir populated
- Verify the //subdir extraction keeps the trailing path (plugins/my-plugin.zip) verbatim
- Add regression coverage for other git:: URL shapes after fixing the parser
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at src/plugins/mod.rs:775 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/fc35b905e6359050.
Report an issue: GitHub.