Skip to content

Commit b1efdbb

Browse files
gajopclaude
andcommitted
Hold the map-list rescan until the engine ships ScanAllDirs
The vfs().scan_all_dirs() binding now exists in the engine source, but calling it against an engine binary built before it reads past VFS_API and crashes. Keep available_maps on get_maps() alone with a ready-to-enable snippet; flip it once the engine is rebuilt with the ScanAllDirs binding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 04c3a07 commit b1efdbb

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

native/src/sbc/actions/project.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ pub fn commit_new_project(
6565
}
6666

6767
/// Maps the VFS has an archive for, for the New Project dialog dropdown.
68-
///
69-
/// TODO: rescan first so a just-exported map appears without an editor restart,
70-
/// as Chili does with `VFS.ScanAllDirs()` before listing. The `ScanAllDirs`
71-
/// binding is not yet wrapped in `spring-native` — filed in
72-
/// `SBC_PORT_MISSING_BINDINGS.md`; call it here once available.
7368
pub fn available_maps(interface: &NativeInterfaceRef) -> Vec<String> {
7469
let vfs = interface.vfs();
70+
// TODO(engine-rebuild): rescan first so a just-exported map appears without a
71+
// restart (Chili does `VFS.ScanAllDirs()` here). The `scan_all_dirs` binding
72+
// now exists in the engine source, but calling it against an engine binary
73+
// that predates it reads past `VFS_API` and crashes. Re-enable once the
74+
// engine is rebuilt with the ScanAllDirs binding:
75+
// let _ = vfs.scan_all_dirs();
7576
let mut maps = vfs.get_maps().unwrap_or_default();
7677
maps.sort();
7778
maps.into_iter()

0 commit comments

Comments
 (0)