fix(launcher): keep native sources hidden until build integration lands
Co-Authored-By: Hermes Agent (OpenAI) <noreply@openai.com>
This commit is contained in:
@@ -210,7 +210,8 @@ fn kind_of(kind: &index::Kind) -> Option<Kind> {
|
||||
index::Kind::ResourcePack => Some(Kind::ResourcePack),
|
||||
index::Kind::Modpack => Some(Kind::Modpack),
|
||||
index::Kind::Shader => Some(Kind::Shader),
|
||||
index::Kind::Other(_) => None,
|
||||
// The format checker knows native sources, but this launcher cannot compile them yet.
|
||||
index::Kind::NativeMod | index::Kind::Other(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,14 @@ fn hud(index: &Index) -> Project {
|
||||
project_of(index.project("coords_hud").unwrap()).unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn native_registry_entries_stay_hidden_until_the_launcher_can_build_them() {
|
||||
assert_eq!(kind_of(&index::Kind::NativeMod), None);
|
||||
let mut index = sample();
|
||||
index.projects[0].kind = index::Kind::NativeMod;
|
||||
assert!(search(&index, &Query::new("", Kind::Mod)).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn searches_by_kind_and_words() {
|
||||
let index = sample();
|
||||
|
||||
Reference in New Issue
Block a user