fix(cask): use bare symbol for depends_on macos to silence Homebrew 6 deprecation - #16
Open
UreMySunshine wants to merge 1 commit into
Open
Conversation
Homebrew 6 deprecates the string comparison format, warning on every `brew install`/`brew update`: Warning: Calling string comparison format for `depends_on macos:` is deprecated! Use `depends_on macos: :catalina` instead. Since Homebrew 5.1.11 (commit "Align cask macOS dependencies"), the cask DSL parses `depends_on macos:` with a ">=" comparator, so a bare symbol means "Catalina or newer" rather than "Catalina only". Verified on Homebrew 6.0.20 / macOS 26: comparator=">=", version=10.15, satisfied. This reverts the workaround in 498bb3a, which was needed only under the older "==" semantics. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
安装或更新后,Homebrew 每次都输出废弃警告:
来源是
.github/workflows/release.yml生成 cask 时写的depends_on macos: ">= :catalina"。Homebrew 6 在MacOSRequirement.parse中对字符串比较格式调用odeprecated,后续版本会从废弃变为禁用。为什么现在可以用裸符号
498bb3a 当初改用字符串形式,是因为裸符号曾被解析为
==(只允许 Catalina),会拦下 macOS 26 的安装。Homebrew 5.1.11 起(提交
0e87cc8941 Align cask macOS dependencies),cask DSL 以MacOSRequirement.parse(args, comparator: ">=")解析该字段,裸符号即表示最低版本。在 Homebrew 6.0.20 / macOS 26 上实测:
语义与
">= :catalina"一致,同时与 app 的LSMinimumSystemVersion 10.15保持一致。影响范围
改动只影响下次发版生成的 cask。tap 仓库
HduSy/homebrew-tokenscope中现有的Casks/tokenscope.rb(v1.0.5)仍是旧写法,警告会持续到下次发版,或需在 tap 仓库单独改一次。使用 Homebrew 早于 5.1.11 版本的用户,裸符号仍会被解析为
==而拦下安装。考虑到 Homebrew 6 已发布且字符串形式即将禁用,此处采用裸符号。🤖 Generated with Claude Code