Replace exec()-based addon loading with manifest-driven loader #248
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace the current
exec()calls insrc/Mod/Create/Init.pyandInitGui.pywith a manifest-driven loader that reads each addon'spackage.xml, validates compatibility and dependencies, and loads addons in dependency order.Current behavior
The bootstrap module blindly discovers directories under
mods/and callsexec()on theirInit.py/InitGui.py. There is no version checking, dependency resolution, or graceful error reporting beyond "submodule absent."Proposed behavior
mods/for directories containingpackage.xmlAddonManifestdataclass (name, version, min Create version, dependencies, registered contexts)Init.py/InitGui.pyentry pointsAffected files
src/Mod/Create/Init.py— rewrite loadersrc/Mod/Create/InitGui.py— rewrite GUI loadermods/ztools/package.xml— add/update manifest fieldsmods/silo/package.xml— add/update manifest fieldsAcceptance criteria
package.xmlare skipped with a warning in the report viewmin_create_versionhigher than current are skippedFreeCAD.getAddonRegistry()or equivalent returns loaded addon metadataDependencies
None (this is foundational)
Notes
FreeCAD's
package.xmlalready has a schema for addon metadata. Extend it with Kindred-specific fields under a<kindred>element rather than inventing a new file. Fields needed:min_create_version,sdk_version,load_priority,dependencies(list of addon names).