-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Batch Mode] Add frontend check to ensure that all primaries are present in the supplementary output filemap. #15433
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
[Batch Mode] Add frontend check to ensure that all primaries are present in the supplementary output filemap. #15433
Conversation
@swift-ci please smoke test |
@@ -136,6 +136,9 @@ ERROR(error_underlying_module_not_found,none, | |||
ERROR(error_unable_to_load_supplementary_output_file_map, none, | |||
"unable to load supplementary output file map '%0': %1", (StringRef, StringRef)) | |||
|
|||
ERROR(error_missing_entry_in_supplementary_output_file_map, none, | |||
"the supplementary output file map '%0' is missing an entry for '%1' (this likely indicates a compiler issue; please file a bug report)", (StringRef, StringRef)) |
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: no "the". (You can see a writeup I did about diagnostic phrasing in docs/Diagnostics.md.)
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.
Fixed.
/// or not there are any supplementary outputs. If any are missing, something | ||
/// has gone wrong. | ||
/// Diagnose the missing entries. | ||
/// The diagnostics will stop the compilation. |
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: paragraph breaks mean something in Doxygen (they separate the summary from the full description), but only if you do two of them. If you don't want that, please don't wrap before the end of the line.
I also don't think it's worth mentioning that the diagnostics will stop compilation. That's not something ArgsToFrontendOutputsConverter needs to think about.
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.
The whole comment is gone, now.
bool SupplementaryOutputPathsComputer::diagnoseMissingEntries( | ||
const OutputFileMap &OFM, const StringRef supplementaryFileMapPath) const { | ||
bool hadError = false; | ||
(void)InputsAndOutputs.forEachInputProducingSupplementaryOutput( |
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'd rather have this be part of the existing loop. It's one thing to do lookups that might fail, but it's another thing to repeat existing lookups just to keep two bits of code separate.
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.
Sure! Folded in.
|
||
|
||
|
||
|
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.
Any reason for all these newlines?
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.
Fixed.
@swift-ci please smoke test |
Ah, you forgot to push. |
87da786
to
bebb009
Compare
@swift-ci please smoke test |
Oops! Sorry. Now, I've pushed. |
…pplementary output filemap.
bebb009
to
3376ca7
Compare
@swift-ci please smoke test |
…pplementary output filemap.
If the supplementary output file map does not get transmitted correctly from the driver into the frontend, one symptom can be that not all primary inputs are represented when the frontend parses the map. This PR adds a check for that condition to the compiler.