Skip to content

Support watching a path even if it's a directory or nonexistent#21339

Closed
Wyverald wants to merge 1 commit intomasterfrom
wyv-watch-exists
Closed

Support watching a path even if it's a directory or nonexistent#21339
Wyverald wants to merge 1 commit intomasterfrom
wyv-watch-exists

Conversation

@Wyverald
Copy link
Copy Markdown
Member

  • 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.

@Wyverald Wyverald requested a review from lberki as a code owner February 13, 2024 23:47
@github-actions github-actions Bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Feb 13, 2024
Comment thread src/test/shell/bazel/starlark_repository_test.sh
@Wyverald Wyverald requested a review from a team as a code owner February 14, 2024 22:10
@Wyverald Wyverald changed the base branch from wyv-watch-file to master February 14, 2024 22:11
@Wyverald Wyverald removed request for a team, ahumesky and ted-xie February 14, 2024 22:12
- `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.
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 15, 2024
@Wyverald Wyverald deleted the wyv-watch-exists branch February 16, 2024 03:48
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants