'watchman' on nixpkgs is very old; until it has
been updated, use watchman from homebrew instead.
Details
- Reviewers
atul ashoat varun bartek - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rCOMM848ec3137982: [Nix] Install watchman through homebrew
nix develop # May take a while as brew install is quite long which watchman # Comes from homebrew install path watchman --version # Should be 2023.01.23.00
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) | Is there any risk that the first time this is run, it won't install because the Nix-sourced Homebrew will be there? |
scripts/install_homebrew_deps.sh | ||
---|---|---|
13 ↗ | (On Diff #21226) | Minor style thing, but should we put a space after >? Looks like we have both in the repo eg: |
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) | /bin/bash should still be there. And this script is compatible with bash 3.2. It's just the execution of direnv's .envrc which may require a more recent version. |
13 ↗ | (On Diff #21226) | I most commonly see it used with the handle immediately after. But I don't have a strong preference. |
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) | Sorry, I put this comment in the wrong place... should've put it on line 13. And also said "Homebrew" when I should've said "Watchman". Basically asking if there's a risk that the old Nix-installed Watchman will still be here when this code runs, so install_if_missing will judge it's not missing and won't install it |
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) |
On new usages of nix develop. No. There shouldn't be a watchman which is being introduced through nix. |
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) | https://phab.comm.dev/D6392 should ensure that direnv users get changes to the dev shell. |
scripts/install_homebrew_deps.sh | ||
---|---|---|
1 ↗ | (On Diff #21226) |
Not clear what you mean by "new usages of nix develop". Presumably the "old usages of nix develop" won't even be running this code, so I'm really confused what the distinction you're introducing here. Is there a risk that the old Nix-installed Watchman will still be here when this code runs, so install_if_missing will judve it's not missing and won't install it? |
Not clear what you mean by "new usages of nix develop". Presumably the "old usages of nix develop" won't even be running this code, so I'm really confused what the distinction you're introducing here.
All depends on when they first ran nix develop and depends if they exit that shell before running nix develop again.
For example:
- Checks out current master
- Runs nix develop
- Runs git pull origin master, pulling in these changes
- Runs nix develop
In this scenario, they will still have the old nixpkgs watchman, as the second invocation of nix develop inherited watchman from the first invocation.
"Proper workflow":
- Checks out current master
- Runs nix develop
- Runs git pull origin master, pulling in these changes
- Quits the current shell (e.g. exit or Ctrl+D)
- Runs nix develop
In this scenario, they are good, the previous dev shell was renewed.
In direnv, this also isn't an issue after D6392 which landed.
Got it, thanks for explaining!! So the "nested nix develop" might not get this installed, but presumably when the user exits the top-level nix develop and reenters, THEN brew install watchman will get run
So the "nested nix develop" might not get this installed, but presumably when the user exits the top-level nix develop and reenters, THEN brew install watchman will get run
Correct