witty-crayon-22786
07/09/2019, 9:55 PMwitty-crayon-22786
07/09/2019, 9:56 PMwitty-crayon-22786
07/09/2019, 9:57 PMregister.py
are loaded via the mechanism explained here: https://www.pantsbuild.org/howto_plugin.html#simple-configuration , but that is a tangent, because you should just follow the example of list
in this case)witty-crayon-22786
07/09/2019, 10:05 PM./pants list
on the CLI is because it returns an instance of `Goal`: ListGoal
in this casehundreds-breakfast-49010
07/10/2019, 10:47 PMlist
goal to a console_rule
hundreds-breakfast-49010
07/10/2019, 10:47 PM[Console, List.Options, Specs]
was the right set of input selectors to usehundreds-breakfast-49010
07/10/2019, 10:48 PMcontext
in the new version of the rulewitty-crayon-22786
07/10/2019, 10:49 PMwitty-crayon-22786
07/10/2019, 10:50 PMwitty-crayon-22786
07/10/2019, 10:51 PMwitty-crayon-22786
07/10/2019, 10:52 PMoptionable_rule
)hundreds-breakfast-49010
07/10/2019, 11:01 PMSourceRoots
subsystem, right?hundreds-breakfast-49010
07/10/2019, 11:02 PMself.context.source_roots.all_roots()
, so I want to request SourceRoots
as an argument selector and then call all_roots()
on that in the new rule, right?hundreds-breakfast-49010
07/10/2019, 11:02 PMTargetRoots
?witty-crayon-22786
07/10/2019, 11:28 PMhundreds-breakfast-49010
07/10/2019, 11:45 PMhundreds-breakfast-49010
07/10/2019, 11:45 PMNo rule was available to compute SourceRoots with parameter types (Address+BuildFileAddress+BuildFileAddresses+Console+Digest+DirectoriesToMerge+DirectoryWithPrefixToStrip+ExecuteProcessRequest+LLVM+NativeToolchain+OptionsBootstrapper+OwnersRequest+PathGlobs+Scope+Specs+ToolchainVariantRequest+UrlToFetch)
witty-crayon-22786
07/10/2019, 11:48 PMhundreds-breakfast-49010
07/10/2019, 11:50 PMoptionable_rule
doing exactly?hundreds-breakfast-49010
07/10/2019, 11:51 PMdef rules()
declaration listshundreds-breakfast-49010
07/10/2019, 11:52 PM@rule
witty-crayon-22786
07/10/2019, 11:58 PMhundreds-breakfast-49010
07/11/2019, 12:00 AMhundreds-breakfast-49010
07/11/2019, 12:01 AMSourceRoots
in optionable_rule
only works if it's a class that inherits Subsystem
?witty-crayon-22786
07/11/2019, 12:03 AMwitty-crayon-22786
07/11/2019, 12:07 AMhundreds-breakfast-49010
07/11/2019, 12:14 AMSourceRoots
I've been looking at in pants/source/source_roots.py
isn't the right one?hundreds-breakfast-49010
07/11/2019, 12:14 AMSubsystem
hundreds-breakfast-49010
07/11/2019, 12:14 AMwitty-crayon-22786
07/11/2019, 12:14 AMhundreds-breakfast-49010
07/11/2019, 12:15 AMSourceRootFactory
is defined in teh same file but doesn't subclass Subsystem
eitherhundreds-breakfast-49010
07/11/2019, 12:15 AMSourceRootConfig
doeswitty-crayon-22786
07/11/2019, 12:15 AMwitty-crayon-22786
07/11/2019, 12:15 AMhundreds-breakfast-49010
07/11/2019, 12:16 AMrules()
function return optionable_rule(SourceRootConfig)
, so that there's a rule that provides SourceRootConfig
hundreds-breakfast-49010
07/11/2019, 12:16 AMSourceRootConfig
be an input to my new v2 list_roots
rulehundreds-breakfast-49010
07/11/2019, 12:16 AMhundreds-breakfast-49010
07/11/2019, 12:17 AMSourceRoots
that defines all_roots
, not SourceRootConfig
hundreds-breakfast-49010
07/11/2019, 12:18 AMSourceRoots
within the function from the SourceRootConfig
provided as an input, and then use it immediately, without specifying it as a rule input or outputwitty-crayon-22786
07/11/2019, 12:19 AMwitty-crayon-22786
07/11/2019, 12:20 AMhundreds-breakfast-49010
07/11/2019, 12:24 AMhundreds-breakfast-49010
07/11/2019, 5:51 PMhundreds-breakfast-49010
07/11/2019, 5:51 PMtests/python/pants_tests/backend/python/tasks
?hundreds-breakfast-49010
07/11/2019, 5:52 PMwitty-crayon-22786
07/11/2019, 5:53 PMwitty-crayon-22786
07/11/2019, 5:53 PMtask
anymore, so that name isn't really accurate.witty-crayon-22786
07/11/2019, 5:54 PMConsoleTaskTestBase
to ConsoleRuleTestBase
hundreds-breakfast-49010
07/11/2019, 5:55 PMhundreds-breakfast-49010
07/11/2019, 5:55 PMpants_test/backend/graph_info
hundreds-breakfast-49010
07/11/2019, 5:56 PMroots
is a graph_info
concernwitty-crayon-22786
07/11/2019, 5:58 PMwitty-crayon-22786
07/11/2019, 5:59 PMhundreds-breakfast-49010
07/11/2019, 9:13 PM/pants test tests/python/pants_test/backend/graph_info/tasks:roots
I get emtpy lists for all the console output testshundreds-breakfast-49010
07/11/2019, 9:14 PMhundreds-breakfast-49010
07/11/2019, 9:50 PMparams = Params(specs, console, options_bootstrapper)
in console_rule_test_base.py
isn't general enough?hundreds-breakfast-49010
07/11/2019, 9:51 PMlist_rules
testhundreds-breakfast-49010
07/11/2019, 9:51 PMConsoleRuleTestBase
so farwitty-crayon-22786
07/11/2019, 9:51 PMwitty-crayon-22786
07/11/2019, 9:52 PMwitty-crayon-22786
07/11/2019, 9:52 PMhundreds-breakfast-49010
07/11/2019, 9:56 PMwitty-crayon-22786
07/11/2019, 9:56 PMwitty-crayon-22786
07/11/2019, 9:57 PMhundreds-breakfast-49010
07/11/2019, 9:57 PMrootsv2
to avoid namespace conflicts until I have everything workinghundreds-breakfast-49010
07/11/2019, 9:57 PMhundreds-breakfast-49010
07/11/2019, 9:58 PMroots
doesn't magically make my new test stop failingwitty-crayon-22786
07/11/2019, 10:05 PMhundreds-breakfast-49010
07/11/2019, 10:06 PMwitty-crayon-22786
07/11/2019, 10:08 PMhundreds-breakfast-49010
07/12/2019, 12:35 AMsource_root.py
is trying to add the pattern /src/go/src
instead of the fakeroot
that the old version of the code doeswitty-crayon-22786
07/12/2019, 12:48 AMwitty-crayon-22786
07/12/2019, 12:48 AMwitty-crayon-22786
07/12/2019, 12:50 AMwitty-crayon-22786
07/12/2019, 12:51 AMhundreds-breakfast-49010
07/12/2019, 1:00 AMhundreds-breakfast-49010
07/12/2019, 1:00 AMhundreds-breakfast-49010
07/12/2019, 1:05 AMhundreds-breakfast-49010
07/12/2019, 1:05 AMhundreds-breakfast-49010
07/12/2019, 1:05 AM