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

Products API doesn't work for C Modules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Package Manager
    • Labels:
      None

      Description

      When trying to create a custom .dylib product through Products API for C modules, swift build fails with error:

      warning: No module FooCLib found for product CustomProduct
      warning: No module BarCLib found for product CustomProduct
      error: noModules("FooBarProduct")
      

      Contents of Package.swift file:

      import PackageDescription
      
      let package = Package(
          name: "TestSPM",
          targets: [
              Target(name: "FooCLib"),
              Target(name: "BarCLib"),
          ]
      )
      
      let dylib = Product(name: "FooBarProduct", type: .Library(.Dynamic), modules: "FooCLib", "BarCLib")
      products.append(dylib)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bhargavg Bhargav Gurlanka
              Reporter:
              bhargavg Bhargav Gurlanka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: