Code Monkey home page Code Monkey logo

Comments (1)

tunniclm avatar tunniclm commented on June 5, 2024

Ran a bunch of tests with @lroseblade and we discovered that the problem is specific to these circumstances:

  • a dependency has a generated .modulemap file (these are needed in the case where a C/C++ module is compiled as part of the build, as opposed to a module with a hand-written modulemap that refers to a system library.)
  • the package name of the project contains a space (ie the name property of the Package object in the `Package.swift file contains a space)

For example, we were able to recreate the issue by:

  • creating a directory named new test
  • entering the directory and using swift package init to generate a simple project
  • adding a dependency on Kitura-Net or omr-agentcore to the Package.swift -- both these packages contain modules with C/C++ source code.
  • running swift package generate-xcodeproj (this creates new test.xcodeproj)
  • opening the xcodeproj in XCode
  • hitting the play button to compile (this fails with an error related to the modulemap for CHTTPParser for Kitura-Net, or agentcore for omr-agentcore)

However, when we specified just CCurl as a dependency the build succeeded. The CCurl package contains a hand-written modulemap for a system installed library rather than having C/C++ source code (where the modulemap gets generated during the build) like the failing case.

In the XCode error we can see in the build output the value in an -fmodule-map-file option contains an unescaped space in the path to the generated module map. The directory name new test is correctly escaped but the name of the xcode project (new test.xcodeproj) directory is not.

As mentioned in the description, the failure only occurs when building in XCode. Building with swift build or even xcodebuild does not show a problem.

from generator-swiftserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.