-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SourceKit] Remove dependency of SwiftLang on Core #3101
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] Remove dependency of SwiftLang on Core #3101
Conversation
@swift-ci please test |
@akyrtzi @benlangmuir @nkcsgexi Could you review, please? |
5781426
to
6370242
Compare
I'd suggest a simpler way to break the cycle, which would result in much fewer changes. -Change the -Introduce
|
@akyrtzi oh nice, yeah that sounds like a great solution! I'll update the PR a bit later accordingly. |
6370242
to
4f4004d
Compare
@swift-ci please test |
Ok, I've pushed a simplified version now based on @akyrtzi's suggestion. Note that I opted to keep the new |
4f4004d
to
d74c8ff
Compare
@swift-ci please test |
class LangSupport; | ||
class Context; | ||
|
||
std::unique_ptr<LangSupport> createSwiftLangSupport(Context &SKCtx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Headers should generally include the headers that they depend on, in this case it should get a #include <memory>
(because of std::unique_ptr
)
LGTM, with only a couple of nitpicks, thank you! |
d74c8ff
to
fac7440
Compare
@swift-ci Please test and merge |
What's in this pull request?
SourceKit's
SwiftLang
(SwiftLangSupport
class) andCore
(Context
class) libraries currently depend on each other. At @jrose-apple's suggestion, I have broken this coupling by requiringSwiftLangSupport
to be injected intoContext
.See also: #3080
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.