fairly fundamental proposal: <https://github.com/p...
# development
fairly fundamental proposal: https://github.com/pantsbuild/pants/issues/18895 … syntax bikesheds welcome.
🎉 3
👀 3
Huuuuuge +1 to move to a more "standard-ish" syntax.
🎉 1
Thanks for thinking of this! I generally would be in favor of making explicit what rule you are calling. I like that it will make Pants feel less magical and the benefits you describe like better error messages I'm nervous if people will be confused with the proposed syntax, though. Specifically, it is rare that you want to use "multiple Params" (capital p), right? It makes the rule graph much more complex. I fear people will end up confusing normal lowercase params with uppercase Params I'm wondering if we could have some other syntax to make it more clear this is not a normal function call. But, you do still have to explicitly declare the rule name. Something like:
Copy code
await Evaluate(the_rule)
await Evaluate(the_rule, Param1)
Or, probably confusing, but maybe even
await Get
still, and change the first arg to be the rule name rather than the return type -- Another challenge with the proposed syntax is MyPy. I think it will complain about invalid calls to the rule functions. You can avoid that with some special syntax like
Yeah I like the idea, but think the syntax needs some TLC. I bet there's a way we can keep the
await rule_name()
syntax but make all the other requirements work, like MyPy and engine-supplied-args
👍 1