Skip to content

Support invoking the Fast Dependency Scanner: -scan-dependencies #97

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

Merged
merged 1 commit into from
May 14, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 13, 2020

Add support for the additional compiler mode added in: #28515.

@artemcm artemcm requested a review from DougGregor May 13, 2020 22:21
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Looking very good! A few minor requests.

@@ -87,6 +87,9 @@ public enum FileType: String, Hashable, CaseIterable, Codable {
/// Text-based dylib (TBD) file.
case tbd

/// JSON-based Module Dependency Scanner output
case JSONDependencies = "dependencies.json"
Copy link
Member

Choose a reason for hiding this comment

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

I hate to make this one of my few comments, but can you call this jsonDependencies? Values in Swift start with lowercase, including initialisms like this.

@@ -1586,6 +1586,16 @@ final class SwiftDriverTests: XCTestCase {
}
}

func testScanDependenciesOption() throws {
do {
var driver = try Driver(args: ["swiftc", "-scan-dependencies", "foo.swift"])
Copy link
Member

Choose a reason for hiding this comment

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

-scan-dependencies supports other kinds of outputs. Can you feed in arguments to ask it to produce a dependencies file (.d) and make sure that ends up on the resulting command line?

@DougGregor
Copy link
Member

@swift-ci please test

@artemcm artemcm force-pushed the NewDriverFastDependencyScanner branch from 3f6f2ac to d0cf201 Compare May 13, 2020 23:19
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Thanks!

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

@swift-ci test

@artemcm artemcm force-pushed the NewDriverFastDependencyScanner branch from d0cf201 to 9835e6d Compare May 14, 2020 00:49
@artemcm
Copy link
Contributor Author

artemcm commented May 14, 2020

Just needed a rebase.
@swift-ci test

@DougGregor
Copy link
Member

@swift-ci test

@DougGregor DougGregor merged commit 04cdb09 into swiftlang:master May 14, 2020
fengjixuchui referenced this pull request in fengjixuchui/swift-driver May 14, 2020
Merge pull request apple#97 from artemcm/NewDriverFastDependencyScanner
@artemcm artemcm deleted the NewDriverFastDependencyScanner branch January 20, 2021 19:00
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