https://pantsbuild.org/ logo
#development
Title
# development
p

proud-dentist-22844

03/11/2023, 4:33 PM
@curved-television-6568 could I get some help writing dep rules? They don't seem to be working like I expected. 🧵
👀 1
I've tried each of these:
Copy code
//:reqs
//:reqs#*
//reqs#*
{"path": "//", "name": "reqs#*"}
Copy code
DependencyRuleActionDeniedError: st2client/st2client/base.py has 2 dependency violations:

  * st2client/st2client/BUILD[!*] -> : DENY
    python_sources st2client/st2client/base.py -> python_requirements //:reqs#requests
  * st2client/st2client/BUILD[!*] -> : DENY
    python_sources st2client/st2client/base.py -> python_requirements //:reqs#six
How do I add a rule that allows all reqs? It's like it's matching the
!*
rule even though the reqs rule is listed first.
c

curved-television-6568

03/11/2023, 6:56 PM
digging into this.. just a quick reflection on
{"path": "//", "name": "reqs#*"}
first.. The
name
is matching on the target name, which in your case would be just
reqs
(the generator). This may be unintuitive and need addressing, it’s generator targets that is tripping us up here. The hint lies in the target type for your error message there, as it’s
python_requirements
not
python_requirement
//reqs#*
works, but I need to dig a little deeper to figure out the source of the confusion here…
I would’ve expected
//:reqs#*
to be the one to go with here… or at least be one of the options
think it’s an edge case with a root target address I’ve overlooked.
p

proud-dentist-22844

03/11/2023, 7:33 PM
I'll try just
{"path": "//", "name": "reqs"}
next.
c

curved-television-6568

03/11/2023, 7:40 PM
think I had issues with that one…
got a number of holes to patch wrgt generators here I believe..
👍 1