Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.76k stars 9.57k forks source link

Upgrading one package (mise) broke two other packages (eza, bat) #17906

Closed llimllib closed 1 month ago

llimllib commented 1 month ago

brew doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  python-magic

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  llvm@13
  openssl@1.1
  pup
  python-dateutil
  python-packaging
  python@3.8

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-cask-fonts
Untap them with `brew untap`.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  zls

Verification

brew config output

$ brew config
HOMEBREW_VERSION: 4.3.12-6-g3ac3fee
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3ac3feed3c060df4c4799591b2119392b1fe5be2
Last commit: 5 hours ago
Core tap HEAD: 183f6f5b6683ba7794fa4a496a4fc486918295b6
Core tap last commit: 11 days ago
Core tap JSON: 30 Jul 15:02 UTC
Core cask tap HEAD: bdd62f826e8fd28f8343da53f7ccc1b8e9327d77
Core cask tap last commit: 11 days ago
Core cask tap JSON: 30 Jul 15:02 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BAT_THEME: ansi
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: /opt/homebrew/bin/nvim
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.43.2 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false

What were you trying to do (and why)?

I upgraded mise with brew upgrade mise

What happened (include all command output)?

full output for `brew upgrade mise` ``` $ brew upgrade mise ==> Auto-updating Homebrew... Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). ==> Upgrading 1 outdated package: mise 2024.6.2 -> 2024.7.5 ==> Downloading https://ghcr.io/v2/homebrew/core/mise/manifests/2024.7.5 ##################################################################################################################################################################################################################### 100.0% ==> Fetching dependencies for mise: libgit2 ==> Downloading https://ghcr.io/v2/homebrew/core/libgit2/manifests/1.8.1 ##################################################################################################################################################################################################################### 100.0% ==> Fetching libgit2 ==> Downloading https://ghcr.io/v2/homebrew/core/libgit2/blobs/sha256:c74a306a3d2a68d22dd3951ca1a2fb0c566fccd4ff7ac1b40c75fb739cf4359f ##################################################################################################################################################################################################################### 100.0% ==> Fetching mise ==> Downloading https://ghcr.io/v2/homebrew/core/mise/blobs/sha256:7d420ff645c77e2d82e85f10aaa7806a43441f495e4a45aa78679abaffa9da38 ##################################################################################################################################################################################################################### 100.0% ==> Upgrading mise 2024.6.2 -> 2024.7.5 ==> Installing dependencies for mise: libgit2 ==> Installing mise dependency: libgit2 ==> Downloading https://ghcr.io/v2/homebrew/core/libgit2/manifests/1.8.1 Already downloaded: /Users/llimllib/Library/Caches/Homebrew/downloads/84b074c6d1ee51616dfba962c9b638aeda6093080b5ebf82e6a02017bce44215--libgit2-1.8.1.bottle_manifest.json ==> Verifying attestation for libgit2 ==> Pouring libgit2--1.8.1.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/libgit2/1.8.1: 106 files, 4.7MB ==> Installing mise ==> Verifying attestation for mise ==> Pouring mise--2024.7.5.arm64_sonoma.bottle.tar.gz ==> Caveats If you are using fish shell, mise will be activated for you automatically. zsh completions have been installed to: /opt/homebrew/share/zsh/site-functions ==> Summary 🍺 /opt/homebrew/Cellar/mise/2024.7.5: 15 files, 18MB ==> Running `brew cleanup mise`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). Removing: /opt/homebrew/Cellar/mise/2024.6.2... (15 files, 18.2MB) Removing: /Users/llimllib/Library/Caches/Homebrew/mise_bottle_manifest--2024.6.2... (11KB) Removing: /Users/llimllib/Library/Caches/Homebrew/mise_bottle_manifest--2024.7.0... (11.4KB) ==> Upgrading 2 dependents of upgraded formulae: Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). bat 0.24.0 -> 0.24.0_1, eza 0.18.13 -> 0.18.23 ==> Downloading https://ghcr.io/v2/homebrew/core/bat/manifests/0.24.0_1 ##################################################################################################################################################################################################################### 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/eza/manifests/0.18.23 ##################################################################################################################################################################################################################### 100.0% ==> Checking for dependents of upgraded formulae... ==> No broken dependents to reinstall! ==> Caveats ==> mise If you are using fish shell, mise will be activated for you automatically. zsh completions have been installed to: /opt/homebrew/share/zsh/site-functions ```
investigating the eza package ``` $ brew info eza ==> eza: stable 0.18.23 (bottled) Modern, maintained replacement for ls https://github.com/eza-community/eza Installed /opt/homebrew/Cellar/eza/0.18.13 (14 files, 1003.0KB) * Poured from bottle using the formulae.brew.sh API on 2024-05-01 at 14:13:52 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/e/eza.rb License: MIT ==> Dependencies Build: pandoc ✘, pkg-config ✔, rust ✘ Required: libgit2 ✔ ==> Caveats zsh completions have been installed to: /opt/homebrew/share/zsh/site-functions ==> Analytics install: 16,224 (30 days), 44,705 (90 days), 115,919 (365 days) install-on-request: 16,225 (30 days), 44,705 (90 days), 115,918 (365 days) build-error: 11 (30 days) $ ls /opt/homebrew/Cellar/eza/ 0.18.13/ $ eza dyld[36490]: Library not loaded: /opt/homebrew/opt/libgit2/lib/libgit2.1.7.dylib Referenced from: <4568B803-1560-367E-A1E5-BE062C6828B8> /opt/homebrew/Cellar/eza/0.18.13/bin/eza Reason: tried: '/opt/homebrew/opt/libgit2/lib/libgit2.1.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libgit2/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/opt/libgit2/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file) ```

