-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create the "plugins" field for user-defined plugins
Summary: Extend the interfaces in plugins.py to take additional plugin paths, and plumb this all the way up. Make sure plugins are resolved relative to the project root (in runtime.py) and not just blindly assumed to be valid paths. This field shouldn't be able to change the behavior of existing modules, so if the same plugin is ever defined twice, raise an error. The complexity of this diff raises a couple of design issues that we need to think about: - The plugins.py interface is getting very complicated. Should we encapsulate it in some kind of config object? Should it take a `Runtime`? (This would make it difficult to unit test.) - Allowing users to run peru from directories other than the project root is creating complexity throughout the code. The kind of path massaging that we have to do here in runtime.py is very easy to get wrong, and very easy to miss in testing. We really don't want to burden every new feature with a test to make sure it handles funny dirs. Is there a way we could make this kind of testing automatic? Should we use chdir magic to make paths Just Work? (That would make resolving paths in peru.yaml easier, at the expense of resolving paths given on the command line.) Test Plan: Lots of new unit tests and an integration test. Reviewers: sean Differential Revision: https://phabricator.buildinspace.com/D27
- Loading branch information
1 parent
3a293d5
commit 275e8fc
Showing
7 changed files
with
190 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.