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
SourceKit-LSP overwriting results of swift package update
#707
Comments
rdar://105173375 |
ahoppen
added a commit
to ahoppen/sourcekit-lsp
that referenced
this issue
Jul 7, 2023
`SwiftPMWorkspace.reloadPackage` called `loadPackageGraph`, which causes package resolution and could thus update `Package.resolved`. This caused race conditions when `swift package update` was run from terminal while sourcekit-lsp is running since sourcekit-lsp was notified about the file changes and thus reloaded the pacakge to get build settings for the modified files. Set `forceResolvedVersions` to only resolve packages based on the versions in `Package.resolved`, eliminating this problem. Fixes apple#707 rdar://105173375
ahoppen
added a commit
to ahoppen/sourcekit-lsp
that referenced
this issue
Jul 7, 2023
`SwiftPMWorkspace.reloadPackage` called `loadPackageGraph`, which causes package resolution and could thus update `Package.resolved`. This caused race conditions when `swift package update` was run from terminal while sourcekit-lsp is running since sourcekit-lsp was notified about the file changes and thus reloaded the pacakge to get build settings for the modified files. Set `forceResolvedVersions` to only resolve packages based on the versions in `Package.resolved`, eliminating this problem. Fixes apple#707 rdar://105173375
ahoppen
added a commit
to ahoppen/sourcekit-lsp
that referenced
this issue
Jul 7, 2023
`SwiftPMWorkspace.reloadPackage` called `loadPackageGraph`, which causes package resolution and could thus update `Package.resolved`. This caused race conditions when `swift package update` was run from terminal while sourcekit-lsp is running since sourcekit-lsp was notified about the file changes and thus reloaded the pacakge to get build settings for the modified files. Set `forceResolvedVersions` to only resolve packages based on the versions in `Package.resolved`, eliminating this problem. Fixes apple#707 rdar://105173375
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I run a
swift package update
on a project that has SourceKit-LSP running on it. The results of the update are overwritten by SourceKit-LSP.If I have a dependency on a package
from: 1.0.0
and I currently have version1.0.1
but a1.0.2
has been released when I runswift package update
I would expect it to update to using version1.0.2
. It appears when SourceKit-LSP is running the version updates to1.0.2
and then is reverted back to1.0.1
.This is with swift 5.7 and running inside VSCode.
The text was updated successfully, but these errors were encountered: