Created attachment 669302 [details] [diff] [review] APIs for loading modules, v1 This is a follow-up from bug 794509. This patch adds a formal API for loading mach command modules. We no longer have the default behavior of always scanning sys.path all the time. Instead, consumers of mach are free to choose how modules are loaded. They could scan sys.path. They could scan individual directories. It's all possible now. There is still room to grow. For example, we may not want to actually import the module into sys.modules. But, unless you have a better idea, I'm content with keeping it the way it is.
Created attachment 669324 [details] [diff] [review] APIs for loading modules, v2 Now with "load a file" API. Eventually we'll probably have "load from class." But, this is a good stopping point.
Comment on attachment 669324 [details] [diff] [review] APIs for loading modules, v2 This wfm. If we're going for a true plugin architecture we should probably start documenting what we intend and start filing bugs
Attachment #669324 - Flags: review?(jhammel) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.