You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tracking list for the migrated backends.
The strategy at the moment is to roll out through the experimental backends, and also some of the more heavily used backends to get more visibility in case there are problems. I'd recommend that for the "more visible" backends, we start with linters/formatters - as those are probably the most hit goals typically.
How can I migrate a backend?
# Ensure the backend is enabled in pants.toml
pants migrate-call-by-name src/python/pants/backend/WHATEVER::
# Check for unnecessarily `implicitly`s and replace
pants fix fmt lint check test src/python/pants/backend/WHATEVER::`
Unnecessary implicitlys
As it's a lot more work to have the migration code dig into each method call and determine whether there are un-passed parameters, the migration liberally adds **implicitly() to let the rule engine figure out missing parameters, where possible.
However, that's not free (and it's also visual clutter). So, during migration, reviewing each migrated function and checking whether all required parameters are passed would be nice.
It would be nice to have a type check or lint rule, and/or fix this at the migration level - but that would take some time.
Here is a concrete example of this in action: 23cdef5 - implicitly wasn't required.
I don't understand any of this
Yeah... Docs coming soon... Right now, the information is scattered around a number of discussions, issues, and PRs.
Fundamentally, my_foo = await Get(Foo, FooRequest, value) becomes my_foo = await some_function(value) or my_foo = await some_function(value, **implicitly()) - like normal function calling.
This is a tracking list for the migrated backends.
The strategy at the moment is to roll out through the experimental backends, and also some of the more heavily used backends to get more visibility in case there are problems. I'd recommend that for the "more visible" backends, we start with linters/formatters - as those are probably the most hit goals typically.
How can I migrate a backend?
Unnecessary
implicitly
sAs it's a lot more work to have the migration code dig into each method call and determine whether there are un-passed parameters, the migration liberally adds
**implicitly()
to let the rule engine figure out missing parameters, where possible.However, that's not free (and it's also visual clutter). So, during migration, reviewing each migrated function and checking whether all required parameters are passed would be nice.
It would be nice to have a type check or lint rule, and/or fix this at the migration level - but that would take some time.
Here is a concrete example of this in action: 23cdef5 -
implicitly
wasn't required.I don't understand any of this
Yeah... Docs coming soon... Right now, the information is scattered around a number of discussions, issues, and PRs.
Fundamentally,
my_foo = await Get(Foo, FooRequest, value)
becomesmy_foo = await some_function(value)
ormy_foo = await some_function(value, **implicitly())
- like normal function calling.List generated by
pants help-advanced backends
The text was updated successfully, but these errors were encountered: