hello team I hope you are doing I am looking to bu...
# development
s
hello team I hope you are doing I am looking to build a plugin that will achieve that update tags for a specific resolver so afterward I can filter is there anywhere, anyone who can help me with that
w
Hey Florent, what have you tried?
s
the regex to filter by resolves mostly something like
Copy code
bin/pants --print-stacktrace \
            --filter-address-regex=-resolver_one \
            --filter-address-regex=-resolver_two check ::
the behavior is kind of weird sometimes it seems to work but only half he keeps trying to check some. also in 2.29 it seems it just doesnt work at all
I was looking into having maybe a macro or a plugin but for real not easy lol I saw we can do some overrides but it's not scalable as we have multiple resolves and too many apps
w
I'm still not exactly sure what you're trying to achieve. You mentioned tags, like these?https://www.pantsbuild.org/stable/docs/using-pants/advanced-target-selection#tags-annotating-targets
s
yes but we want to have the tags apply only when it is a specific resolve
some source can have multiple resolve
w
Okay, there might be an XY problem going on, but assuming that's not the case - how many instances of this would you see in your code?
s
what do you mean by instances here ?
w
I guess this? "multiple resolves and too many apps" - what does that mean tangibly?
s
its a migration process we do here. We migrate from sql alchemy 1.4 to 2 some apps are using a default resolver the one we want to move to 2 are using another resolver As intermediate steps thoses apps are using both to run the test But for the check as there is blocker we need to disable the check on a specific resovler but keep the other one running
w
Okay, I don’t exactly follow - but it sounds like
__defaults__
or a macro would be the solution here. Almost like a conditional macro, or a macro that tags based on resolve conditions (I still might be misunderstanding what you mean, seeing a BUILD file example would likely clear it up)
s
can you show me small examples on what you mention here ? I tried those solutions already
w
Can you give me an example BUILD file or 2 BUILD targets: 1 you want to run, the other you don't