<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, swift-build-dev. I recently hit <a href="https://ci.swift.org/job/swift-PR-Linux-smoke-test/2159/" class="">this failure</a> on a pull request test that did nothing but change Swift’s test/lit.cfg—i.e. a test-configuration-only change in the compiler repo. <div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test@2/branch-master/swiftpm/Sources/swift-test/main.swift:11:8: error: module file was created by an older version of the compiler; rebuild 'Commands' and try again: /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test@2/branch-master/buildbot_linux/swiftpm-linux-x86_64/debug/Commands.swiftmodule</div><br class="Apple-interchange-newline"><div class="">import Commands</div><div class=""> ^</div></blockquote><br class="Apple-interchange-newline">(and so on for Basic and TestSupport. Note that this was in the self-host stage of the CI build.)</div><div class=""><br class=""></div><div class="">This kind of failure implies that the compiler and standard library were rebuilt but the support modules of SwiftPM were not, which in turn seems like a missing dependency to me. Yes, a clean build will fix this, and yes, I’m not sure it matters to end users (who aren’t replacing their compiler and standard library arbitrarily), but it seems like there’s an easy answer here: add Swift.swiftmodule as a build dependency for this build. (Since it builds pretty quickly, maybe that’s just used to clean the build folder.) That way, you’ll always be up-to-date on the module format and the contents of the standard library.</div><div class=""><br class=""></div><div class="">There’s still a dependency trap here: if the only thing that changed was the Darwin or Glibc overlay, SwiftPM might not think it needs to rebuild. The actual correct answer is that your build depends on <i class="">all</i> swiftmodules you use. (And if static linking, all static archives as well, which may not always change in sync with the swiftmodule.)</div><div class=""><br class=""></div><div class="">What do you want to do here, SwiftPM folks?</div><div class=""><br class=""></div><div class="">Jordan</div></body></html>