curved-vase-73456
11/12/2019, 6:14 PMtarget-tag-assignments
can take in directories and tag all targets recursively and if it can if there’s a way to run it before plugins like fsq one.aloof-angle-91616
11/12/2019, 6:15 PMaverage-vr-56795
11/12/2019, 6:16 PMcurved-vase-73456
11/12/2019, 6:16 PMaverage-vr-56795
11/12/2019, 6:17 PMaloof-angle-91616
11/13/2019, 6:08 PMvalidate_tags.py
in our monorepo which we haven't upstreamed for no particular reason--query
option, discussed in https://github.com/pantsbuild/pants/issues/7346 and implemented across a couple open PRs right now, and this seems like it could share implementation with thatvalidate_tags.py
taskAlso, wonder ifCould you elaborate on this? I think this is definitely possible, especially given the infrastructure developed in thecan take in directories and tag all targets recursively and if it can if there’s a way to run it before plugins like fsq one.target-tag-assignments
--query
PR for manipulating targets by tag, but not sure I'm 100% clear on what you're asking. Could I ask you to make it into an issue?curved-vase-73456
11/13/2019, 6:25 PMpath
to tags
, while target-tag-assignments
is working in reverse direction tag
to paths
. Which I wanted to combine, like instead of
[tag]
by_prefix: {
'src/jvm/com/thesigma':['sigma_jvm', 'dependees_must_have:sigma_jvm'],
'test/jvm/com/thesigma': ['sigma_jvm'],
}
I’d like to write
[tag]
by_prefix: {
'src/jvm/com/thesigma':['dependees_must_have:sigma_jvm'],
}
[target-tag-assignments]
tag_targets_mappings: {
'sigma_jvm': ['src/jvm/com/thesigma', 'test/jvm/com/thesigma'],
}
But, also would to expand this for not only prefix match but a more flexible targets selection smth like src/jvm/com/thesigma/::/service
but the later could only be possible if the original plugin also supports it./pants validate-deps
(had to rename original validate
to smth else to avoid scope dups error) while the 1st one is finealoof-angle-91616
11/13/2019, 6:27 PM(had to rename originalugh, annoying, sorryto smth else to avoid scope dups error)validate
curved-vase-73456
11/13/2019, 6:28 PMaloof-angle-91616
11/13/2019, 6:29 PM--query
and other v2 rules run "before" any v1 tasks, but they also can't assign tags to targets that can then get picked up by a later task. two ways i can think of to fix this:
(1) use buildozer (https://github.com/bazelbuild/buildtools/blob/master/buildozer/README.md) to assign tags to targets "manually", before running pants, then use the foursquare plugin to act upon those tags
(2) extend the foursquare plugin task to read from "tags" stored by a previous pants task and interpreting it specially
(3) once --query
ships, building dep/tag validation on top of thatcurved-vase-73456
11/13/2019, 10:57 PMvalidate-deps
or smth)?