问题描述 / Description
tap 过 chenbstack/glint 的用户,每次 brew update 都会看到:
Warning: Calling string comparison format for `depends_on macos:` is deprecated! Use `depends_on macos: :sonoma` instead.
Please report this issue to the chenbstack/homebrew-glint tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
/opt/homebrew/Library/Taps/chenbstack/homebrew-glint/Casks/glint.rb:21
原因是 Homebrew 已经废弃了 depends_on macos: 的字符串比较写法。裸符号本身就表示「该版本或更高」,所以改成 depends_on macos: :sonoma 可以保持现在 Sonoma+ 的最低版本要求,同时去掉警告。目前只是 warning,不影响安装和使用,但 Homebrew 后续会把它变成硬错误。
如何复现 / Steps to reproduce
brew tap chenbstack/glint
brew update
- 输出里出现上面的警告
环境 / Environment
- tap cask: glint 0.1.27
- Homebrew 6.0.16
- macOS 27.0 (Apple Silicon)
修复 / Fix
Casks/glint.rb:21 一行改动,PR 已经提在 tap 仓库:chenbstack/homebrew-glint#1
- depends_on macos: ">= :sonoma"
+ depends_on macos: :sonoma
brew style Casks/glint.rb 验证过:
- 改之前:
Casks/glint.rb:21:21: C: [Correctable] Homebrew/OSDependsOn: Use depends_on macos: :sonoma.
- 改之后:这条 offence 消失
另外确认了 release.yml 里 bump tap 那步只 sed 替换 version 和 sha256 两行,所以这个改动不会被后续发版覆盖。
在主仓库同步一下,方便你注意到。
问题描述 / Description
tap 过
chenbstack/glint的用户,每次brew update都会看到:原因是 Homebrew 已经废弃了
depends_on macos:的字符串比较写法。裸符号本身就表示「该版本或更高」,所以改成depends_on macos: :sonoma可以保持现在 Sonoma+ 的最低版本要求,同时去掉警告。目前只是 warning,不影响安装和使用,但 Homebrew 后续会把它变成硬错误。如何复现 / Steps to reproduce
brew tap chenbstack/glintbrew update环境 / Environment
修复 / Fix
Casks/glint.rb:21一行改动,PR 已经提在 tap 仓库:chenbstack/homebrew-glint#1brew style Casks/glint.rb验证过:Casks/glint.rb:21:21: C: [Correctable] Homebrew/OSDependsOn: Use depends_on macos: :sonoma.另外确认了
release.yml里 bump tap 那步只sed替换version和sha256两行,所以这个改动不会被后续发版覆盖。在主仓库同步一下,方便你注意到。