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

Ubuntu 14.04 with upgraded clang requires swiftdoc file to import a module

    XMLWordPrintable

    Details

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

      swift-DEVELOPMENT-SNAPSHOT-2017-08-21-a-ubuntu14.04

      Description

      Importing a module without its swiftdoc fails on Ubuntu 14.04 if clang is updated using apt-get. This doesn't happen on macOS or Ubuntu 16.04. This is what I did:
       

      sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
      sudo apt-get update
      sudo apt-get install clang-3.8
      sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 380
      sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 380
      

      This works on all platform:

      touch hello.swift
      echo "import hello" > main.swift
      swiftc -module-name hello -emit-module -parse-as-library -c hello.swift
      swiftc -I. main.swift 
      

       
      This fails on Ubuntu 14.04 with clang from apt-get but works on Ubuntu 16.04/macOS:

      rm -rf hello.swiftdoc
      swiftc -I. main.swift 
      main.swift:1:8: error: no such module 'hello'
      import hello
             ^
      

       
      The Package Manager does not ship swiftdoc file for the PackageDescription module in the toolchain, should it start doing so? What about the existing toolchains?
       

      https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20170828/006111.html

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            aciid Ankit Aggarwal
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: