idea: Instead of relying on `register.py` having a...
# plugins
a
idea: Instead of relying on
register.py
having a complete set of
rules()
maybe
@rules
or
collect_rules()
could also take a list of dependencies with a
rules()
method (or, also maybe a backend_dependencies) Had to comment out most of all my rules, so I could do an
export
to get the latest changes in my IDE to make sure I'm changing the right things. And then other stuff was broken when re-enabling them 'big bang', so I've been sequentially enabling them to find out what's triggering issues. But so far I've spent my time chasing down dependencies than the one-broken-rule Would also be nice to have a
--ignore-unknown-targets
and a
--ignore-unknown-fields
so you can disable backends that define new target types and fields during an upgrade
w
for the first thing, a change like https://github.com/pantsbuild/pants/issues/18050 might help?
a
pretty much
if you lot could not be 5 steps ahead of me that'd be great.
😄 2
c
for unknown targets, there’s a flag for this internally already so would “just” need a flag to expose it as a public toggle https://github.com/pantsbuild/pants/blob/a1dfcb9b366ad6b8aead16680a6582b4d76161dc/src/python/pants/engine/internals/parser.py#L300
and for unknown fields, I think it would make most sense to filter out unknown fields in this Registrar class which is the primary bridge between the BUILD files and pants targets, and also knows about available fields https://github.com/pantsbuild/pants/blob/a1dfcb9b366ad6b8aead16680a6582b4d76161dc/src/python/pants/engine/internals/parser.py#L230-L289