What did you expect to happen?

upgrading mise, which upgraded libgit2, ought to have upgraded eza and bat. It reported that it did, but the upgrades seem not to have happened, leaving me with broken packages despite no errors being shown.

I expected either errors to appear, or the packages to work

Step-by-step reproduction instructions (by running brew commands)

carlocab commented 1 month ago

What's the output of brew outdated?

You should be able to run brew upgrade eza bat to fix the broken installs, but I agree that brew should've handled this automatically. Please check the output of brew outdated before running brew upgrade.

CC @Homebrew/brew

llimllib commented 1 month ago

I largely prefer not to update stuff that works, so I have many outdated packages; in this output I have updated bat such that it no longer appears, but left eza at the old version to facilitate debugging this issue

brew outdated ``` $ brew outdated ==> Downloading https://formulae.brew.sh/api/formula.jws.json ##################################################################################################################################################################################################################### 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ##################################################################################################################################################################################################################### 100.0% actionlint (1.7.0) < 1.7.1 agg (1.3.0) < 1.4.3 amfora (1.9.2) < 1.10.0 aria2 (1.36.0_2) < 1.37.0 ascii (3.18) < 3.30 asciinema (2.2.0) < 2.4.0 autoconf (2.71) < 2.72 automake (1.16.5) < 1.17 aws-nuke (2.19.0) < 2.25.0 awscli (2.17.14) < 2.17.19 bash-completion@2 (2.11) < 2.14.0 bat-extras (2023.06.15) < 2024.07.10 bazel (7.1.1) < 7.1.2 bitwarden-cli (2024.6.0) < 2024.6.1 bitwise (0.43) < 0.50 broot (1.23.0) < 1.40.0 btop (1.2.13) < 1.3.2 c-ares (1.28.1, 1.32.1, 1.32.2) < 1.32.3 caddy (2.7.6) < 2.8.4 cfssl (1.6.3) < 1.6.5 minacle/chntpw/chntpw (1.0.1) < 1.0.3 clang-format (14.0.6) < 18.1.8 cmake (3.25.1, 3.29.0) < 3.30.1 cmake-docs (3.24.1) < 3.30.1 copilot (1.10.1) < 1.34.0 coreutils (9.4) < 9.5 cryptography (42.0.8, 42.0.8) < 43.0.0 curl (8.7.1) < 8.9.0 dart-lang/dart/dart (2.19.1) < 3.4.4 dasel (1.25.0) < 2.8.1 deno (1.41.3) < 1.45.2 direnv (2.33.0) < 2.34.0 doctl (1.100.0) < 1.110.0 docutils (0.20.1_1) < 0.21.2 doggo (0.5.3) < 1.0.4 dos2unix (7.4.2) < 7.5.2 duckdb (0.10.3) < 1.0.0 efm-langserver (0.0.50) < 0.0.53 emscripten (3.1.63) < 3.1.64 exiftool (12.42_1) < 12.76 exiv2 (0.28.2) < 0.28.3 eza (0.18.13) < 0.18.23 fd (9.0.0) < 10.1.0 findutils (4.9.0) < 4.10.0 wader/tap/fq (0.5.0) < 0.12.0 frei0r (2.3.2) < 2.3.3 fzf (0.46.1) < 0.54.2 gifsicle (1.93) < 1.95 git (2.43.2) < 2.46.0 git-delta (0.16.5) < 0.17.0 git-lfs (3.2.0) < 3.5.1 gnu-sed (4.8) < 4.9 gobject-introspection (1.80.0) < 1.80.1 gojq (0.12.14) < 0.12.16 goreleaser (1.25.1) < 2.1.0 graphicsmagick (1.3.42_2) < 1.3.43 guile (3.0.9_1) < 3.0.10 helix (24.03) < 24.07 htop (3.1.1) < 3.3.0 hugo (0.89.4) < 0.130.0 hyperfine (1.17.0) < 1.18.0 imagemagick (7.1.1-34) < 7.1.1-36 jc (1.24.0) < 1.25.3 jpeg (9e) < 9f just (1.23.0) < 1.32.0 k6 (0.51.0) < 0.52.0 keyring (24.3.0) < 25.2.1 libavif (1.0.4) < 1.1.0 libedit (20230828-3.1) < 20240517-3.1 libffi (3.4.2) < 3.4.6 libfido2 (1.14.0_1) < 1.15.0 libgsf (1.14.51) < 1.14.52 libheif (1.17.6_1) < 1.18.1 libimagequant (4.3.0) < 4.3.1 libkeccak (1.3.1.2) < 1.4 libpthread-stubs (0.4) < 0.5 llvm@13 (13.0.1_1) < 13.0.1_2 lua-language-server (3.6.24) < 3.9.3 luajit (2.1.1703358377, 2.1.1713773202) < 2.1.1720049189 luarocks (3.9.2) < 3.11.1 mongodb/brew/mongodb-community@5.0 (5.0.26) < 5.0.28 mongodb/brew/mongodb-database-tools (100.9.4) < 100.9.5 mongosh (2.2.12) < 2.2.15 mprocs (0.6.4) < 0.7.1 msgpack (6.0.1) < 6.0.2 neovim (0.10.0) < 0.10.1 nginx (1.23.3) < 1.27.0 ninja (1.11.1) < 1.12.1 node (22.4.1) < 22.5.1 numpy (1.26.4, 2.0.0) < 2.0.1 nushell (0.90.1) < 0.96.1 ollama (0.1.28) < 0.3.0 openjdk (22.0.1) < 22.0.2 openjdk@11 (11.0.23) < 11.0.24 openldap (2.6.7) < 2.6.8 pandoc (3.1.12.1) < 3.2.1 parallel (20220722) < 20240722 parquet-cli (1.14.1) < 1.14.1_1 tidbyt/tidbyt/pixlet (0.25.2) < 0.33.3 postgresql@14 (14.11_1) < 14.12 manojkarthick/tap/pqrs (0.2.1) < 0.3.2 pygments (2.17.2) < 2.18.0 python-dateutil (2.8.2) < 2.9.0.post0 python-packaging (24.0) < 24.1 python-setuptools (69.0.3, 69.1.0) < 72.1.0 python@3.10 (3.10.14) < 3.10.14_1 python@3.9 (3.9.19) < 3.9.19_1 qt@5 (5.15.13) < 5.15.13_1 redis (7.2.4) < 7.2.5 ripgrep (14.0.1) < 14.1.0 rust-analyzer (2023-10-09) < 2024-07-29 s3cmd (2.4.0) < 2.4.0_1 sass/sass/sass (1.58.0) < 1.77.8 sbcl (2.2.4) < 2.4.7 scdoc (1.11.2) < 1.11.3 sevenzip (23.01) < 24.07 sha3sum (1.2.2) < 1.2.3.1 shellcheck (0.9.0) < 0.10.0 spatialindex (1.9.3) < 2.0.0 sponge (0.68) < 0.69 stylua (0.16.1) < 0.20.0 subversion (1.14.2_4) < 1.14.3_1 svgo (3.2.0) < 3.3.2 svt-av1 (2.0.0) < 2.1.2 homeport/tap/termshot (0.2.7) < 0.2.8 terraform-ls (0.27.0) < 0.34.2 terragrunt (0.39.1) < 0.64.2 texlab (5.16.1) < 5.19.0 tflint (0.35.0) < 0.52.0 tidy-viewer (1.4.30) < 1.5.2 tig (2.5.9) < 2.5.10 tmux (3.3a_2) < 3.4_1 tree (2.1.1_1) < 2.1.3 trurl (0.9) < 0.14 vim (9.1.0550) < 9.1.0600 saulpw/vd/visidata (2.8) < 3.0.2_1 wabt (1.0.29) < 1.0.35 wget (1.21.4) < 1.24.5 wimlib (1.14.1) < 1.14.4 yarn (1.22.19) < 1.22.22 youplot (0.4.5) < 0.4.6 yq (4.18.1) < 4.44.2 yt-dlp (2024.7.16) < 2024.7.25 aerospace (0.11.1-Beta) != 0.13.3-Beta alacritty (0.13.1) != 0.13.2 bespoke (1.2.0) != 1.2.1 calibre (6.24.0) != 7.15.0 chromedriver (115.0.5790.170) != 127.0.6533.72 eloston-chromium (115.0.5790.170-1.1,1691392844) != 127.0.6533.72-1.1 font-ibm-plex (6.4.0) != 6.4.1 font-iosevka (30.0.1) != 31.0.0 font-iosevka-slab (30.3.2) != 31.0.0 gzdoom (4.11.3) != 4.12.2 kitty (0.35.0) != 0.35.2 mactex (2023.0314) != 2024.0312 multi (3.0.0) != 3.0.1 pritunl (1.3.3600.11) != 1.3.3883.60 rar (6.23) != 7.01 retroarch-metal (1.16.0) != 1.19.1 sage (10.0,2.0.1) != 10.3,2.3.2 scidvsmac (4.22) != 4.25 tic80 (1.0.2164) != 1.1.2837 utm (4.3.5) != 4.5.3 ```
carlocab commented 1 month ago

Great, thanks. So I assume bat works now after having upgraded it?

llimllib commented 1 month ago

So I assume bat works now after having upgraded it?

correct, brew uninstall bat && brew install bat linked against the proper libgit2 and got me a working bat again

p-linnane commented 1 month ago

I largely prefer not to update stuff that works, so I have many outdated packages

Homebrew is a rolling release package manager, meaning we only support the latest versions of formulae. You should expect to encounter strange breakage if you do not regularly upgrade.

carlocab commented 1 month ago

Homebrew is a rolling release package manager, meaning we only support the latest versions of formulae. You should expect to encounter strange breakage if you do not regularly upgrade.

Yep, but that seems orthogonal to the original issue of brew knowing that it needed to upgrade bat and eza, attempting to start doing so, but never actually doing it.

llimllib commented 1 month ago

@p-linnane in this case:

surely that is a bug?

p-linnane commented 1 month ago

Yes, that is a bug. I'm just trying to provide you some additional information that may avoid future issues which are not bugs.

MikeMcQuaid commented 1 month ago

Yep, but that seems orthogonal to the original issue of brew knowing that it needed to upgrade bat and eza, attempting to start doing so, but never actually doing it.

Agreed that this is the issue here and we should fix it.