:thread: <@U06A03HV1> starting thread from <https:...
# development
c
🧵 @witty-crayon-22786 starting thread from https://github.com/pantsbuild/pants/issues/16763#issuecomment-1487370042
First off, any help is welcome 🙂 I reached a point in my dabbling where I felt I got pretty deep into inferring types for pretty much everything and anything, so fear it’ll risk of becoming a performance bottleneck. Right now I’m contemplating a move of what I have to rust using
python-rust
crate for parsing to AST, while still leveraging the type information we have from a running Python interpreter and have that in a dedicated crate in a non-pants specific form which can then be consumed by our rule visitor.
(same crate ruff uses for it’s python parser)
w
hey, sorry for the delay: was in a meeting.
i think that getting a single narrow
UnionMembership
lookup syntax working (even if it is awkward) could be really helpful, since the syntax being awkward or limited overwhelmingly affects Pants maintainers (who define/consume `@union`s), rather than end users (who only implement `@union`s)
so if
impls = union_membership.get(UnionType)
works, for example, that’s enough
but i recognize that even that might be a lot of work.
i like the idea of porting the extraction to rust though.
and, wow: i didn’t realize that
ruff
used `rustpython`’s parser… that’s wild. i wonder how they feel about that, heh.
😅 1
…apparently they’re very aware, and have gotten some contributions because of it. cool!
c
i think that getting a single narrow
UnionMembership
lookup syntax working (even if it is awkward) could be really helpful, since the syntax being awkward or limited overwhelmingly affects Pants maintainers (who define/consume `@union`s), rather than end users (who only implement `@union`s)
ok, I can circle back and see if I can get something working that is to be cleaned up to make some progress on this.
with the longer term goal to have most of the heavylifting in rust