Add live syncback functionality and optimize service encoding

- Introduced a new endpoint `/api/syncback` for one-click full sync from Roblox Studio to the filesystem, eliminating the need for an active WebSocket connection.
- Implemented `SyncbackRequest` and `ServiceChunk` structures to handle service-level properties and child instances during syncback.
- Enhanced `encodeService` to include ObjectValue carriers for accurate reference handling and prevent data loss.
- Updated the syncback process to utilize Luau-style relative paths for reference attributes, improving path management and consistency.
- Integrated session caching in the matching algorithm to optimize performance during syncback operations.

These changes significantly improve the live syncback experience, ensuring reliable data synchronization and enhanced performance during development.
This commit is contained in:
Joe 2026-02-18 22:34:52 -06:00
parent 7f4b5c4941
commit b47eef1173
165 changed files with 5205 additions and 206 deletions

View file

@ -1,49 +0,0 @@
# Compound assignment using `op=` syntax
> Note: this RFC was adapted from an internal proposal that predates RFC process and as such doesn't follow the template precisely
**Status**: Implemented
## Design
A feature present in many many programming languages is assignment operators that perform operations on the left hand side, for example
```luau
a += b
```
Lua doesn't provide this right now, so it requires code that's more verbose, for example
```luau
data[index].cost = data[index].cost + 1
```
This proposal suggests adding `+=`, `-=`, `*=`, `/=`, `%=`, `^=` and `..=` operators to remedy this. This improves the ergonomics of writing code, and occasionally results in code that is easier to read to also be faster to execute.
The semantics of the operators is going to be as follows:
- Only one value can be on the left and right hand side
- The left hand side is evaluated once as an l-value, similarly to the left hand side of an assignment operator
- The right hand side is evaluated as an r-value (which results in a single Lua value)
- The assignment-modification is performed, which can involve table access if the left hand side is a table dereference
- Unlike C++, these are *assignment statements*, not expressions - code like this `a = (b += 1)` is invalid.
Crucially, this proposal does *not* introduce new metamethods, and instead uses the existing metamethods and table access semantics, for example
```luau
data[index].cost += 1
```
translates to
```luau
local table = data[index]
local key = "cost"
table[key] = table[key] + 1
```
Which can invoke `__index` and `__newindex` on table as necessary, as well as `__add` on the element. In this specific example, this is *faster* than `data[index].cost = data[index].cost + 1` because `data[index]` is only evaluated once, but in general the compound assignment is expected to have the same performance and the goal of this proposal is to make code easier and more pleasant to write.
The proposed new operators are currently invalid in Lua source, and as such this is a backwards compatible change.
From the implementation perspective, this requires adding new code/structure to AST but doesn't involve adding new opcodes, metatables, or any extra cost at runtime.