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

Dependencies do not get parsed correctly in monorepo with multiple packages #564

Open
Kigstn opened this issue Jan 23, 2025 · 0 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@Kigstn
Copy link

Kigstn commented Jan 23, 2025

Heyo!

Thanks for the really cool project first of all :)

I have a big monorepo with a ton of packages that depend on each other, but also other dependencies. I am using uv and workspaces for that. No namespace packages!

my_repo/
  tach.toml
  package1/
    pyproject.toml
    src/
      package1/
        __init__.py
        module1.py
        module2/
          __init__.py
          service.py
        module3.py
  package2/
    pyproject.toml
    src/
      package2/
        __init__.py
        module1.py
        module2/
          __init__.py
          service.py
        module3.py
  docs/
  tests/

In this example, package2 depends on package1 - which is installed using uv workspaces.


I am struggeling a bit to set up tach to detect the dependencies correctly.

I have managed to have tach detect the dirs by using this (full) config. I have no marked anything as modules yet:

source_roots = [
    "package2/src",
    "package1/src",
]

Using the uv run tach check-external command, I would have expected it to see what depencies are used in package2 and to double check these via their repective package2.pyproject.toml file. However I get errors that packages are not installed that are in defined in the corresponding pyproject.toml. And the depency to package1 is not shown as missing when that is removed from the pyproject.toml.


I am a bit unsure what I am supposed to do / if this layout is even supported. I have tried most combinations of sources / modules to no avail - the layout up to gave me the best results for far :)

@emdoyle emdoyle added bug Something isn't working enhancement New feature or request labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants