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

Fix tach report with Python files outside source roots; parallelize #562

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

emdoyle
Copy link
Member

@emdoyle emdoyle commented Jan 22, 2025

This PR fixes an issue with running tach report in a project which has Python files outside of known source roots.

Example:
Report failed: Filesystem error: No matching source root found for filepath: "<filepath>"

This is relatively common in a monorepo scenario, but tach report was incorrectly trying to translate every Python file under the project root into a module path. Instead, Tach should only walk each source root, similar to tach check.

Also similarly to tach check, this work can be parallelized using rayon. It could be made much more memory efficient, but this PR keeps the behavior essentially the same as before.

@emdoyle emdoyle merged commit 27354b6 into main Jan 22, 2025
8 checks passed
@emdoyle emdoyle deleted the fix-report-fs-traversal branch January 22, 2025 23:51
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

Successfully merging this pull request may close these issues.

1 participant