Skip to content

Commit

Permalink
fix: use 'watchman' from nixpkgs, delete hacks, enable on aarch64-linux
Browse files Browse the repository at this point in the history
Summary: Thanks to the heroic effort of several nixpkgs contributors, watchman
was finally updated to a (much) more recent build, and aarch64 support came
along with it! This allows us to support aarch64-linux, delete our own binary-
based package, and delete some special case hacks in Buck, as well. Overall
a win.

Test Plan: use 'watchman' on my laptop
  • Loading branch information
thoughtpolice committed Apr 12, 2023
1 parent 35af586 commit 81a2e8c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 118 deletions.
2 changes: 0 additions & 2 deletions .envrc
Expand Up @@ -78,8 +78,6 @@ export BUCK2_TEST_DISABLE_LOG_UPLOAD=true
if [ "$(uname)" = "Darwin" ]; then
# XXX FIXME (aseipp): macOS support
echo "direnv: watchman: not enabling, because we're on macOS"
elif [ "$(uname -m)" = "aarch64" ]; then
echo "direnv: watchman: skipping, because watchman isn't supported on aarch64-linux (yet)"
elif [ ! -f .use_watchman ] && [ -z "$CI_RUNNING" ]; then
# XXX FIXME (aseipp): prompt about this file to the user
echo "direnv: watchman: not enabled, because .use_watchman is missing, and we're not in a CI build"
Expand Down
35 changes: 0 additions & 35 deletions buck/nix/buck2/aarch64-linux-notify-hack.patch

This file was deleted.

5 changes: 0 additions & 5 deletions buck/nix/buck2/default.nix
Expand Up @@ -51,11 +51,6 @@ in rustPlatform.buildRustPackage rec {
dontStrip = true; # XXX (aseipp): cargo will delete dwarf info but leave symbols for backtraces

patches = [
# XXX FIXME (aseipp): Disable watchman support entirely and always short-
# circuit to 'notify' on aarch64; this lets us keep things compatible on
# both aarch64-linux and x86_64-linux
./aarch64-linux-notify-hack.patch

# XXX FIXME (aseipp): Use a version of 'prost' with a new API for boxing
# large structs that buck2 needs
./update-prost-fork.patch
Expand Down
71 changes: 0 additions & 71 deletions buck/nix/buck2/watchman.nix

This file was deleted.

6 changes: 1 addition & 5 deletions buck/nix/flake.nix
Expand Up @@ -117,16 +117,12 @@
inherit (pkgs)
coreutils curl # downloading and fundamental scripts
tagref sapling jq getopt jujutsu # utilities
watchman # fs integration
;

# Finally, any globally useful tools we package here go next. This is primarily
# buck, in our case...
buck2 = pkgs.callPackage ./buck2 { };
}) // (pkgs.lib.optionalAttrs (system == flake-utils.lib.system.x86_64-linux) {
# watchman is only supported on x86_64-linux for now; in theory it
# should be possible to port to aarch64-linux through the github
# release...
watchman = pkgs.callPackage ./buck2/watchman.nix { };
});

# The default Nix shell. This is populated by direnv and used for the
Expand Down

0 comments on commit 81a2e8c

Please sign in to comment.