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

proud-dentist-22844

06/02/2021, 4:36 AM
Is there any way to add a dependency on a file in a sibling directory? like
../configs/<current_dir_name>.yaml
? When I try I'm getting errors like:
Copy code
InvalidSpecPath: Address spec has un-normalized path part '../configs/dummy_pack_1.yaml'
or
Copy code
InvalidSpecPath: Address spec has un-normalized path part 'st2tests/st2tests/fixtures/packs/dummy_pack_1/../configs/dummy_pack_1.yaml'
e

enough-analyst-54434

06/02/2021, 5:09 AM
Yeah - but it must be a full path from the buildroot. So you'll need to calculate that and not use
..
.
So sibling OK, relative path not OK.
p

proud-dentist-22844

06/02/2021, 5:11 AM
OK. That's what I did. I would prefer the shorter relative path but oh well.
e

enough-analyst-54434

06/02/2021, 5:13 AM
I'm not sure if this is an unintentionally arbitrary restriction or there are reasons, but there are unit tests asserting .. paths are invalid.
p

proud-dentist-22844

06/02/2021, 5:17 AM
not worth fighting for this one. ¯\_(ツ)_/¯
Oh, and thanks for validating that I can't do relative paths 🙂