-
Notifications
You must be signed in to change notification settings - Fork 192
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
Create discovered dependencies file for emit-module jobs #1056
Create discovered dependencies file for emit-module jobs #1056
Conversation
Emit-module jobs might have different discovered dependencies and run in a different context where they need to get invalidated separately from the compile jobs. With the new key "emit-module-dependencies" in the output file map the build system can specify that it expects a makefile-style dependency file at the given path. rdar://91574616
@swift-ci please test |
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 great, thanks!
I think something is wrong with this pull, as I've been seeing a bunch of
but when translated to the
which causes all those files to be dumped in the top level of the package, rather than in Update: I can reproduce with the just-released Apr. 20 trunk snapshot for Ubuntu too, with the same workaround making it go away, implying the bug is definitely in this repo. |
@buttaface thanks for identifying the change. I’ve been seeing this on Windows as well. |
Provide a fallback default for the `emit-module.d` file. It has been observed on Windows and Android that builds subsequent to swiftlang#1056 would emit files into the root of the source tree (specifically, `pwd`). If there is no explicit location specified for the new output, and given that there is no primary output associated with the command, the path that defaults is simply a singular file name component, emitting that file into the location that the driver was executed from (which comes out to the root of the package for commandline invocations), dirtying the source tree. Rather than sinking the knowledge for the default into `existingOutputForSingleInput`, where we have no access to the module name, emit the logic inline and derive a name based on the Swift module and place it as a peer. This should help ensure that the serialized diagnostics do not end up committed accidentally.
Provide a fallback default for the `emit-module.d` file. It has been observed on Windows and Android that builds subsequent to swiftlang#1056 would emit files into the root of the source tree (specifically, `pwd`). If there is no explicit location specified for the new output, and given that there is no primary output associated with the command, the path that defaults is simply a singular file name component, emitting that file into the location that the driver was executed from (which comes out to the root of the package for commandline invocations), dirtying the source tree. Rather than sinking the knowledge for the default into `existingOutputForSingleInput`, where we have no access to the module name, emit the logic inline and derive a name based on the Swift module and place it as a peer. This should help ensure that the serialized diagnostics do not end up committed accidentally.
Provide a fallback default for the `emit-module.d` file. It has been observed on Windows and Android that builds subsequent to swiftlang#1056 would emit files into the root of the source tree (specifically, `pwd`). If there is no explicit location specified for the new output, and given that there is no primary output associated with the command, the path that defaults is simply a singular file name component, emitting that file into the location that the driver was executed from (which comes out to the root of the package for commandline invocations), dirtying the source tree. Rather than sinking the knowledge for the default into `existingOutputForSingleInput`, where we have no access to the module name, emit the logic inline and derive a name based on the Swift module and place it as a peer. This should help ensure that the serialized diagnostics do not end up committed accidentally.
Emit-module jobs might have different discovered dependencies and run in a different context where they need to get invalidated separately from the compile jobs.
With the new key "emit-module-dependencies" in the output file map the build system can specify that it expects a makefile-style dependency file at the given path.
rdar://91574616