With rye {root:uri}/../../packages/ seems to traverse more than 2 folders up
i'm trying to use rye sync with a python monorepo and root:uri
the resolution of folders doesn't seem to work. for example
"askluna-dotenv @ {root:uri}/../../packages/dotenv" => error: Distribution not found at: file:///Users/shravansunder/Documents/dev/project-dev/askluna-project/packages/dotenv
error: could not write production lockfile for workspace
"askluna-dotenv @ {root:uri}/../packages/dotenv" =>error: Distribution not found at: file:///Users/shravansunder/Documents/dev/project-dev/askluna-project/askluna/apps/packages/dotenv
So for some reason, ../../ seems to traverse by more than 2 folders up instead of exactly 2 folders. And ../ only traverses 1 folder up
related to https://github.com/astral-sh/uv/issues/4321
Does the parent modifier work for you? https://hatch.pypa.io/latest/config/context/#global-fields
its very interesting. i'm not sure which part of the rye tool chain has an impact
- "askluna-dotenv @ {root:parent:uri}/../packages/dotenv",
- Works ✅
- "askluna-dotenv @ {root:parent:uri}/packages/dotenv",
- does not work ❌
- file:///Users/shravansunder/Documents/dev/project-dev/askluna-project/askluna/%7Broot:parent:uri%7D/packages/dotenv
- "askluna-dotenv @ {root:parent:uri}/./packages/dotenv"
- does not work ❌
- file:///Users/shravansunder/Documents/dev/project-dev/askluna-project/askluna/%7Broot:parent:uri%7D/packages/dotenv
So i partly have a solution, but i find this preplexing.
maybe related issues:
- https://github.com/astral-sh/rye/issues/168
- https://github.com/astral-sh/rye/pull/1023
Anything to do here or can this be closed?
Well I’m unsure if this uri feature works as I mentioned above, however perhaps I just don’t understand the behaviour. You can close it if you like.
Does it work for you outside of Rye?
i actually don't use hatch aside from rye. feel free to close it if you'd like!