curved-television-6568
11/24/2022, 2:20 AMcurved-television-6568
11/24/2022, 2:20 AMcurved-television-6568
11/24/2022, 2:24 AMproud-dentist-22844
11/24/2022, 3:07 AMproud-dentist-22844
11/24/2022, 3:08 AMcurved-television-6568
11/24/2022, 3:47 AMcurved-television-6568
11/24/2022, 3:48 AMcurved-television-6568
11/24/2022, 3:48 AMcurved-television-6568
11/24/2022, 3:49 AMproud-dentist-22844
11/24/2022, 4:26 AM"target_a"
? Is that like python_sources
? Or is that an address to a target?proud-dentist-22844
11/24/2022, 4:28 AM()
is for tags and []
is for filepaths?
Where did that syntax come from? Is there anything else like it in pants?proud-dentist-22844
11/24/2022, 4:31 AM[fastapi]
compare to //:reqs#fastsapi
? Something still feels disconnected.proud-dentist-22844
11/24/2022, 4:31 AMcurved-television-6568
11/24/2022, 4:32 AMcurved-television-6568
11/24/2022, 4:33 AM()
are for tags and []
for paths.curved-television-6568
11/24/2022, 4:33 AM[fastapi]
is a “path glob”, if I used the full thing, it would’ve been [3rdparty/python#fastapi]
curved-television-6568
11/24/2022, 4:34 AMcurved-television-6568
11/24/2022, 4:34 AM//glob
anchors to project rootcurved-television-6568
11/24/2022, 4:34 AM/glob
anchors to path of BUILD file where the glob is declaredcurved-television-6568
11/24/2022, 4:35 AMsrc/BUILD
with a glob that reads /foo
it will match the same as //src/foo
curved-television-6568
11/24/2022, 4:37 AM./glob
anchors to the rule where it is used. This make come into effect if I have a glob in src/BUILD
that reads ./foo
but then I have a target in src/a/BUILD
but with no rules in it, so the rules from src/BUILD
applies (are inherited), so when target src/a:baz
evaluates the ./foo
glob it will match //src/a/foo
curved-television-6568
11/24/2022, 4:39 AMglob
(i.e. no leading slash or period) is not anchored (I refer to it as floating, think re.search
vs re.match
for the anchored versions) and matches anywhere and up to the end. That is what I used in the [fastapi]
it’s the final part of the name.curved-television-6568
11/24/2022, 4:42 AM{"path": "foo", "tags":["bar"], "type":"resources"}
and that became resoures(bar)[foo]
I’m not aware of anything else in Pants that would apply here… using the address syntax too much could potentially become confusing I think, as it’s not addresses.curved-television-6568
11/24/2022, 4:43 AMcurved-television-6568
11/24/2022, 4:46 AMproud-dentist-22844
11/24/2022, 5:09 AMproud-dentist-22844
11/24/2022, 5:11 AM[fastapi]
match both //3rdparty/python:reqs#fastapi
and //3rdparty/python:reqs#fastapi-plugins
?curved-television-6568
11/24/2022, 5:14 AM$
at the end, so must match to the endcurved-television-6568
11/24/2022, 5:14 AM[fastapi*]
would, otohproud-dentist-22844
11/24/2022, 5:18 AM[#fastapi]
instead to make sure it doesn't match something like //3rdparty/python:reqs#aioauth-fastapi
?proud-dentist-22844
11/24/2022, 5:23 AMcurved-television-6568
11/24/2022, 5:23 AMcurved-television-6568
11/24/2022, 5:23 AMcurved-television-6568
11/24/2022, 5:23 AMcurved-television-6568
11/24/2022, 5:25 AMSo, then should it beas its only for what we have in our own requirments file and not the whole world, I’m not that concerned with that conflict (and actually in this case would see it as the right thing to cover both)instead to make sure it doesn’t match something like[#fastapi]
?//3rdparty/python:reqs#aioauth-fastapi
proud-dentist-22844
11/24/2022, 5:26 AM//glob
, /glob
, ./glob
, glob
. And it looks like you made it handle *
and `**`: so *
only handles up to one level of a path, but **
can match recursively, right?curved-television-6568
11/24/2022, 5:28 AMfoo/**
also matches foo
so the trailing slash is optional when followed by recursive match allproud-dentist-22844
11/24/2022, 5:29 AM[fastapi]
in regex form is basically: ^.*fastapi$
- Could i make that more explicit and do [*fastapi]
if I wanted to make it clear that I'm trying to match more than one? Or is the wildcard only allowed at the end?proud-dentist-22844
11/24/2022, 5:31 AMcurved-television-6568
11/24/2022, 5:37 AMcurved-television-6568
11/24/2022, 5:37 AM*fastapi
is perfectly fine, just to make it clearcurved-television-6568
11/24/2022, 5:38 AMcurved-television-6568
11/24/2022, 5:40 AMfoo/bar/../baz
and stuff..curved-television-6568
11/24/2022, 5:41 AMcurved-television-6568
11/24/2022, 5:41 AMcurved-television-6568
11/24/2022, 5:42 AMcurved-television-6568
11/24/2022, 5:43 AMproud-dentist-22844
11/24/2022, 5:50 AM/../bar
. huh. Go figure.curved-television-6568
11/24/2022, 5:50 AMproud-dentist-22844
11/24/2022, 5:51 AMcurved-television-6568
11/24/2022, 5:51 AMproud-dentist-22844
11/24/2022, 5:53 AMbusy-vase-39202
11/24/2022, 12:33 PM