Conversation
There was a problem hiding this comment.
Pull request overview
Adds a special-case dependency check for the internal MeshPart workbench/module during addon dependency evaluation, to avoid incorrectly flagging it as missing when it doesn’t show up in FreeCADGui.listWorkbenches().
Changes:
- Add
MeshPartspecial handling inMissingDependencies.import_from_addon()by attempting to importMeshPartwhen it’s not detected vialistWorkbenches(). - Log and record
MeshPartas missing only if the import fails.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| elif dep.lower() == "meshpart": | ||
| # MeshPart is strange: it doesn't ever appear in the listWorkbenches() output | ||
| try: | ||
| __import__("MeshPart") | ||
| except ImportError: | ||
| self.wbs.append(dep) | ||
| fci.Console.PrintLog("Failed to import MeshPart module\n") |
There was a problem hiding this comment.
The new MeshPart special-case changes dependency detection behavior but isn’t covered by existing unit tests. Please add a test for MissingDependencies.import_from_addon that exercises both paths (MeshPart import succeeds -> not added to missing wbs; MeshPart import fails -> added and log emitted), using the existing FreeCADGui/Console mocking approach in AddonManagerTest.
|
Successfully created backport PR for |
The Rocket WB declares a dependency on this Workbench, but it turns out it never actually gets listed by
FreeCADGui.listWorkbenches(), so like Plot, it needs special handling.