Skip to content
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

[SR-15679] SourceKit-LSP: Adding platform requirement in Package.swift is not propagated #506

Closed
adam-fowler opened this issue Jan 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@adam-fowler
Copy link
Contributor

Previous ID SR-15679
Radar rdar://91230538
Original Reporter @adam-fowler
Type Bug
Status Reopened
Resolution
Environment

swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)

Target: x86_64-apple-macosx12.0

Additional Detail from JIRA
Votes 0
Component/s SourceKit-LSP
Labels Bug
Assignee None
Priority Medium

md5: 89724567877c11a1c46009ed4a119296

duplicates:

  • SR-15633 SourceKit-LSP: New files are not registered and changes to Package.swift are not reflected

Issue Description:

If I add an asynchronous function to a package SourceKit-LSP complains that concurrency is only available in macOS 10.15 or newer as it should. If I then go to my Package.swift and add a platform requirement eg

platforms: [.macOS(.v10_15)],

SourceKit-LSP stills continues to display the error, until I restart the sourcekit-lsp server.

Platform requirements in the Package.swift should be propagated as soon as the Package.swift is saved, not after restarting the server.

@benlangmuir
Copy link
Member

This is the same underlying issue as SR-15633. We are not updating the compiler arguments we get from SwiftPM after changes to the package (adding/removing/renaming files, or editing Package.swift).

@adam-fowler
Copy link
Contributor Author

I'm re-opening this as SR-15633 has been fixed but this hasn't

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@ahoppen
Copy link
Collaborator

ahoppen commented Apr 27, 2022

This turned out to be the same underlying issue as #508, which was fixed in #471.

@ahoppen ahoppen closed this as completed Apr 27, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants