Skip to content

Improve handling of venvs and site-packages#3

Closed
msullivan wants to merge 4 commits intofacebook:mainfrom
msullivan:site_packages-venv
Closed

Improve handling of venvs and site-packages#3
msullivan wants to merge 4 commits intofacebook:mainfrom
msullivan:site_packages-venv

Conversation

@msullivan
Copy link
Copy Markdown
Contributor

  • Skip descending into directories/files with names that are invalid
    python modules. (Prevents descending into
    venv/.../site-packages/...)
  • When looking for the prefix of a module, check site-packages
    before the project root, since a venv will often live
    under the project root, and so currently it gets picked up first.
  • Support configuring site_packages with a command-line argument

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 7, 2026

Hi @msullivan!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@msullivan msullivan force-pushed the site_packages-venv branch from bf08034 to 86d601b Compare April 7, 2026 22:57
@brittanyrey
Copy link
Copy Markdown
Contributor

Hi! I'll hold off on the review until the CLA is in.

 * Skip descending into directories/files with names that are invalid
   python modules. (Prevents descending into
   `venv/.../site-packages/...`)
 * When looking for the prefix of a module, check site-packages
   *before* the project root, since a `venv` will often live
   under the project root, and so currently it gets picked up first.
 * Support configuring site_packages with a command-line argument
@msullivan msullivan force-pushed the site_packages-venv branch from 86d601b to 6dd284a Compare April 17, 2026 22:42
@meta-cla meta-cla Bot added the cla signed label Apr 17, 2026
@msullivan
Copy link
Copy Markdown
Contributor Author

How would you feel about a follow-up that make run-tree use gen_source_db more directly, to avoid some of the duplication?

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 20, 2026

@brittanyrey has imported this pull request. If you are a Meta employee, you can view this in D101645198.

Copy link
Copy Markdown
Contributor

@brittanyrey brittanyrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm! small changes/questions

Comment thread .gitignore
Comment on lines +2 to +3
/target
*~
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these two changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/target/ - I think is definitely necessary - it is the default build output directory
*~ - This one is for me in particular, since *~ is my editor's backup files. (It's a pretty common .gitignore line; I could include some other editors too if we want to be more general)

I can put this in a separate PR though if you want

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to bundle! Thanks for the explanation.

Comment thread src/commands/run_tree.rs Outdated
@brittanyrey brittanyrey self-assigned this Apr 20, 2026
@meta-codesync meta-codesync Bot closed this in 9b07b17 Apr 20, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 20, 2026

@brittanyrey merged this pull request in 9b07b17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants