Enable source function type checks in the shared GUI runtime
Verify Tessera GUI / verify (push) Failing after 7m34s

This commit is contained in:
2026-10-21 22:40:11 +08:00
parent 6e69c5e5ce
commit 3a7b755532
7 changed files with 149 additions and 6 deletions
+8
View File
@@ -1588,6 +1588,12 @@ impl UiBridge {
pub fn install_globals(&self, vm: &mut Vm, globals: ObjectRef) -> Result<()> {
vm.dict_set(globals, Value::Text("ui".into()), Value::Object(self.ui))?;
// Compatibility spelling used by the original module examples.
vm.dict_set(
globals,
Value::Text("View".into()),
vm.get_attr(self.ui, "Block")?,
)?;
for name in TYPE_NAMES.iter().chain(QUERY_NAMES) {
let value = vm.get_attr(self.ui, name)?;
vm.dict_set(globals, Value::Text((*name).into()), value)?;
@@ -2370,6 +2376,8 @@ pub fn install(vm: &mut Vm, roots: &mut Vec<ObjectRef>) -> Result<UiBridge> {
vm.attach_type(desktop, root_types.object)?;
vm.attach_type(ui, root_types.object)?;
let function_type = object(Some(&vm.get_attr(ui, "Function")?))?;
vm.set_function_type(function_type)?;
vm.set_source_type_checks(true)?;
for name in [
"open",
"text",