Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With rye {root:uri}/../../packages/ seems to traverse more than 2 folders up #1570

Open
ShravanSunder opened this issue Jun 14, 2024 · 6 comments

Comments

@ShravanSunder
Copy link

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 astral-sh/uv#4321

@ofek
Copy link
Collaborator

ofek commented Jun 14, 2024

Does the parent modifier work for you? https://hatch.pypa.io/latest/config/context/#global-fields

@ShravanSunder
Copy link
Author

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:

@ofek
Copy link
Collaborator

ofek commented Jun 20, 2024

Anything to do here or can this be closed?

@ShravanSunder
Copy link
Author

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.

@ofek
Copy link
Collaborator

ofek commented Jun 20, 2024

Does it work for you outside of Rye?

@ShravanSunder
Copy link
Author

i actually don't use hatch aside from rye. feel free to close it if you'd like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants