You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But Environment from args_gen does not have traces field.
# All these classes are auto-patched in test imports in cairo/tests/conftests.py
@dataclass
class Environment(
make_dataclass(
"Environment",
[(f.name, f.type, f) for f in fields(EnvironmentBase) if f.name != "traces"],
namespace={"__doc__": EnvironmentBase.__doc__},
)
):
def __eq__(self, other):
return all(
getattr(self, field.name) == getattr(other, field.name)
for field in fields(self)
)
This triggers an error "Trying to call init on Environment with unknown field traces"
Problem
We patched all imports of Environment to take our redefined class. This applies to inner code of EELS too. This forces us to make sure our modified types have the same fields as EELS classes.
Proposed fix
Stop removing traces field from the modified class and skip it in serialization into cairo altogether
The text was updated successfully, but these errors were encountered:
Context:
apply_body code has:
But Environment from args_gen does not have traces field.
This triggers an error "Trying to call init on Environment with unknown field traces"
Problem
We patched all imports of Environment to take our redefined class. This applies to inner code of EELS too. This forces us to make sure our modified types have the same fields as EELS classes.
Proposed fix
Stop removing traces field from the modified class and skip it in serialization into cairo altogether
The text was updated successfully, but these errors were encountered: