Closed bradley-solliday-skydio closed 1 year ago
Closing because we don't want to take up another top level name space, the core issue has been resolved by making sym
a namespace package, and long run we'll probably move the generated code into sym.gen
by default.
Before this commit, the default namespace for packages generated with
Codegen.generate_function
wassym
.This is fine in C++, which actually has namespaces, but in python, where we instead use it as the package name, this collides with the name of the
sym
package.This means that in the generated code, nothing inside the
sym
package can actually be accessed.This causes problems when a generated function returns a type defined in the
sym
package (for example,sym.Rot3
), as when the function is called, (most likely) anAttributeError
is raised.To prevent this from being the default behavior, I change the default namespace to
gen
.I also change all the checked in code which previously relied on the default namespace being
sym
to explicitly set the namespace tosym
.