Skip to content

[Parsable Output] Break down batch compile jobs into constituent messages #572

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 6 commits into from
Mar 29, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Mar 26, 2021

We have, historically, treated batch mode as an implementation detail of the compiler. As a consequence, we have been lying to clients of parsable-output by emitting multiple began, finished, signalled messages for each batch job - one message per primary input. The time has come to teach swift-driver to tell the same old lies.

Emulating existing C++ driver behavior:
- Cargo-cult the concept of a quasiPID
(https://github.com/apple/swift/blob/main/include/swift/Basic/ParseableOutput.h#L36)
- Break up one compile job with multiple primaries into multiple [Began|Finished|Signalled]Message messages
- Collect ((job, primaryInput) -> quasiPID) information to generate correct Finished messages
- Fixup individual command lines of each Began message (w.r.t. -o and -primary-input options)
- Make InputOutputMap a part of a .compile Job's state so that we can later query which of its many outputs correspond to a specific primary

Resolves rdar://75636235

artemcm added 4 commits March 25, 2021 16:57
…primaries

Emulating existing C++ driver behavior.
- Introduce the concept of a quasiPID, same as in the C++ driver
- Break up one job into multiple BeganMessage messages
- Fixup individual command lines of each message (w.r.t. `-o` and `-primary-input` options)
- Collect ((job, primaryInput) -> quasiPID) information to generate correct `Finished` messages
…vidual batch job primaries

Emulating existing C++ driver behavior.
- Break up one job into multiple FinishedMessage/SignalledMessage messages
…command line for all constituent messages

This will make it easier to debug the compiler by taking build command line commands from the build log.
@artemcm
Copy link
Contributor Author

artemcm commented Mar 26, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Mar 26, 2021

@swift-ci please test

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Mar 29, 2021

@swift-ci please test

@artemcm artemcm merged commit 2f2a3f8 into swiftlang:main Mar 29, 2021
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