Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Overhaul Xcode/CLT config and doctor checks #14941

Closed
jacknagel opened this issue Sep 14, 2012 · 10 comments
Closed

Overhaul Xcode/CLT config and doctor checks #14941

jacknagel opened this issue Sep 14, 2012 · 10 comments
Labels

Comments

@jacknagel
Copy link
Contributor

Clearly this has become an annoyance for debugging things. Here are my suggestions:

  • Stop reporting the "guessed" Xcode version in --config for CLT-only systems. Xcode.version has to retain its current semantics for compatibility reasons, but this is an implementation detail that we don't need to expose to the user.
  • Distinguish between standalone CLT and Xcode CLT in --config output
  • Rework the doctor checks to avoid suggesting "reinstallng Xcode" on CLT-only systems when the CLT is outdated
@mistydemeo
Copy link
Member

Distinguish between standalone CLT and Xcode CLT in --config output

We should start tracking version numbers for both standalone CLT and Xcode CLT.

@jacknagel
Copy link
Contributor Author

Deconstructing a CLT version string,

CLT: 4.4.0.0.1.1249367152

at first glance the last component appears to be a timestamp, but...

[irb(main)]$ Time.at(1249367152)
 ====> Tue Aug 04 01:25:52 -0500 2009

and that last component can be seen in 4.3 and 4.4 versions of the CLT, so I'm lost.

I've tried to find listing of canonical CLT versions, but it doesn't seem to exist.

@jacknagel
Copy link
Contributor Author

Some early cleanups here: https://github.com/jacknagel/homebrew/compare/config

@jacknagel
Copy link
Contributor Author

Went through all the standalone CLT packages and extracted the "version" numbers of the DeveloperToolsCLI pkg:

Standalone CLT (DeveloperToolsCLI) version numbers

Xcode   Month       Version
4.5 September   4.5.0.0.1.1249367152
4.4 August      4.4.0.0.1.1249367152
4.4 July        4.4.0.0.1.1249367152
4.3 June        4.3.0.0.1.1249367152
4.3 Late March  4.3.0.0.1.1249367152
4.3 March       4.3.0.0.1.1249367152
4.3 February    1.0.0.9000000000.1.1249367152

So basically they are useless.

@jacknagel
Copy link
Contributor Author

Kinda want to delete every xcode/clt related doctor check and start over.

@jacknagel
Copy link
Contributor Author

Questions:

  • What do the version strings for CLT-from-Xcode ("DeveloperToolsCLILeo") look like these days?
  • How do we differentiate between e.g. July and August CLT when the version string is identical?

@MikeMcQuaid
Copy link
Member

My CLT-from-Xcode is:
package-id: com.apple.pkg.DeveloperToolsCLI
version: 4.5.0.0.1.1249367152

We could differentiate between them by using a hash of a particular file (or the file list or something)?

@jacknagel
Copy link
Contributor Author

Here's a patch that implements the first and part of the second of my initial suggestions:

https://github.com/jacknagel/homebrew/compare/config

In short, The "Xcode" line is omitted from --config output unless real Xcode is installed, which lets us easily distinguish between Xcode-only, CLT-only, and Xcode-and-CLT configurations.

jacknagel added a commit that referenced this issue Dec 13, 2012
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.

While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.

So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.

Addresses #14941, more or less.
@jacknagel
Copy link
Contributor Author

Pushed 2c1ad3c. I'd still like to rework the doctor checks to be less confusing, but I'm lacking the motivation to sort that out.

@samueljohn
Copy link
Contributor

Good work!

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Dec 15, 2012
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.

While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.

So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.

Addresses Homebrew#14941, more or less.
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.

While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.

So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.

Addresses Homebrew#14941, more or less.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants