Repository navigation
Fix installed and active state not refreshing after install, select, and uninstall. - #886
Open
jrlanglois wants to merge 1 commit into
Open
jrlanglois wants to merge 1 commit into
jrlanglois wants to merge 1 commit into
Conversation
…and uninstall Problem The Xcode list is rebuilt from a cached list of installed Xcodes whenever the active Xcode or the available list changes. Three actions didn't keep that cache up to date: * "Install" updated its own row but not the cache, so making the new Xcode active afterwards showed it as not installed, and nothing showed as active. * "Make Active" didn't rescan either, so after the "rename to Xcode.app" option moved bundles, the list still pointed at the old paths. * "Uninstall" rescanned only after the list was rebuilt, so the removed Xcode briefly showed as installed again. Fixes XcodesOrg#836. Solution All three now rescan the install directory first, so the list matches what's on disk. Two new tests in `AppStateTests`: one makes a newly installed Xcode active and checks it shows as installed and active; the other checks that uninstall never shows the removed Xcode as installed again. Both fail without this change. `xcodebuild test -scheme Xcodes` (the CI command) passes on Xcode 27.2: 53 tests, 0 failures.
This branch has not been deployed
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.
Note
Fixes #836.
Problem
The Xcode list is rebuilt from a cached list of installed Xcodes whenever the active Xcode or the available list changes.
Three actions didn't keep that cache up to date:
Solution
All three now rescan the install directory first, so the list matches what's on disk.
Two new tests in
AppStateTests:Both fail without this change.
xcodebuild test -scheme Xcodes(the CI command) passes on Xcode 27.2: 53 tests, 0 failures.