Resolve backends before plugins

Review Request #3950 — Created May 28, 2016 and submitted

Eric Ayers
pants
zundel/change-plugin-load-ordering
3521
62609c1...
pants-reviews
molsen, nhoward_tw, patricklaw, stuhood

I'm not sure if the current code is by design or is an accident, but this causes a module loaded as a plugin to load before built-in backends. Loading plugins after backends matches the behavior of adding the module to --backends

This issue was exposed in trying to load the findbugs contrib module. See https://rbcommons.com/s/twitter/r/3909/

Added a unit test to show that plugins are now executed after backends.

CI is running at https://travis-ci.org/pantsbuild/pants/builds/134462611

Eric Ayers
Eric Ayers
  1. This is one alternative for solving the issue. Since it changes behavior, I'm not sure if we want to backport this to 1.0 or not, or choose a different route.

    An alternative would be to add a new command line option that changed the behavior, e.g. --plugins-post

    1. Will test this this week.

  2. 
      
Stu Hood
  1. I ran this through our release workflow, and didn't see any behaviour changes in our source or binary workflows. We may be able to get away without a backwards compatibility flag here?

    1. This would be my favorite option. I can't think of a reason why someone would want to load a plugin first.

  2. 
      
Nick Howard (Twitter)
  1. Could you add a regression test to the test_extension_loader suite so that we have this behavior specified in our tests?

    Also, you could consider renaming the fn to reflect the new ordering and adding a note in the docstring about it.

  2. 
      
Eric Ayers
Chris Heisterkamp
  1. Ship It!
  2. 
      
Eric Ayers
Eric Ayers
Nick Howard (Twitter)
  1. Ship It!
  2. 
      
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Chris, Stu & Nick. Commit ec8530e

Loading...