Hi, I’m developing support for a new model architecture in the MAX framework. My current iterative development workflow is as follows:
- Make code changes
- Run
./bazelw run formatto ensure code consistency - Build with
./bazelw build //max/...to verify compilation and logic
Currently, Mypy type checking errors are only surfaced during the full build process. However, ./bazelw run format does not catch these errors, as it focuses on formatting (buildifier, ruff, markdownlint, mblack) rather than static type analysis. This makes the feedback loop for type errors significantly slower due to the build overhead.
So, my questions are
- Is this the intended workflow? Should Mypy errors only be validated during a build, or am I missing a pre-build check step?
- Is there a way to run Mypy checks in isolation? Running a full build just to see type errors is time-consuming. Is there a standalone command for Mypy checking within the Bazel setup?
- Should Mypy be integrated into the
formatorlintworkflow? Or is it intentionally kept separate due to performance or other reasons?
These commands are I’m Using
# Formatting (Fast, but doesn't catch type errors)
./bazelw run format
# Building (Slow, but surfaces Mypy errors)
./bazelw build //max/...