Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1856

qbs tries to detect Xcode spec base name based on first elem of qbs.targetOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 3.0.3
    • Toolchains: Xcode
    • None
    • macOS

      Hi!

       

      I noticed that after updating qbs I got following error:

      /Applications/Xcode.app/Contents/Developer/../SharedFrameworks/XCBuild.framework/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/undefined.xcspec: No such file or directory

       

      I tried to discover what's happened. The problem in specsBaseName function. It tries to detect xcspec names based on first elem of targetOS:

      function specsBaseName(version, targetOS) {
          const targetPlatform = targetOS[0];
          const oldSpecNames = {
              "macos": "MacOSX Architectures",
              "ios": "iOS Device",
              "ios-simulator": "iOS Simulator",
              "tvos": "tvOS Device",
              "tvos-simulator": "tvOS Simulator",
              "watchos": "watchOS Device",
              "watchos-simulator": "watchOS Simulator"
          };
      ... 

       

      But our profile containing following value:

      profiles.osx-arm64-clang.qbs.targetOS: ["osx", "macos", "darwin", "bsd", "unix"]

       

      I didn't found any info that targetOS property shouldn't be redefined or it first elem has to betargetPlatform.

       

      So think, you should change logic of detecting qbs xspec file to something like this:

      function specsBaseName(version, targetOS) {
          if (Utilities.versionCompare(version, "26") < 0) {
              if (targetOS.includes("macos")) return "MacOSX Architectures";
              if (targetOS.includes("ios")) return "iOS Device";
              if (targetOS.includes("ios-simulator")) return "iOS Simulator";
              if (targetOS.includes("tvos")) return "tvOS Device";
              ...
          } else {
              ...
          }
          // throw error;
      } 

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            arch Ivan Komissarov
            lo1ol Petr Mikhalitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes