-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Incremental] Dependency fixes in preparation for fine-grained dependencies #29009
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
[Incremental] Dependency fixes in preparation for fine-grained dependencies #29009
Conversation
7875e45
to
ea57166
Compare
Restructure fine-grained-dependencies to enable unit testing Get frontend to emit correct swiftdeps file (fine-grained when needed) and only emit dot file for -emit-fine-grained-dependency-sourcefile-dot-files Use deterministic order for more information outputs. Set EnableFineGrainedDependencies consistently in frontend. Tolerate errors that result in null getExtendedNominal() Fix memory issue by removing node everywhere. Break up print routine Be more verbose so it will compile on Linux. Sort batchable jobs, too.
ea57166
to
3126142
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
eeeb631
to
eb4ad14
Compare
@swift-ci please smoke test linux platform |
1 similar comment
@swift-ci please smoke test linux platform |
eb4ad14
to
41cbcfd
Compare
@swift-ci please smoke test linux platform |
@swift-ci please smoke test os x platform |
@swift-ci please test windows platform |
Reviewing this in two passes. First, nits and surface level stuff. |
include/swift/Driver/Action.h
Outdated
auto Inputs = getInputs(); | ||
const InputAction *IA = nullptr; | ||
for (auto const *I : Inputs) { | ||
if (auto const *S = dyn_cast<InputAction>(I)) { |
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.
Nit: The nesting here is pretty deep. This can be refactored into a straight-line loop.
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 not entirely sure how to fix it, without a compactMap
operation, but I have taken a stab at rewriting it for clarity.
lib/AST/FineGrainedDependencies.cpp
Outdated
// But, if an arc is added for this, then *any* change that causes | ||
// a same-named interface to be dirty will dirty this implementation, | ||
// even if that interface is in another file. | ||
// So, make the interface->implementation arc implicit. |
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 is an interesting design point. Can you expand on why this is for my edification?
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.
Yes, I've rewritten the comment to clarify the point. Thanks.
@@ -404,7 +438,8 @@ void ModuleDepGraph::emitDotFileForJob(DiagnosticEngine &diags, | |||
|
|||
void ModuleDepGraph::emitDotFile(DiagnosticEngine &diags, StringRef baseName) { | |||
unsigned seqNo = dotFileSequenceNumber[baseName]++; | |||
std::string fullName = baseName.str() + "." + std::to_string(seqNo) + ".dot"; | |||
std::string fullName = | |||
baseName.str() + "-post-integration." + std::to_string(seqNo) + ".dot"; |
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.
Is this debugging code?
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.
Not sure what you are asking for here. The dot file facility is for debugging and visualization, as I tried to comment at the method declarations. What would be clearer? (I'm not crazy about the fact that one has to go find the declaration in order to get the scoop on the definition, but I've been told that that's how it is in this world.) There is a single comment there for a group of declarations. Is that the problem? Seems redundant to repeat it, but that would help the option-click gesture.
Alright, first pass is through. Will come back to you with more detailed feedback later. |
Thank you very very much for such a quick review! I'll address these comments (and the test failures ASAP). |
@swift-ci please smoke test linux platform |
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.
No further comments.
@swift-ci please smoke test os x platform |
@CodaFi Thanks! |
@swift-ci please smoke test os x platform |
@davidungar @CodaFi: this broke the windows bots. The bots have been red for a while now: https://ci-external.swift.org/job/oss-swift-windows-x86_64/2398/ Please test the windows platform when making changes like this, there seems to be a pattern of the recent driver work breaking the Windows build. In the mean time, Im going to generate a revert for this change. |
-emit-fine-grained-dependency-source-file-dot-files
is specified