loud-lizard-27679
08/28/2023, 2:23 PMawait Get line, you don't know which rule is being invoked next. I have no idea how I'm supposed to figure out how all the different rules fit together. Yes, you can generate rule graph PDFs. Those things are the closest thing to actual spaghetti that I've ever seen in programming, and as far as I can see they don't even include the names of the rules that were invoked.curved-television-6568
08/28/2023, 2:40 PMGet it’s fairly straight forward to figure out which rule is being invoked once you’ve gotten into it as it’s all type based on inputs and outputs.
Best of luck and welcome back any time.loud-lizard-27679
08/28/2023, 6:24 PMloud-lizard-27679
08/28/2023, 6:39 PMhappy-kitchen-89482
08/28/2023, 7:49 PMGet-by-type to call-by-name conventions. We do plan to implement this soon, and it would make following the rule graph much more straightforward (as well as have performance benefits).loud-lizard-27679
08/28/2023, 8:47 PMlate-advantage-75311
08/29/2023, 9:56 AMGet framework - tooling in addition to the rule graph pdf, which I too tried and found unwieldy (as has often been the case when visualizing a big graph in 2d without a way to interactively manage the level of detail: it becomes spaghetti).
I played with things like having the program print the rule it was running at any given time (by logging from within selectors.native_engine_generator_send after it hits a certain rule) which seems like could allow for a linear interpretation of the execution flow with scale management if we can keep track of which rules got called because of Gets issued within a caller rule.
I was hunting for something very simple - like to find out where in the code we are intentionally dropping file targets when building pex binaries, but it was a struggle to attempt to debug through.curved-television-6568
08/29/2023, 2:05 PMfile targets are filtered out for pex_binary targets. I’ll drop links in reverse order for the crumbs I followed to arrive there (starting with the final location):
• https://github.com/pantsbuild/pants/blob/4f13ae2f02823fb198c0e0c10538f6423ff4dc04/src/python/pants/backend/python/util_rules/python_sources.py#L[…]3 This collects all resource targets (or technically, all targets with a ResourceSourceField)
• https://github.com/pantsbuild/pants/blob/4f13ae2f02823fb198c0e0c10538f6423ff4dc04/src/python/pants/backend/python/util_rules/pex_from_targets.py#L551 The defaults for the PythonSourceFilesRequest is to include resource and exclude file targets.
• https://github.com/pantsbuild/pants/blob/4f13ae2f02823fb198c0e0c10538f6423ff4dc04/src/python/pants/backend/python/goals/package_pex_binary.py#L123 I jumped from here to the create_pex_from_targets rule. I started here as the entry point for packaging pex binaries. (found it by expecting it would be something like it around here somewhere..)
perhaps interesting to some..?loud-lizard-27679
08/29/2023, 3:24 PMloud-lizard-27679
08/29/2023, 3:29 PMcurved-television-6568
08/29/2023, 3:29 PMloud-lizard-27679
08/29/2023, 3:30 PMcurved-television-6568
08/29/2023, 3:31 PMloud-lizard-27679
08/29/2023, 3:34 PMloud-lizard-27679
08/29/2023, 5:40 PM