- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33
Open
Description
Currently it provides pure support if a file has a compile errors in a module
I ran xcode like
export SOURCEKIT_LOGGING=3 && /Applications/Xcode.app/Contents/MacOS/Xcode
to investigate the compile flags sending to sourcekitd and found interesting flag that is sending to sourcekitd which are not set when you are building the app
-experimental-allow-module-with-compiler-errors
-detailed-preprocessing-record
It would be good if xcode-build-server append this flag by default so completion experience would be like in Xcode.
Here is a full log from Xcode sourcekitd of flags:
 key.compilerargs: [
    "-vfsoverlay",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/index-overlay.yaml",
    "-module-name",
    "Test_ios",
    "-Onone",
    "-enforce-exclusivity=checked",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/ContentView.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Test_iosApp.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NewFile.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NextSubfolder/SubSubFile.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NextSubfolder/Better.swift",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources/GeneratedAssetSymbols.swift",
    "-DDEBUG",
    "-enable-bare-slash-regex",
    "-enable-experimental-feature",
    "DebugDescriptionMacro",
    "-sdk",
    "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk",
    "-target",
    "arm64-apple-ios17.2-simulator",
    "-g",
    "-module-cache-path",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/ModuleCache.noindex",
    "-Xfrontend",
    "-serialize-debugging-options",
    "-enable-testing",
    "-Xcc",
    "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG",
    "-swift-version",
    "5",
    "-I",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Products/Debug-iphonesimulator",
    "-F",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Products/Debug-iphonesimulator",
    "-Xfrontend",
    "-experimental-allow-module-with-compiler-errors",
    "-Xfrontend",
    "-empty-abi-descriptor",
    "-Xcc",
    "-fretain-comments-from-system-headers",
    "-Xcc",
    "-Xclang",
    "-Xcc",
    "-detailed-preprocessing-record",
    "-Xcc",
    "-Xclang",
    "-Xcc",
    "-fmodule-format=raw",
    "-Xcc",
    "-Xclang",
    "-Xcc",
    "-fallow-pch-with-compiler-errors",
    "-Xcc",
    "-Xclang",
    "-Xcc",
    "-fallow-pcm-with-compiler-errors",
    "-Xcc",
    "-Wno-non-modular-include-in-framework-module",
    "-Xcc",
    "-Wno-incomplete-umbrella",
    "-Xcc",
    "-fmodules-validate-system-headers",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/swift-overrides.hmap",
    "-Xcc",
    "-iquote",
    "-Xcc",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-generated-files.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-own-target-headers.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-all-target-headers.hmap",
    "-Xcc",
    "-iquote",
    "-Xcc",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-project-headers.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Products/Debug-iphonesimulator/include",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources-normal/arm64",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources/arm64",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources",
    "-Xcc",
    "-DDEBUG=1",
    "-working-directory",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios"
  ],
and here is from with xcode-build-server
ey.compilerargs: [
    "-module-name",
    "Test_ios",
    "-Onone",
    "-enforce-exclusivity=checked",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/ContentView.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Test_iosApp.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NewFile.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NextSubfolder/SubSubFile.swift",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios/Test_ios/Subfolder/NextSubfolder/Better.swift",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources/GeneratedAssetSymbols.swift",
    "-DDEBUG",
    "-enable-bare-slash-regex",
    "-enable-experimental-feature",
    "DebugDescriptionMacro",
    "-sdk",
    "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk",
    "-target",
    "arm64-apple-ios17.2-simulator",
    "-g",
    "-module-cache-path",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/ModuleCache.noindex",
    "-Xfrontend",
    "-serialize-debugging-options",
    "-profile-coverage-mapping",
    "-profile-generate",
    "-enable-testing",
    "-index-store-path",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Index.noindex/DataStore",
    "-enable-experimental-feature",
    "OpaqueTypeErasure",
    "-Xcc",
    "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG",
    "-swift-version",
    "5",
    "-I",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Products/Debug-iphonesimulator",
    "-F",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Products/Debug-iphonesimulator",
    "-c",
    "-j10",
    "-enable-batch-mode",
    "-incremental",
    "-Xcc",
    "-ivfsstatcache",
    "-Xcc",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache",
    "-output-file-map",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Objects-normal/arm64/Test_ios-OutputFileMap.json",
    "-save-temps",
    "-no-color-diagnostics",
    "-serialize-diagnostics",
    "-emit-dependencies",
    "-emit-module",
    "-emit-module-path",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Objects-normal/arm64/Test_ios.swiftmodule",
    "-validate-clang-modules-once",
    "-clang-build-session-file",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/swift-overrides.hmap",
    "-emit-const-values",
    "-Xfrontend",
    "-const-gather-protocols-file",
    "-Xfrontend",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Objects-normal/arm64/Test_ios_const_extract_protocols.json",
    "-Xcc",
    "-iquote",
    "-Xcc",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-generated-files.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-own-target-headers.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-all-target-headers.hmap",
    "-Xcc",
    "-iquote",
    "-Xcc",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Test_ios-project-headers.hmap",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Products/Debug-iphonesimulator/include",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources-normal/arm64",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources/arm64",
    "-Xcc",
    "-I/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/DerivedSources",
    "-Xcc",
    "-DDEBUG=1",
    "-emit-objc-header",
    "-emit-objc-header-path",
    "/Users/Ievgenii_Mykhalevskyi/Library/Developer/Xcode/DerivedData/Test_ios-caxuiboehwkaurgzvolmbidupwvv/Build/Intermediates.noindex/Test_ios.build/Debug-iphonesimulator/Test_ios.build/Objects-normal/arm64/Test_ios-Swift.h",
    "-working-directory",
    "/Users/Ievgenii_Mykhalevskyi/tests/Test_ios",
    "-experimental-emit-module-separately",
    "-disable-cmo"
  ]
}
Metadata
Metadata
Assignees
Labels
No labels