<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="">We currently have a built-in dependency edge on the Swift compiler which is supposed to catch this (we don't have one on just the standard libraries, but it doesn't seem like that was getting hit here?).<div class=""><br class=""></div><div class="">It looks like that didn't work here? Can you file a bug with as much info as you have?</div><div class=""><br class=""></div><div class="">I don't remember the details, but shouldn't we be getting all the .swiftmodules as dependencies reported by the compiler?</div><div class=""><br class=""></div><div class="">&nbsp;- Daniel</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 1, 2016, at 9:40 AM, Jordan Rose via swift-build-dev &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, swift-build-dev. I recently hit&nbsp;<a href="https://ci.swift.org/job/swift-PR-Linux-smoke-test/2159/" class="">this failure</a>&nbsp;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.&nbsp;<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="">&nbsp; &nbsp; &nbsp; &nbsp;^</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>&nbsp;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></div>_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-build-dev<br class=""></div></blockquote></div><br class=""></div></body></html>