swiftlang / swift-llbuild

A low-level build system, used by Xcode and the Swift Package Manager
Apache License 2.0
1.09k stars 199 forks source link

Provide more powerful `isResultValid` API #926

Closed jansvoboda11 closed 4 months ago

jansvoboda11 commented 4 months ago

External commands wishing to implement their own isResultValid() check are not given enough resources to check the output files and other things ExternalCommand::isResultValid() does by default. This makes it impossible to just add some extra checks on top of the default implementation.

This PR adds new C API and extends the ProducesCustomBuildValue protocol that allow clients to fall back to the default implementation.

owenv commented 4 months ago

This looks good to me. Can you bump LLBUILD_C_API_VERSION here too? https://github.com/swiftlang/swift-llbuild/blob/988e85f00c68f89a4996c3aa1afd756a4065b8b1/products/libllbuild/include/llbuild/llbuild-defines.h#L123

dmbryson commented 4 months ago

Agreed, looks good if we bump that version.

jansvoboda11 commented 4 months ago

@swift-ci please test

jansvoboda11 commented 4 months ago

@swift-ci please smoke test

jansvoboda11 commented 4 months ago

@swift-ci please smoke test

jansvoboda11 commented 4 months ago

@swift-ci please test