Closed emdoyle closed 1 month ago
Looks great/working for me when I test! Some nice-to-haves would mainly be around the ergonomics of mod
- unmarking modules that don't have a source root, not allowing nested source roots, not allowing modules with the same relative path under different source roots, etc.
Definitely all nonblocking tho; stoked to see this get out!
This is awesome! Just tried this today on my own project and it worked so well! Thank you so much :) β€οΈ
Fixing #203 and #192
NOTE: The base of this branch will be updated after #207 merges
This PR essentially changes
source_root
from a single path to a list of paths (source_roots
). This change propagates through most of the codebase, but the semantic change is straightforward.Tach will now search for project imports in all the configured source roots when translating module paths to filesystem paths (and vice versa).
This unlocks support for 'monorepo' use cases, since a user can now mark all applicable package source roots and validate the expected dependencies.
This PR also drops certain expectations around finding
__init__.py
in Python packages, which means namespace packages are also supported. This is particularly useful when building many subsidiary packages which are distributed under a common namespace.Example: