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

SPM: module.modulemap file does not support including headers in parent folder

    XMLWordPrintable

    Details

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

      Description

      Given the following folder structure, Package.swift, and module.modulemap, my package contains no symbols when added to a project via Xcode:

      // swift-tools-version:5.0
      import PackageDescription
      
      let package = Package(
          name: "TBAlertController",
          platforms: [
              .iOS(.v8)
          ],
          products: [
              .library(name: "TBAlertController", targets: ["TBAlertController"])
          ],
          targets: [
              .target(
                  name: "TBAlertController",
                  path: "Classes"
              )
          ]
      )
      
      .
      ├── Classes/
      │   ├── TBAlertAction.h
      │   ├── TBAlertAction.m
      │   ├── TBAlertController.h
      │   ├── TBAlertController.m
      │   └── include/
      │       └── module.modulemap
      ├── Package.swift
      └── TBAlertController.podspec
      
      module TBAlertController [library] {
        header "../TBAlertController.h"
        header "../TBAlertAction.h"
        export *
      }
      

      The package in question can be found here: https://github.com/NSExceptional/TBAlertController

      I don't actually know if this is a bug or not, but I was unable to find much more documentation on the topic than this, and my question on the Forums did not receive much attention.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tannerbennett Tanner Bennett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: