Skip to content

Bazel support #1232

@brandonchinn178

Description

@brandonchinn178

Describe the Bug

I'm evaluating Pyrefly for my company's Bazel project because mypy is too slow with caching disabled. However, we're seeing even worse performance from Pyrefly - over 2x slowdown.

Notable things with our Bazel setup:

  • Each dependency gets installed into a separate directory
    • When running a Python file, Bazel simply adds all the dependencies to PYTHONPATH. With pyrefly, I add these directories to --site-package-path
  • Each Python file is a Bazel target, and each Bazel target is typechecked independently
    • With mypy, we have follow_imports set to silent
    • If pyrefly is optimized for checking a whole project at once, it might not be good for multiple runs checking a single file?

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Performanceconfigurationneeds-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions