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
Improved Command Lines Tool update instructions #11396
Conversation
Added link to Apple's page with minimum requirements
Library/Homebrew/os/mac/xcode.rb
Outdated
#{Formatter.url("https://developer.apple.com/download/more/")}. | ||
#{Formatter.url("https://developer.apple.com/download/more/")} | ||
after checking the latest available version for your system on: | ||
#{Formatter.url("https://developer.apple.com/support/xcode/#minimum-requirements")}. |
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.
We know these versions so we could perhaps just tell people the versions instead?
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.
see latest_version
or minimum_version
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.
Are they the same as the XCode versions, or can the version numbers be different across the two? I assumed they are disconnected, since apparently I had the latest XCode but not the latest CLT version installed.
I only see the latest human-readable version as XCode.latest_version since CLT.version seems to use different version numbers (and there's a comment about how "different ways of installing the CLTs lead to different version numbers" in the code)
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.
The versions differ, right. @Bo98 any thoughts here (as you've been thinking about this recently)
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.
Actually, I'm not sure anymore whether there is a problem in practice.
The goal of the message is to let the user know which version is the latest supported CLT version on their OS, so it only has to match the version that is found on Apple's website, right? Which seems consistent with the latest XCode's version for the same system.
I'm not sure why my tools were outdated while my XCode was not, and how I had installed them last time. However, the latest CLT on Apple's website is still 11.3.1 - same as latest XCode for Mojave - and that's what I downloaded and installed to fix the problem today.
So maybe it does make sense to indicate XCode's version to the user, not just to check for it to determine whether the tools are up-to-date?
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.
So maybe it does make sense to indicate XCode's version to the user, not just to check for it to determine whether the tools are up-to-date?
Yes, this makes sense to me 👍🏻 MacOS::Xcode.latest_version
will get this version for you.
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.
alright, if the wording is ok (not a native speaker) this should be it
Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @gattilorenz! |
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.
Thanks again, @gattilorenz! (I've triggered a rerun of the tests and this will auto-merge when those are complete)
Actually, something's really wrong with the CI runs here so I'm going to close and reopen and hopefully that will resolve it 😅 |
Added link to Apple's page with latest version of XCode for each macOS release to the message that suggest downloading latest version.
Test fails on my machine but it's only a string in the XCode file, and Ruby's syntax checker doesn't complain about it - the failing test is
rspec ./test/cmd/--version_spec.rb:7 # brew --version prints the Homebrew's version
so completely unrelated.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?