Skip to content

Conversation

@plemarquand
Copy link
Contributor

The swift package show-dependencies and swift package describe commands run on extension activation, and several extension features are gated behind their results. These were run with execSwift calls which show no progress in the VS Code UI.

The swift package show-dependencies command specifically could kick off a package resolution if the dependencies are missing, and for large packages this could take quite some time. As a result the extension could look like it was not activating.

Move these two commands into VS Code tasks that report their status in the progress bar, and let the user see the actual commands being run in the terminal.

Tasks

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

The `swift package show-dependencies` and `swift package describe`
commands run on extension activation, and several extension features
are gated behind their results. These were run with `execSwift` calls
which show no progress in the VS Code UI.

The `swift package show-dependencies` command specifically could kick
off a package resolution if the dependencies are missing, and for large
packages this could take quite some time. As a result the extension
could look like it was not activating.

Move these two commands into VS Code tasks that report their status in
the progress bar, and let the user see the actual commands being run
in the terminal.
@plemarquand plemarquand force-pushed the show-dep-startup-progress-3 branch from ec0c8ae to e9388ef Compare January 6, 2026 19:41
.catch(error => error)
.then(async error => {
if (error) {
void vscode.window.showErrorMessage(
Copy link
Member

@matthewbastien matthewbastien Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is there any more information we can give the user or, more importantly, some action that they can perform to resolve the issue? I'd imagine that most of these issues are a result of errors with the Package.swift. We could add a button to bring them to that file.

I know that this is the same error message we had before. So, I've got no problem with having this done in another PR (or just raising an issue for it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a good idea to add a button to take you to your Package.swift, but I'm not 100% sure that the errors presented here will always be able to be resolved by fixing something in that file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an ideal world SPM would have some way of letting VS Code know what the error was (like an exit code or something with common issues) and then we could show a better error, but yeah I agree that it won't always be something that can be fixed in the Package.swift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants