Tags: Mizuchi/sapling
Tags
fix(scm-prompt): suppress cd output (facebook#985) Summary: If a user has a `chpwd` hook that prints output, it will be prepended to the `dir` variable which breaks the prompt. This change suppresses the output of `cd` to prevent this. Alternatively I considered doing `cd -q` to skip running the chpwd hook, but decided against it. Pull Request resolved: facebook#985 Test Plan: ```zsh $ zsh --no-rcs $ source ~/workspace/github.com/facebook/sapling/eden/scm/contrib/scm-prompt.sh && _scm_prompt # things should be fine $ say_hi() { echo hello } && chpwd_functions+=(say_hi) && _scm_prompt ``` prior to this commit, the prompt would be broken. After this commit, it should be fine. Background: in my particular case, I have a `chpwd` hook that [sources custom scripts](https://github.com/vegerot/dotfiles/blob/032f88715fa2911bec6b3c09aa012145bb1dae7e/.zshrc#L250-L252) depending on the directory, and will tell me if it does so. This was breaking the prompt, so I added this change to fix it. Reviewed By: quark-zju Differential Revision: D66384725 fbshipit-source-id: e03d18887a27fc6c55da1dc7347eacf0fa38cde7
stats: add new counters to existing docs Summary: # Context I added new stats in D58492412, so now I have to document them. I've updated the wiki, but I still need to update the markdown docs stored in the repo. # This diff Updates the stats docs to match reality. Reviewed By: fanzeyi Differential Revision: D59932131 fbshipit-source-id: fe17c2ee986e182d00d35121827346e5c210ba1a
alerts: make it compatible with Python3.8 (facebook#838) Summary: `re.Pattern[str]` is not valid in Python 3.8 Pull Request resolved: facebook#838 Test Plan: ``` Python 3.8.17 (default, Jul 9 2023, 20:57:35) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> from typing import Optional >>> show_after_crashes_regex: Optional[re.Pattern[str]] = None Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'type' object is not subscriptable >>> show_after_crashes_regex: Optional[re.Pattern] = None >>> ``` Reviewed By: zzl0 Differential Revision: D53903964 fbshipit-source-id: 412f4ad5d6011b0da70c47f31f6c919b9c6a8037
Updating submodules Summary: GitHub commits: facebook/CacheLib@af319c5 facebook/fb303@4816112 facebook/fbthrift@eca43d4 facebook/litho@509ddaa facebook/mvfst@77ba7e7 facebook/proxygen@9095290 facebook/rocksdb@f2732d0 facebook/squangle@505288f facebook/wangle@4bbb245 facebook/watchman@63865e4 facebookexperimental/edencommon@a493578 facebookexperimental/rust-shed@dd07461 facebookincubator/fizz@6182dd9 facebookincubator/katran@c60a7ec facebookresearch/vrs@fe46daf pytorch/FBGEMM@66a8779 Reviewed By: bigfootjon fbshipit-source-id: 5eb28051321fb97f12b0ab45c704495c82eb4b5f
Update commit sync config and CommitSyncRepos Summary: This diff adds a new field to the `CommitSyncRepos` and `CommitSyncer` structs, which stores the map from submodule path to its Mononoke repo instance. This map will be used in the `rewrite_commit` function in `eden/mononoke/commit_rewriting/cross_repo_sync/src/lib.rs` to support expanding git submodule file changes. One annoying thing about this change is that **these structs are used in many places**, but not all of them will actually be rewriting commits, meaning that **they don't need to load the repo's submodule dependencies**. Instead of passing empty hashmaps everywhere, I decided to set the field to optional, so I explicitly set to `None` where this is not needed. I added `TODO(T174902563)` to all code pointers that I think will need to load these repos. I'll review each one in more detail after this diff and will implement the code pointers where they're needed. In the diff where I actually start expanding submodules (D52833563) I'll check if the map is set before starting the expand codepath. FYI, I also added a TODO to possibly add unit tests for this later. TBH, since I'll invest significant time on integration tests, I'm not sure if adding unit tests will be worth the time spent, because this workflow is hard to really reproduce in unit tests, since it involves creating git repos and using submodules (i.e. which is way simpler in integration/E2E tests). Reviewed By: mitrandir77 Differential Revision: D53316026 fbshipit-source-id: 29b9c1f3f58784863ce81a03f489dc73cd9fb2f9
Updating submodules Summary: GitHub commits: facebook/CacheLib@7ba3e9c facebook/fb303@798a7b8 facebook/fbthrift@f4a55fe facebook/folly@a016c5e facebook/litho@5e9f038 facebook/mcrouter@fb23451 facebook/mvfst@92f0708 facebook/proxygen@063d0ae facebook/squangle@abc634e facebook/wangle@2fb04fb facebook/watchman@9b1d88a facebookexperimental/edencommon@231eaab facebookexperimental/rust-shed@d9f9de2 facebookincubator/fizz@bd72c4e facebookincubator/katran@b328aa4 facebookincubator/superconsole@8254a5c facebookincubator/velox@9838c7e pytorch/FBGEMM@533c4bb pytorch/kineto@43a5bd9 Reviewed By: jurajh-fb fbshipit-source-id: aff4603c57d5f5a34db134ab2da9af0804124aeb
AnimatedReorderGroup: ignore small distance animation to workaround V… …SCode button rendering Summary: I notice that when committing, while the optimistic state matches the final state, the commits below moves up and down unnecessarily. Upon debugging using a breakpoint in AnimatedReorderGroup when it decides to animate, I found a 4px animation, and the VSCode buttons [Uncommit] [Split] were in its "primary" style, with a larger height first rendered. Apparently the VSCode button then change to the specified "icon" style, with a different height, but it does not do that in the first render. There are enough pitfalls in VSCode toolkit we might want to just replace it... but for now let's workaround the issue by ignoring small distance animation. Screenshot when hitting the breakpoint - buttons have wrong style and height: {F1272099178} Reviewed By: zzl0 Differential Revision: D52667618 fbshipit-source-id: c183d7c60ce0e5da19afd39bf696cff89f5650a3
tests: disable fsmonitor.fallback-on-watchman-exception Summary: This can cover up unexpected bugs/crashes in Watchman integration, so don't fall back for tests. Reviewed By: quark-zju Differential Revision: D51265960 fbshipit-source-id: cd97cc38e5a9a5ee333aff5b18cb9dd2cb779298
rebase: always set base label Summary: it gives users more information about the base commit Reviewed By: muirdm Differential Revision: D50822903 fbshipit-source-id: 97ce6553bfa82a7a228c8a692470d40c2abf8ace
makefile: remove setup.py install for install-oss Summary: since our `sl` is a single binary, we don't need those Python files Reviewed By: sggutier Differential Revision: D51181314 fbshipit-source-id: 715ffdef65d67e7eddd49697b59690f029487365
PreviousNext