-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Text interface dependency improvements #20425
Text interface dependency improvements #20425
Conversation
…ords from dependencies.
…or use in .d files.
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
@@ -72,6 +73,22 @@ extractSwiftInterfaceVersionAndArgs(DiagnosticEngine &Diags, | |||
return false; | |||
} | |||
|
|||
static bool |
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.
You could avoid the out-parameter with Optional<uint64_t>
, but I don't know if that's better.
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.
I'm pretty consistently doing this file with the "bool-as-error + out-params" style. I'd slightly prefer not to switch it all over to option-as-error, but will if you have a strong preference.
} | ||
|
||
static bool buildSwiftModuleFromSwiftInterface( | ||
clang::vfs::FileSystem &FS, DiagnosticEngine &Diags, | ||
CompilerInvocation &SubInvocation, StringRef InPath, StringRef OutPath) { | ||
CompilerInvocation &SubInvocation, StringRef InPath, StringRef OutPath, | ||
StringRef ModuleCachePath) { |
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.
Weird (auto-)indentation here.
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.
Just clang-format doing its thing.
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.
This looks more like an Xcode-ism.
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.
Emacs if anything! But it gets resolved in 40f30ce anyway.
@@ -188,6 +189,8 @@ swiftModuleIsUpToDate(clang::vfs::FileSystem &FS, | |||
return false; | |||
|
|||
for (auto In : AllDeps) { | |||
if (OuterTracker) | |||
OuterTracker->addDependency(In.Path, /*IsSystem=*/false); |
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.
I guess we ought to be tracking system-ness too.
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.
Yeah I meant to ask about that. The existing DependencyTracker can't provide this bit since it just forwards through to Clang's dependency tracker, which also provides no interface for it, and in fact doesn't even store it -- it's only an in-flight flag that controls whether or not a dependency gets added, but it's not recorded anywhere whether each dependency originated as a system or non-system entry. So I'd need to extend the interfaces and implementations of .. both? Seems a bit heavy. I'm not sure what else to do here.
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.
Hm. Let's file a bug to come back to it and think about it later.
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.
Ok: rdar://45957588
Build failed |
@swift-ci please test |
Build failed |
Build failed |
subsumed by #20458, closing. |
Continuation of #20355 (which is taking forever to merge due to CI issues, but whatever), covering the next few important steps with Dependencies. Start with 47e6e5a.