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

Private C modules

    XMLWordPrintable

    Details

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

      swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a

      Description

      I have a library, let's call it Foo.

      As an implementation detail, Foo calls down to a C library. Following the SwiftPM guidance, I have a CFoo.modulemap that tells where to get the headers, and what to link, and so on. And I pass -I path/to/CFoo.modulemap so that the Swift compiler gets that information.

      Foo builds successfully, the tests pass, everything works.

      Now I want to use Foo from another program. But when I import Foo I get the error
      error: missing required module 'CFoo'.

      But I don't want to import CFoo from callers, because CFoo should be a hidden implementation detail.

      How do I kill this error? Have I architected something wrong?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jrose Jordan Rose
                Reporter:
                drewcrawford Drew Crawford
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: