Skip to content
  • Xdng Yng's avatar
    Make `path.readdir()` watch the dirents by default · b1294e34
    Xdng Yng authored
    - Added a new parameter `watch` to `path.readdir()` that allows one to watch for changes in entries under a given directory.
      - only names are watched; 'entry types' are not. This somewhat matches the return value of `path.readdir()`, which only contains entry names
      - same restrictions as `rctx.watch()` in terms of which paths can be watched and which cannot; similarly for `mctx`.
    - Made a big-ish refactor that eliminated the two `RepoRecordedInput.File` subclasses, and pulled the difference into a separate `RepoRecordedInput.RepoCacheFriendlyPath` instead. This new path class is used by the new `RepoRecordedInput.Dirents` as well.
    
    Work towards https://github.com/bazelbuild/bazel/issues/20952.
    
    Closes #21341.
    
    PiperOrigin-RevId: 607772207
    Change-Id: Ibba2b3389acd23e0a703818fec2cd58321a9b896
    b1294e34