-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SR-2855] Show inputs mismatch in -driver-show-incremental #5340
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-2855] Show inputs mismatch in -driver-show-incremental #5340
Conversation
inputArgs.insert(inputPair.second->getValue()); | ||
} | ||
|
||
llvm::StringSet<> missingInputs; |
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.
Please use a SmallVector for this, so that the results come out deterministically!
llvm::StringSet<> missingInputs; | ||
for (auto &previousInput : previousInputs) { | ||
auto previousInputArg = previousInput.getKey(); | ||
if(inputArgs.find(previousInputArg) == inputArgs.end()) { |
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.
Nitpick: missing space after 'if'.
<< "in the current compilation.\n" | ||
<< "\tInputs not included in this compilation:"; | ||
for (auto &missing : missingInputs) { | ||
llvm::outs() << " " << missing.getKey(); |
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.
Most of the time these are going to be absolute paths, so I suggest putting them on their own lines.
c5cbcb9
to
336d1bc
Compare
@swift-ci please test |
// CHECK-INCREMENTAL: Queuing main.swift (initial) | ||
|
||
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-INPUTS-MISMATCH %s | ||
// CHECK-INPUTS-MISMATCH: Incremental compilation has been disabled |
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 think it's important to include enough of the message to say why it was disabled, since you're adding several of these messages.
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.
To be clear, I'm worried about the test matching a case where it's disabled for some other reason.
Build failed |
SR-2855 suggests `-driver-show-incremental` not only print information about why certain files are included in incremental compilation, but also print out why incremental compilation may be disabled altogether. Add a message for one such reason: when the inputs passed to the Swift compiler don't match the ones used previously.
336d1bc
to
c2002ea
Compare
@swift-ci please smoke test |
@swift-ci please smoke test os x platform |
SR-2855 suggests
-driver-show-incremental
not only print information about why certain files are included in incremental compilation, but also print out why incremental compilation may be disabled altogether.Add a message for one such reason: when the inputs passed to the Swift compiler don't match the ones used previously.
This addresses one part of SR-2855.