Skip to content

Remove the reload extension dialog#2196

Open
matthewbastien wants to merge 9 commits into
swiftlang:mainfrom
matthewbastien:no-reloading
Open

Remove the reload extension dialog#2196
matthewbastien wants to merge 9 commits into
swiftlang:mainfrom
matthewbastien:no-reloading

Conversation

@matthewbastien
Copy link
Copy Markdown
Member

@matthewbastien matthewbastien commented Apr 16, 2026

Description

Instead of forcing the user to reload the extension when toolchain changes are detected, the Swift extension will now automatically reload the FolderContext or WorkspaceContext in these cases. The extension can detect changes to:

  • The global swiftly toolchain by polling swiftly use -g.
  • Per-folder swiftly toolchains by watching for changes to .swift-version files.
  • Xcode toolchains by polling /var/select/developer_dir.

Each of these will only force a reload if the active toolchain is managed by either swiftly or xcrun.

I've added an onDidChangeWorkspaceContext event to the SwiftExtensionApi that can be used to detect when the WorkspaceContext has been reloaded. For updates to the FolderContext toolchain I reused the FolderOperation.swiftVersionUpdated event that we added a while back, but didn't do anything with.

This PR builds on top of the work in #1932.

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@matthewbastien matthewbastien added full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit labels Apr 16, 2026
@matthewbastien matthewbastien force-pushed the no-reloading branch 4 times, most recently from 39b6526 to f4c95fc Compare April 21, 2026 19:22
@matthewbastien matthewbastien force-pushed the no-reloading branch 3 times, most recently from c17a38b to e680379 Compare May 5, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant