mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Implement new oneshot Vfs for CLI commands and enhance JSON5 serialization
- Added `new_oneshot` method to the Vfs struct, providing a backend suitable for one-time operations without file watching. - Updated CLI commands (`fmt_project` and `syncback`) to utilize the new oneshot Vfs, improving error handling during file operations. - Enhanced JSON5 serialization by introducing a custom serializer that directly builds a tree structure, improving performance and maintaining sorted keys. - Improved error logging in JSON serialization to provide more context on failures.
This commit is contained in:
parent
fca802a4e5
commit
5f91a0777a
7 changed files with 3753 additions and 44 deletions
|
|
@ -69,8 +69,9 @@ impl SyncbackCommand {
|
|||
dom_start_timer.elapsed().as_secs_f32()
|
||||
);
|
||||
|
||||
let vfs = Vfs::new_default();
|
||||
vfs.set_watch_enabled(false);
|
||||
// Use oneshot Vfs for syncback - file watching isn't needed and
|
||||
// watcher errors shouldn't terminate the process
|
||||
let vfs = Vfs::new_oneshot();
|
||||
|
||||
let project_start_timer = Instant::now();
|
||||
let session_old = ServeSession::new(vfs, path_old.clone())?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue