-
-
Notifications
You must be signed in to change notification settings - Fork 681
doc: add notes on the design #3722
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
Merged
+46
−2
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,17 @@ This repository aims to follow [semantic versioning](https://semver.org). | |
|
|
||
| The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See [How to contribute](CONTRIBUTING.md) page for information on our development workflow. | ||
|
|
||
| ## Design | ||
|
|
||
| * Supported OSes - as per our supported platform policy, we strive for support on all of the platforms that we have CI for. Some platforms do not have the same backwards compatibility guarantees, but we hope the community can step in where needed to make the support more robust. | ||
| * `requirements.txt` is how users have been defining dependencies for a long time. We support this to support legacy usecases or package managers that we don't support directly. Any additional information that we need will be retrieved from the SimpleAPI during the `bzlmod` extension evaluation phase. Then it will be written to the `MODULE.bazel.lock` file for future reuse. We have plans to support `uv.lock` file directly. `uv` is recommended for generating a fully locked `requirements.txt` file and we do provide a rule for it. | ||
| * The `py_binary`, `py_test` rules should scale to large monorepos and we work hard to minimize the work done during analysis and build phase. What is more, the space requirements for should be minimal, so we strive to use symlinks rather than extracting wheels at build time. This means that for different configurations of the same build, we are not extracting the wheel multiple times thus scaling better over the time. From `2.0` onwards we are creating a virtual env for each target by creating an actual minimal virtual environment using symlinks. We plan on creating the traditional `site-packages` layout in the future by default. | ||
| * Support for standards - we strive to first implement any standards needed within `rules_python` and this has resulted in a few PEPs supported within pure starlark - PEP440, PEP509. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These lines exceed the 100-character limit. Additionally, line 26 contains grammatical errors ('space requirements for should be' and 'over the time'), and line 27 likely refers to PEP 508 (Dependency specification) rather than PEP 509 (Dictionary versioning). References
|
||
|
|
||
| Common misconceptions: | ||
| * `rules_python` has to keep backwards compatibility with `google3`. Whilst this might have been true in the past, `rules_python` is an open source project and any compatibility needs should come from the community - we have no requirement to keep this compatibility and are allowed to make our decisions. However, we do want to keep backwards compatibility as long as possible to not upset users with never ending migrations. | ||
| * `rules_python` is not caching pip downloads. With 2.0, we use Bazel's downloader by default and rely on bazel to provide the repository caching mechanisms. This means that for simpler setups this should result in transparent and scalable caching with the most recent bazel versions unless there are issues in the bazel itself. | ||
|
rickeylev marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Documentation | ||
|
|
||
| For detailed documentation, see <https://rules-python.readthedocs.io> | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.