Support watching a path even if it's a directory or nonexistent#21339
Closed
Support watching a path even if it's a directory or nonexistent#21339
Conversation
734daaf to
2152df4
Compare
lberki
reviewed
Feb 14, 2024
b6a4f7c to
463cd52
Compare
2152df4 to
76e8324
Compare
76e8324 to
48a9d95
Compare
- `rctx.watch()` now supports watching a path even if it's a directory or nonexistent. - a path's status changing counts triggers a refetch. - added `path.is_dir` so that users can tell whether a path points to a directory or a file. - added `watch_X` parameters to the following methods, with behavior similar to the `watch` parameter in `rctx.read()` - `rctx.extract()`, `rctx.patch()`, `rctx.template()` (for the template file), `rctx.symlink()` (for the symlink target) Work towards #20952.
48a9d95 to
342b1b7
Compare
lberki
approved these changes
Feb 15, 2024
Wyverald
added a commit
that referenced
this pull request
Feb 20, 2024
- `rctx.watch()` now supports watching a path even if it's a directory or nonexistent. - a path's status changing counts triggers a refetch. - added `path.is_dir` so that users can tell whether a path points to a directory or a file. - added `watch_X` parameters to the following methods, with behavior similar to the `watch` parameter in `rctx.read()` - `rctx.extract()`, `rctx.patch()`, `rctx.template()` (for the template file), `rctx.symlink()` (for the symlink target) Work towards #20952. Closes #21339. PiperOrigin-RevId: 607415094 Change-Id: Iebb6bc28174d05277a034ba3cf5e0c9bf90ce027
Wyverald
added a commit
that referenced
this pull request
Feb 20, 2024
- `rctx.watch()` now supports watching a path even if it's a directory or nonexistent. - a path's status changing counts triggers a refetch. - added `path.is_dir` so that users can tell whether a path points to a directory or a file. - added `watch_X` parameters to the following methods, with behavior similar to the `watch` parameter in `rctx.read()` - `rctx.extract()`, `rctx.patch()`, `rctx.template()` (for the template file), `rctx.symlink()` (for the symlink target) Work towards #20952. Closes #21339. PiperOrigin-RevId: 607415094 Change-Id: Iebb6bc28174d05277a034ba3cf5e0c9bf90ce027
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
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.
rctx.watch()now supports watching a path even if it's a directory or nonexistent.path.is_dirso that users can tell whether a path points to a directory or a file.watch_Xparameters to the following methods, with behavior similar to thewatchparameter inrctx.read()rctx.extract(),rctx.patch(),rctx.template()(for the template file),rctx.symlink()(for the symlink target)Work towards #20952.