title: Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler
body: <p>Short story: Xcode 10 is set to Swift 4, but it is using Swift 4.2.</p>
  
  <p>Long story: Our project is not ready for Swift 4.2, since our dependent frameworks are not Swift 4.2, yet. But, I would like to, at least, use Xcode 10.</p>
  
  <ul>
  <li>I have Xcode 9.4.1 and Xcode 10 installed.</li>
  <li>I have Command Line Tools set to use Xcode 9.4.1:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/0EX6Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0EX6Q.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>In Xcode 10, I have the project setting, Swift Language Version, set to
  Swift 4.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/JSayx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JSayx.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>I have verified on the command line the Swift version the shell is
  using is 4.1.2:</li>
  </ul>
  
  <blockquote>
    <p>"swift --version Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)"</p>
  </blockquote>
  
  <ul>
  <li>I've run carthage update. </li>
  <li>I've quit Xcode 10 and relaunched.</li>
  <li>I have deep cleaned and deleted Derived Data.</li>
  <li>I build and I get this error:</li>
  </ul>
  
  <blockquote>
    <p>"Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2
    compiler:
    .../App/Carthage/Build/iOS/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule"</p>
  </blockquote>
  
  <p>To me, this indicates that I have my intended Swift version (4.1.2) set correctly and Xcode is still trying to use the wrong version of Swift (4.2).</p>
  
  <p>Does anyone have suggestions on how to resolve this? Am I missing something? Xcode bug?</p>