-
Notifications
You must be signed in to change notification settings - Fork 243
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
xcversion doesn't properly handle Xcode versions that can't be run #435
Comments
Hey @grantjbutler 👋 Thank you for your report! I feel your frustration, especially since it caused so many undesired side effects outside of the installation of Xcode 12.5 😱 Would you say that a good way to fix this (from a user perspective) would be to simply halt the installation of Xcode if we detect the OS version doesn't support it? This sounds like a feasible and simple solution to me. Let me know your thoughts! |
Yeah, I think that'd be a good solution. Prevent me from installing it (though you might not know that it can't or shouldn't be installed until the version of Xocde has been downloaded and unarchived), and probably display some kind of informational message saying that this version is unsupported on the version of macOS the user is running. |
I agree! And I think we can skip/prevent the multiple-gigabyte download if the requirement for the Xcode version is simply hardcoded in the codebase. Although this might not scale, I don't see a way around it. I'm not even sure after the download, when attempting to install it, if there's any information/warning/error we can get (because, clearly, you were able to install it via CLI 🤷 ) |
There is Xcode Releases which has all its info in a publicly available JSON file, including the minimum required OS version for a version of Xcode. I'm not sure if that's the direction you all would want to go in, but it would give a way of checking whether the user could even run a version of Xcode before downloading it. |
Ahh that looks awesome! I didn't know about it. What do you think? |
@rogerluan In my opinion option c would be the most futureproof and can be automated. |
I can confirm that this is still an issue on 2.7.0 |
I would be very careful about deleting |
@thomasMinshull I guess this comes too late, but I was able to fix my machine just deleting |
System info:
I'm still running Catalina (macOS 10.15) on my laptop, and tried to install Xcode 12.5 (which requires Big Sur/macOS 11). xcode-install allowed the installation of Xcode 12.5, but of course I couldn't run it, so I proceeded to uninstall it. However, xcode-install didn't properly recognize 12.5 as being installed, as it somehow thought that 12.5 was 0.0. I was able to uninstall 12.5 by providing 0.0 to the uninstall command, but it's unclear why xcode-install had this mix up in the first place. I've attached the console output that shows this my process.
A side effect that I didn't realize at the time was that this bricks other installations of Xcode, as it installs versions of the CoreSimulator.framework that can only run on macOS 11. As a result, when launching any other version of Xcode, it tries to load that framework, but then it causes a crash due to it trying to load on the wrong version of Xcode. I was able to resolve this by deleting
/Library/Developer
and having a version of Xcode that can actually work on Catalina install its additional components (as well as reinstalling the command line tools which, I dunno if that's actually something that broke when installing Xcode 12.5, but was deleted when I deleted/Library/Developer
, so I had to reinstall it anyway).I realize I'm using an older version of xcode-install, but it doesn't look like this issue has been fixed in newer versions, based off of the release notes of the newer versions.
The text was updated successfully, but these errors were encountered: