Uploaded image for project: 'Swift'
  1. Swift
  2. SR-9669

XCTest module can't be imported during compilation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
      None

      Description

      I did a checkout of master branch of swift repo the proceeded to check dependencies:

      $> ./utils/update-checkout --clone
      $>./utils/build-script --release --debug-swift
      

      and compilation would break with following error:

      /usr/local/swift/compiler/swift/stdlib/public/Darwin/XCTest/XCTest.swift:13:19: error: no such module 'XCTest'
       @_exported import XCTest // Clang module
      

      Workarounds:

      Jordan Rose suggested in this forum post to check the following

      $> xcode-select -p
       /Library/Developer/CommandLineTools
      

      and then :

      Okay. Can one of you file a bug? And then the workaround I'd suggest would be deleting the CMakeCache.txt files out of your build directory, and then running build-script again with the DEVELOPER_DIR environment variable set to /Applications/Xcode.app (or wherever your Xcode 10.1 lives).

      but doing:

      $> xcode-select -s /Applications/Xcode.app/Contents/Developer
      

      before re-running build script would as well fix the issue.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vguerra Victor Guerra
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: