forked from rojo-rbx/rojo
* Switch git submodules to Wally packages * Update build snapshot * Add wally to foreman and use latest versions * Install packages in CI runners * Fix indents * Install packages in the correct directory * Install packages in correct dir of release action too * Remove submodules from ci checkout * Remove submodules from release checkout * Update selene with latest fix * Fix whitespace Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
23 lines
709 B
Lua
23 lines
709 B
Lua
local Packages = script.Parent.Parent.Parent.Packages
|
|
local Log = require(Packages.Log)
|
|
local RbxDom = require(Packages.RbxDom)
|
|
|
|
return function(instance, propertyName, propertyDescriptor)
|
|
local readSuccess, readResult = propertyDescriptor:read(instance)
|
|
|
|
if not readSuccess then
|
|
Log.warn("Could not sync back property {:?}.{}: {}", instance, propertyName, readResult)
|
|
return false, nil
|
|
end
|
|
|
|
local dataType = propertyDescriptor.dataType
|
|
local encodeSuccess, encodeResult = RbxDom.EncodedValue.encode(readResult, dataType)
|
|
|
|
if not encodeSuccess then
|
|
Log.warn("Could not sync back property {:?}.{}: {}", instance, propertyName, encodeResult)
|
|
return false, nil
|
|
end
|
|
|
|
return true, encodeResult
|
|
end
|