-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[7.4.0] Repo context cherry-picks #23389
Merged
Merged
Conversation
This file contains 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
…king_directory for execute() Fixes bazelbuild#21897 per feedback from @meteorcloudy. Closes bazelbuild#22669. PiperOrigin-RevId: 642185332 Change-Id: I188efa9bf0567d14fdd1b67583f51bebd65af295
Now that Bazel built with JDK21, Starlark builtin documentation can be made more readable in source (and easier to author, since less escaping is required). This PR refactors the repository starlark API under `src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/` to use multi-line text blocks. Minor edits have also been made to some documentation (replacing unprocessed back-ticks with HTML `code` tags, adding `code` tags where I think it makes sense, capitalization, punctuation). Stats wise (excluding `test` directory) this covers; - 34 of 1101 `@StarlarkMethod(...)` (5 of 170 files) - 5 of 233 `@StarlarkBuiltin(...)` (5 of 221 files) Closes bazelbuild#22762. PiperOrigin-RevId: 650649974 Change-Id: I3002b8d4bccbe1d11aa6aff184b448eb1f280ba4
Documenting the default caching behaviour for `rctx.download` and `rctx.download_and_extract`. Related to bazelbuild#22652 Closes bazelbuild#22716. PiperOrigin-RevId: 653878029 Change-Id: I129f9eede2b841483a98d5335651c1d1198aaf76
When `repository_ctx.download` or `repository_ctx.download_and_extract` are not given an explicit `canonical_id` the default behaviour can lead to some counterintuitive results (e.g. URL changed but old asset restored from cache due to unchanged checksum). This PR seeks to bring greater attention to `canonical_id` in these low level API (relative to `http_archive` which uses `get_default_canonical_id` by default). URLs are usually the most appropriate `canonical_id` choice, so `get_default_canonical_id` has been added to the public API and sample usage added to documentation. Related to bazelbuild#22652 I need some pointers to make these happen. - [x] Add `get_default_canonical_id` to the Bazel docs (I believe there are other `load`ed API that is missing from docs in one way or another). - [x] Confirm examples render correctly in docs. Closes bazelbuild#22742. PiperOrigin-RevId: 662822225 Change-Id: I1617aa16a62da2d8dff2034fef8ca19aecd33d58
Eager fetching of all labels listed in repo rule attributes was introduced as a performance optimization to avoid costly restarts. Now that restarts are gone by default, this is no longer a benefit as it can cause unnecessary fetches and also create cycles where there wouldn't be any without this behavior (e.g. when two repos write each others labels into a file without resolving them). Work towards bazelbuild#19055 Closes bazelbuild#23371. PiperOrigin-RevId: 665744319 Change-Id: Ia27f207793a2da3fb8e37743b328483f9d45192c
github-actions
bot
added
awaiting-review
PR is awaiting review from an assigned reviewer
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
labels
Aug 22, 2024
Wyverald
approved these changes
Aug 24, 2024
Merged
via the queue into
bazelbuild:release-7.4.0
with commit Aug 24, 2024
f1a1f2d
52 checks passed
github-actions
bot
removed
the
awaiting-review
PR is awaiting review from an assigned reviewer
label
Aug 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-picks the following commits:
rctx.download*
cache key (d4b416f)get_default_canonical_id
public (6052ad6)Closes #23372