Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ All notable user-facing changes to `rules_pyrefly` are documented in this file.
### Added

- Support for Bazel 8.x alongside Bazel 9.x.
- Checked-in release metadata for every stable Pyrefly release from 1.2.1 to
1.5.1, in addition to 1.2.0. The examples and docs now use Pyrefly 1.5.1.

[Unreleased]: https://github.com/facebook/rules_pyrefly/compare/v0.1.0...HEAD
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ checking over `py_*` targets.
run Pyrefly through a registered Bzlmod toolchain or through a direct
`pyrefly_cli` executable override.

Pyrefly `1.2.0` is the checked-in supported version and the first stable Pyrefly
release that includes the experimental `bazel-check` command.
Pyrefly `1.5.1` is the recommended version. The checked-in release metadata
includes every stable Pyrefly release from `1.2.0` to `1.5.1`. Pyrefly `1.2.0`
is the first stable release that includes the experimental `bazel-check`
command.

For more detail, see the [design](docs/design.md), [integration
notes](docs/integration.md), and [user notes](docs/users.md).
Expand All @@ -23,7 +25,7 @@ Add the ruleset and register a Pyrefly toolchain in `MODULE.bazel`:
bazel_dep(name = "rules_pyrefly", version = "<version>")

pyrefly = use_extension("@rules_pyrefly//pyrefly:extensions.bzl", "pyrefly")
pyrefly.toolchain(version = "1.2.0")
pyrefly.toolchain(version = "1.5.1")
use_repo(pyrefly, "pyrefly_toolchains")
register_toolchains("@pyrefly_toolchains//:all")
```
Expand Down
5 changes: 3 additions & 2 deletions docs/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ string.

The current implementation targets Bazel 8.x and 9.x with `rules_python` 1.7.0
or newer. The `bazel-check` interface it depends on remains experimental in
Pyrefly. Pyrefly `1.2.0` is the checked-in supported baseline and the first
stable Pyrefly release that includes this interface.
Pyrefly. Pyrefly `1.2.0` is the first stable Pyrefly release that includes this
interface. The checked-in release metadata includes every stable release from
`1.2.0` to `1.5.1`; the examples use `1.5.1`.

The main v1 action path is implemented: target filtering, input JSON emission,
Pyrefly invocation, action inputs, output groups, executable resolution, target
Expand Down
2 changes: 1 addition & 1 deletion docs/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bazel Python project.
## Getting Started

- Add `rules_pyrefly` alongside the existing Python rules, then pin a Pyrefly
version explicitly. The current supported baseline is Pyrefly `1.2.0`.
version explicitly. The recommended version is Pyrefly `1.5.1`.
- Define a separate `pyrefly_aspect` instead of replacing an existing
`mypy_aspect` immediately. This makes it easy to compare results.
- If the existing mypy aspect loads generated type dependencies, put the
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ local_path_override(
)

pyrefly = use_extension("@rules_pyrefly//pyrefly:extensions.bzl", "pyrefly")
pyrefly.toolchain(version = "1.2.0")
pyrefly.toolchain(version = "1.5.1")
use_repo(pyrefly, "pyrefly_toolchains")
register_toolchains("@pyrefly_toolchains//:all")
80 changes: 80 additions & 0 deletions pyrefly/private/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,84 @@ PYREFLY_RELEASES = {
"pyrefly-windows-x86_64.zip": "6b5a5fe1c15093cb369bfcab0651f9e904417d0af49d2095ea75a91735c0fce4",
},
},
"1.2.1": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "b2d4653ee1b64cc3eec3a0b21d9fd03715dc33c33e0bc78e7804d5468cd03545",
"pyrefly-linux-x86_64-musl.tar.gz": "ed118dde5b160ad98b5260a5511dcfc5bb8d4b7e04f483c985d2df6ddaf0bbad",
"pyrefly-macos-arm64.tar.gz": "b9ff6b22c1cce276d2ce2d84ee7770f2794f4e1efdea239def046264ee1b5197",
"pyrefly-macos-x86_64.tar.gz": "2b891db343c111c48d8be32d9b93ac0adf7bd9a93d6bdeb5303e770592a091cd",
"pyrefly-windows-arm64.zip": "68aeda9ed1c3ebb11e42ae2172039d55225d44bdb656d30b642c28eea2d9a7a0",
"pyrefly-windows-x86_64.zip": "a175cbbac6a00d42e1cf24dda18eec29c865d6b1a3540b8b9f5c76f77467a1e6",
},
},
"1.3.0": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "954833c74958d844139e02bf0d240aa05cd96c231086069d00658a3aebad44bf",
"pyrefly-linux-x86_64-musl.tar.gz": "97586de84f392a9c2220fdded4ae58a1528e939bff237a0693be140843e6969f",
"pyrefly-macos-arm64.tar.gz": "c15ad88f494c03e434290a7a22ada4028a184f5f9140e2e869b6cd6eea3637c8",
"pyrefly-macos-x86_64.tar.gz": "f82c8dae0975ef3929636df20cff02294b0be80bda9825910f1e3164954b9aef",
"pyrefly-windows-arm64.zip": "cfa729f6d82aedd628e15630396597925eef7bfbb071f068aa0a28a7721b2802",
"pyrefly-windows-x86_64.zip": "2e37f7a128e59d6740983bd6d14ad5699bd95b04cda7a116de70214d91c407fb",
},
},
"1.3.1": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "c7770869c96bb3dfa4c39c30b644e1d4c61e8f8645069ebf2dac117c34cb9cd1",
"pyrefly-linux-x86_64-musl.tar.gz": "4859097cc9b00b8719993dc8228d2bffcc8659414d32494bb752ccf9d535dc21",
"pyrefly-macos-arm64.tar.gz": "3c7294e86efb53d6bc46619fd17002266731a79894a668b8e9db2ec189e746d2",
"pyrefly-macos-x86_64.tar.gz": "497d5743ff54f1b4a444f72a4147d7b85fa8cf20bf87123304b00b6173254545",
"pyrefly-windows-arm64.zip": "e92c6ee9078d7bbcdb3a22d6be44e0335ddce1e0f9ea9b0eea8fcdd9ce07010e",
"pyrefly-windows-x86_64.zip": "d10bb909b9007d076fe7cb1f7164e26ab4287ca08e4df624fffaee7360f44baa",
},
},
"1.3.2": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "3d0ec81c08dbb4a5251dd15800131e8d82b3f09c118f6c669ccbf1bf486db65e",
"pyrefly-linux-x86_64-musl.tar.gz": "11bc0951e77e5fe2eb84b3e297bc2af598e6008b2f2788336cbc610a254a303b",
"pyrefly-macos-arm64.tar.gz": "7c0b2109a00ccca83e22daa3724d4a091a1b673823175004eb449ba88ab2adb7",
"pyrefly-macos-x86_64.tar.gz": "5ceb539168b2cd681d032f6e2b6d95571fd92e6cad70d11acd9284660d56e88e",
"pyrefly-windows-arm64.zip": "46e7a5eeef2eb4a11e88aebff2a49f5d45f31250221bcef1ef1b9cba08513bb1",
"pyrefly-windows-x86_64.zip": "3f23b1807033aff34c96f65ead4958d1493fbcbb087cc5ba3ab3ce9ebbd95911",
},
},
"1.4.0": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "ead4b6c024f3060e8afd09b24b2650cde70c2bfab6fb639aebc773885418c476",
"pyrefly-linux-x86_64-musl.tar.gz": "a615290c7f2dbcf38a103fe8c0c617b3d9d8a756a1665eddd9c49782275b002e",
"pyrefly-macos-arm64.tar.gz": "590b1a638e68e9573fe2c79386d8cfb69eddc575c54b798d2375b054a5c66c90",
"pyrefly-macos-x86_64.tar.gz": "9660dfe2abef579b3a684d18a926d4d82ece1cde12f0a809b3f44ff50d443a81",
"pyrefly-windows-arm64.zip": "76725412d1a799ca4015d0e99a76d24ae26f42bb53379f8330f5f4ce5cd35ee6",
"pyrefly-windows-x86_64.zip": "90cb8c7d92051d274c48dd1caacbc20e795b3f5248ddc55d6d22adf53424225f",
},
},
"1.4.1": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "e689804431d3419b2e342c0f0fa7a429273be4910d5fe32c5c26ec4d6d5fbc68",
"pyrefly-linux-x86_64-musl.tar.gz": "254275403d5312541a7d3b57f6a466f6c47c61fcae4aa6c53eb2259dabf94a02",
"pyrefly-macos-arm64.tar.gz": "c3bed7f4777e4727b0a16833ea1e7cdbae0a9ba7b9f274c8c99a59a13ea378bc",
"pyrefly-macos-x86_64.tar.gz": "fbe1fe0da29556696df812d9099c03bbc744c63aa4dc671bde37806d31434e64",
"pyrefly-windows-arm64.zip": "f90c4cce550b5c4e5376fe0f02c8c7e1b181f975aced393bcd8d50426df61ad2",
"pyrefly-windows-x86_64.zip": "5a90780dbb78faad27bab4ce6e14f5ae0065e0aa3a46f5542c62ad62533c5c3b",
},
},
"1.5.0": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "0dbaeca00d082189eb5641fb787ff11ec497f310651fd0f2bc44ed6bb42429c3",
"pyrefly-linux-x86_64-musl.tar.gz": "b5c01c39fd089cb1f45b9b7553d1dbfd21644b23ca5721e16f29c32631659ee1",
"pyrefly-macos-arm64.tar.gz": "c8637fd8ef859facbe70a647ce77fa82b26394d49b5f37c0246fb22b7b5b265e",
"pyrefly-macos-x86_64.tar.gz": "c2d00f7da3755199b3c0a758944c12f960f73f6c7891a0ed4e602fe38d9868c5",
"pyrefly-windows-arm64.zip": "01841b1c2e730858453b4a8f33e9373ef5846f95270d0dcc7f9c656163259e00",
"pyrefly-windows-x86_64.zip": "c1dcc29d7b47eb9c2c251d2e1f0e7fbb7116c1e7e238b85db94c588b819db306",
},
},
"1.5.1": {
"assets": {
"pyrefly-linux-arm64-musl.tar.gz": "c904fff99be18d83828173330b4b43e84191a7d6421f1037f9c4637360e4f91b",
"pyrefly-linux-x86_64-musl.tar.gz": "bcf4bd70bd08b546c915998ff6b7ffd67dda0fca4cf8aa7de59d29802fc32ba3",
"pyrefly-macos-arm64.tar.gz": "a4238a2a1585007b2774bda4d61dc34d450e071ecaf7d402c5afd85c11e20c39",
"pyrefly-macos-x86_64.tar.gz": "2d9f70e83794fad2d727a530c6e280dc4679401e814dc2b38ae73b85d085f85b",
"pyrefly-windows-arm64.zip": "0e83a61483eb8740cd99d96ba770c49fff4b8c1ed523dbbc18b6b8ee43b4c1bb",
"pyrefly-windows-x86_64.zip": "fd65c5e0d08144ce6860ae5396b69445e6d9775064103db33222ecec5b5cea38",
},
},
}
2 changes: 1 addition & 1 deletion tests/verify_toolchain_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument(
"--pyrefly-version",
default=os.environ.get("PYREFLY_VERSION", "1.2.0"),
default=os.environ.get("PYREFLY_VERSION", "1.5.1"),
)
parser.add_argument(
"--output-group",
Expand Down