mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance VFS initialization and error handling
- Introduced a new method `new_default_with_errors` in the VFS implementation to create a VFS instance with a critical error receiver for monitoring watcher health. - Updated the `ServeSession` constructor to accept an optional critical error receiver, allowing for better error management during session initialization. - Adjusted various calls to `ServeSession::new` across the codebase to accommodate the new parameter, ensuring consistent error handling. - Improved logging in the API context and serve session files for better clarity during server operations. These changes enhance the robustness of the VFS and session management, providing better tools for error detection and handling.
This commit is contained in:
parent
ec7f91017b
commit
8462c06b82
14 changed files with 1784 additions and 1600 deletions
|
|
@ -198,12 +198,7 @@ function ApiContext:write(patch)
|
|||
end
|
||||
|
||||
if #patch.removed > 0 or addedCount > 0 or #patch.updated > 0 then
|
||||
Log.info(
|
||||
"Sending to server: {} removals, {} additions, {} updates",
|
||||
#patch.removed,
|
||||
addedCount,
|
||||
#patch.updated
|
||||
)
|
||||
Log.info("Sending to server: {} removals, {} additions, {} updates", #patch.removed, addedCount, #patch.updated)
|
||||
end
|
||||
|
||||
for _, removed in ipairs(patch.removed) do
|
||||
|
|
|
|||
|
|
@ -721,9 +721,9 @@ function ServeSession:__confirmAndApplyInitialPatch(catchUpPatch, serverInfo)
|
|||
|
||||
if selection == "push" then
|
||||
-- Apply Rojo changes to Studio
|
||||
Log.info("[Push] Update: {}", instancePath)
|
||||
table.insert(pushPatch.updated, change)
|
||||
elseif selection == "pull" and self.__twoWaySync then
|
||||
Log.info("[Push] Update: {}", instancePath)
|
||||
table.insert(pushPatch.updated, change)
|
||||
elseif selection == "pull" and self.__twoWaySync then
|
||||
-- Send Studio state back to Rojo
|
||||
if instance then
|
||||
local propertiesToSync = change.changedProperties
|
||||
|
|
@ -821,12 +821,12 @@ function ServeSession:__confirmAndApplyInitialPatch(catchUpPatch, serverInfo)
|
|||
for _ in pairs(pushPatch.added) do
|
||||
addCount += 1
|
||||
end
|
||||
Log.info(
|
||||
"Applying to Studio: {} additions, {} removals, {} updates",
|
||||
addCount,
|
||||
#pushPatch.removed,
|
||||
#pushPatch.updated
|
||||
)
|
||||
Log.info(
|
||||
"Applying to Studio: {} additions, {} removals, {} updates",
|
||||
addCount,
|
||||
#pushPatch.removed,
|
||||
#pushPatch.updated
|
||||
)
|
||||
self:__applyPatch(pushPatch)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue