-
-
Notifications
You must be signed in to change notification settings - Fork 11k
airfil: use os_version #204987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
airfil: use os_version #204987
Conversation
Since all of these are in a livecheck block, maybe we can just hardcode the macOS version? The problem is that there is no CC @samford and @nandahkrishna for ideas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we wouldn't have the livecheck
URL be anything that evaluates differently on different hardware – we want livecheck
to return consistent results no matter where it is run, and it should return the latest version of the software (accounting for any throttling, I guess). So in that sense, I guess it might make sense to hardcode the macOS version or rely on a URL that doesn't use this information wherever possible.
On the other hand, if the Linux and macOS version numbers are themselves different, I imagine we'd have to make a lot more changes to livecheck
itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it would be ideal for livecheck
blocks to be consistent regardless of environment but unfortunately I don't think that's feasible (I have some in-progress work to add OS/arch simulation to livecheck but that's a different story). Besides these macOS-dependent checks, we have livecheck
blocks where the url
/regex
interpolates arch
and I think that's reasonable.
What we don't want here is for a non-macOS version to be used in place of a macOS version if the check is executed in a non-macOS environment (e.g., a Linux version on Linux), so os_version
may not be an appropriate substitution here. [The other issue is that os_version
uses MacOS.full_version
but some of these instances use MacOS.version
, so we would need something like os_version&.major
for those.]
With that in mind, one alternative may be to keep the existing livecheck
blocks but move them into an on_mac
block in these cases where the url
/regex
/etc. depend on the macOS version. That would ensure the livecheck
block is only available in an appropriate context (aligning with use of macOS on_os blocks). Does that work as expected on Linux?
I haven't tested casks on Linux but I imagine we may also run into issues when required values like version
, url
, etc. are only defined in macOS on_os blocks.
For what it's worth, we specifically replaced hardcoded macOS versions with MacOS
methods because no one was manually keeping them up to date (where necessary) and some eventually stopped returning new versions (i.e., only returning an old version that's suitable for the old macOS version, not the newest version of the software). The other reason is that it allows us to have one livecheck
block that works for multiple macOS versions. If we hardcode the value, we would have to copy the livecheck
block into each of the on_os blocks and that would increase the maintenance burden.
That might be possible. Really the main problem right now is that a |
Let's reopen this when we're ready, since we're just accumulating conflicts. |
Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.
In the following questions
<cask>
is the token of the cask you're submitting.After making any changes to a cask, existing or new, verify:
brew audit --cask --online <cask>
is error-free.brew style --fix <cask>
reports no offenses.Additionally, if adding a new cask:
brew audit --cask --new <cask>
worked successfully.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask>
worked successfully.brew uninstall --cask <cask>
worked successfully.This should make all these casks readable on linux, which means we can run readall on linux after