Make recipe module's "self" available under "self.m" |
||||
Issue descriptionWe often pass the recipe modules under the recipe API's self.m to helper methods, e.g. chromium_tests makes heavy use of this. But the owning module itself is not under self.m and if it is needed, it's passed in separation, leading to more complicated code. Could we just add it as well in the engine by default? More formal: Recipe module A depends on modules B and C. Within A, we'll have self.m.B and self.m.C. We currently don't have self.m.A, but should have it by default, in order to pass self.m to helper methods. I'd like to simplify code like: https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/chromium_tests/api.py#252 https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/v8/api.py#796 https://chromium.googlesource.com/chromium/tools/build/+/af07e22d335a6f2/scripts/slave/recipe_modules/v8/api.py#805
,
Nov 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/recipes-py/+/3005908b2410f1110be8354876be0aa5fe28894a commit 3005908b2410f1110be8354876be0aa5fe28894a Author: Robert Iannucci <iannucci@chromium.org> Date: Tue Nov 07 18:22:02 2017 [loader] Make .m also contain a reference to its owning module. This should help simplify some existing (chromium) recipe modules. R=machenbach@chromium.org, nodir@chromium.org, phajdan@chromium.org Bug: 782142 Change-Id: Ie88dc9cd914874e886d2a0f5d2d93d47e411d27c Reviewed-on: https://chromium-review.googlesource.com/756678 Commit-Queue: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Nodir Turakulov <nodir@chromium.org> [add] https://crrev.com/3005908b2410f1110be8354876be0aa5fe28894a/recipes/engine_tests/module_injection_site.expected/basic.json [modify] https://crrev.com/3005908b2410f1110be8354876be0aa5fe28894a/recipe_engine/loader.py [modify] https://crrev.com/3005908b2410f1110be8354876be0aa5fe28894a/README.recipes.md [add] https://crrev.com/3005908b2410f1110be8354876be0aa5fe28894a/recipes/engine_tests/module_injection_site.py
,
Nov 7 2017
,
Nov 7 2017
.... sigh
,
Nov 8 2017
Thanks a bunch!
,
Nov 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/build/+/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4 commit 7bf768d618f7476fe4dd0e38302a7b0f2b1759b4 Author: Michael Achenbach <machenbach@chromium.org> Date: Wed Nov 08 10:36:54 2017 V8: Refactoring - simplify how recipe module dependencies are passed Bug: 782142 Change-Id: Ia43569534add8c71c2dfa36e17d98a8e0dc33e2e Reviewed-on: https://chromium-review.googlesource.com/758357 Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> [modify] https://crrev.com/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4/scripts/slave/recipe_modules/v8/api.py [modify] https://crrev.com/7bf768d618f7476fe4dd0e38302a7b0f2b1759b4/scripts/slave/recipe_modules/v8/testing.py |
||||
►
Sign in to add a comment |
||||
Comment 1 by machenb...@chromium.org
, Nov 7 2017Status: Assigned (was: Untriaged)