diff --git a/.gitignore b/.gitignore index 0023a53..dc89ea5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ DerivedData/ .swiftpm/configuration/registries.json .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata .netrc +.scala-build/ +.metals/ +.bsp/ diff --git a/BUILD.bazel b/BUILD.bazel index edeb6a5..8a547d6 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,8 @@ load("@rules_swift//swift:swift.bzl", "swift_binary") +# Public so the root //:xcodeproj ("forge") can aggregate these targets. +package(default_visibility = ["//visibility:public"]) + # One swift_binary per SwiftPM executableTarget in Package.swift. # (No external dependencies, so no deps to track.) @@ -55,3 +58,42 @@ swift_binary( "Sources/LeetCode/main.swift", ], ) + +# BEGIN GENERATED XCODEPROJ +load("@rules_xcodeproj//xcodeproj:defs.bzl", "top_level_target", "xcodeproj") + +filegroup( + name = "xcodeproj_extra_files", + srcs = glob( + ["**/*"], + exclude = [ + "BUILD.bazel", + "BUILD", + "**/*.xcodeproj/**", + "**/.*", + "**/.*/**", + ], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) + +xcodeproj( + name = "xcodeproj", + project_name = "m323", + tags = ["manual"], + extra_files = [":xcodeproj_extra_files"], + top_level_targets = [ + "//m323:01_MapUebungen", + "//m323:02_FilterUebungen", + "//m323:03_MapUndFilterUebungen", + "//m323:04_FoldLeftUebungen", + "//m323:05_FlatMapUebungen", + "//m323:06_ForComprehensionsUebungen", + "//m323:Aufgabe3", + "//m323:LeetCode", + "//m323:WeDontLikeCharA", + "//m323:m323", + ], +) +# END GENERATED XCODEPROJ diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.pbxproj b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.pbxproj new file mode 100755 index 0000000..21a558b --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.pbxproj @@ -0,0 +1,354 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 60; + objects = { + FF0100000000000000000004 /* Generate Bazel Dependencies */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Generate Bazel Dependencies"; + outputFileListPaths = ( + "$(INTERNAL_DIR)/generated.xcfilelist", + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$BAZEL_INTEGRATION_DIR/generate_bazel_dependencies.sh\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000005 /* Create swift_debug_settings.py */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BAZEL_INTEGRATION_DIR)/$(CONFIGURATION)-swift_debug_settings.py", + ); + name = "Create swift_debug_settings.py"; + outputPaths = ( + "$(OBJROOT)/$(CONFIGURATION)/swift_debug_settings.py", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "perl -pe '\n # Replace \"__BAZEL_XCODE_DEVELOPER_DIR__\" with \"$(DEVELOPER_DIR)\"\n s/__BAZEL_XCODE_DEVELOPER_DIR__/\\$(DEVELOPER_DIR)/g;\n\n # Replace \"__BAZEL_XCODE_SDKROOT__\" with \"$(SDKROOT)\"\n s/__BAZEL_XCODE_SDKROOT__/\\$(SDKROOT)/g;\n\n # Replace build settings with their values\n s/\n \\$ # Match a dollar sign\n (\\()? # Optionally match an opening parenthesis and capture it\n ([a-zA-Z_]\\w*) # Match a variable name and capture it\n (?(1)\\)) # If an opening parenthesis was captured, match a closing parenthesis\n /$ENV{$2}/gx; # Replace the entire matched string with the value of the corresponding environment variable\n\n' \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BAZEL_PACKAGE_BIN_DIR = rules_xcodeproj; + CALCULATE_OUTPUT_GROUPS_SCRIPT = "$(BAZEL_INTEGRATION_DIR)/calculate_output_groups.py"; + CC = ""; + CXX = ""; + INDEXING_SUPPORTED_PLATFORMS__ = "$(INDEXING_SUPPORTED_PLATFORMS__NO)"; + INDEXING_SUPPORTED_PLATFORMS__NO = macosx; + INDEXING_SUPPORTED_PLATFORMS__YES = macosx; + INDEX_DISABLE_SCRIPT_EXECUTION = YES; + LD = ""; + LDPLUSPLUS = ""; + LIBTOOL = libtool; + SUPPORTED_PLATFORMS = "$(INDEXING_SUPPORTED_PLATFORMS__$(INDEX_ENABLE_BUILD_ARENA))"; + SUPPORTS_MACCATALYST = YES; + SWIFT_EXEC = swiftc; + TAPI_EXEC = ""; + TARGET_IDS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe5/xcodeproj/xcodeproj_target_ids"; + TARGET_NAME = BazelDependencies; + }; + name = Debug; + }; + FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0100000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0100000000000000000001 /* BazelDependencies */ = { + isa = PBXAggregateTarget; + buildConfigurationList = FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */; + buildPhases = ( + FF0100000000000000000004 /* Generate Bazel Dependencies */, + FF0100000000000000000005 /* Create swift_debug_settings.py */, + ); + dependencies = ( + ); + name = BazelDependencies; + productName = BazelDependencies; + }; + FF0000000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO; + BAZEL_CONFIG = rules_xcodeproj; + BAZEL_EXTERNAL = "$(BAZEL_OUTPUT_BASE)/external"; + BAZEL_INTEGRATION_DIR = "$(INTERNAL_DIR)/bazel"; + BAZEL_LLDB_INIT = "$(PROJECT_FILE_PATH)/rules_xcodeproj/bazel.lldbinit"; + BAZEL_OUT = "$(PROJECT_DIR)/bazel-out"; + BAZEL_OUTPUT_BASE = "$(_BAZEL_OUTPUT_BASE:standardizepath)"; + BAZEL_WORKSPACE_ROOT = "$(SRCROOT)"; + BUILD_DIR = "$(SYMROOT)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + BUILD_MARKER_FILE = "$(OBJROOT)/build_marker"; + BUILD_WORKSPACE_DIRECTORY = "$(SRCROOT)"; + CC = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_MODULES_AUTOLINK = NO; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGN_STYLE = Manual; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(BAZEL_PACKAGE_BIN_DIR)"; + COPY_PHASE_STRIP = NO; + CXX = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + DEBUG_INFORMATION_FORMAT = dwarf; + DSTROOT = "$(PROJECT_TEMP_DIR)"; + ENABLE_DEBUG_DYLIB = NO; + ENABLE_DEFAULT_SEARCH_PATHS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_OPTIMIZATION_LEVEL = 0; + IMPORT_INDEX_BUILD_INDEXSTORES = YES; + INDEXING_PROJECT_DIR__ = "$(INDEXING_PROJECT_DIR__NO)"; + INDEXING_PROJECT_DIR__NO = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + INDEXING_PROJECT_DIR__YES = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/indexbuild_output_base/execroot/_main; + INDEX_DATA_STORE_DIR = "$(INDEX_DATA_STORE_DIR)"; + INDEX_FORCE_SCRIPT_EXECUTION = YES; + INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_index_import/index-import"; + INSTALL_PATH = "$(BAZEL_PACKAGE_BIN_DIR)/$(TARGET_NAME)/bin"; + INTERNAL_DIR = "$(PROJECT_FILE_PATH)/rules_xcodeproj"; + LD = "$(BAZEL_INTEGRATION_DIR)/ld"; + LDPLUSPLUS = "$(BAZEL_INTEGRATION_DIR)/ld"; + LD_DYLIB_INSTALL_NAME = ""; + LD_OBJC_ABI_VERSION = ""; + LD_RUNPATH_SEARCH_PATHS = ""; + LEGACY_INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_legacy_index_import/index-import"; + LIBTOOL = "$(BAZEL_INTEGRATION_DIR)/libtool"; + ONLY_ACTIVE_ARCH = YES; + PROJECT_DIR = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + RESOLVED_REPOSITORIES = "\".\" \"/Users/cediackermann/Projects\""; + RULES_XCODEPROJ_BUILD_MODE = bazel; + SRCROOT = /Users/cediackermann/Projects; + SUPPORTS_MACCATALYST = NO; + SWIFT_EXEC = "$(BAZEL_INTEGRATION_DIR)/swiftc"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_USE_INTEGRATED_DRIVER = NO; + SWIFT_VERSION = 5.0; + TAPI_EXEC = /usr/bin/true; + TARGET_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(BAZEL_PACKAGE_BIN_DIR)/$(COMPILE_TARGET_NAME)"; + USE_HEADERMAP = NO; + VALIDATE_WORKSPACE = NO; + _BAZEL_OUTPUT_BASE = "$(PROJECT_DIR)/../.."; + }; + name = Debug; + }; + FF0000000000000000000002 /* Build configuration list for PBXProject */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0000000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0000000000000000000001 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = FF0000000000000000000002 /* Build configuration list for PBXProject */; + compatibilityVersion = "Xcode 15.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + mainGroup = FF0000000000000000000003 /* /Users/cediackermann/Projects */; + productRefGroup = FF0000000000000000000004 /* Products */; + projectDirPath = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + projectRoot = ""; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 9999; + LastUpgradeCheck = 9999; + TargetAttributes = { + FF0100000000000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 000013B02A91000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + }; + }; + knownRegions = ( + en, + Base, + ); + targets = ( + FF0100000000000000000001 /* BazelDependencies */, + 000013B02A91000000000001 /* Aufgabe5 */, + ); + }; + 000013B02A91000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 000013B02A91000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 000013B02A91000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00FFD562061D9B444674FDE9 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 000013B02A91000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323/Sources/Aufgabe5"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe5/Aufgabe5_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = Aufgabe5_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe5"; + BAZEL_TARGET_ID = "@@//m323/Sources/Aufgabe5:Aufgabe5 darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = Aufgabe5; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe5/Aufgabe5.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe5/Aufgabe5_objs/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_Sources_Aufgabe5_Aufgabe5_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_Sources_Aufgabe5_Aufgabe5; + PRODUCT_NAME = Aufgabe5; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = Aufgabe5; + }; + name = Debug; + }; + 000013B02A91000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe5" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 000013B02A91000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 000013B02A910000000000FF /* Aufgabe5 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Aufgabe5; sourceTree = BUILT_PRODUCTS_DIR; }; + 000013B02A91000000000001 /* Aufgabe5 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 000013B02A91000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe5" */; + buildPhases = ( + 000013B02A91000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 000013B02A91000000000005 /* Create Link Dependencies */, + 000013B02A91000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 000213B02A91FF0001000000 /* PBXTargetDependency */, + ); + name = Aufgabe5; + productName = Aufgabe5; + productReference = 000013B02A910000000000FF /* Aufgabe5 */; + productType = "com.apple.product-type.tool"; + }; + 000113B02A91FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 000213B02A91FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 000113B02A91FF0001000000 /* PBXContainerItemProxy */; + }; + FF0000000000000000000003 /* /Users/cediackermann/Projects */ = { + isa = PBXGroup; + children = ( + FE0B6A8C2E81F8461958AA13 /* m323 */, + FF0000000000000000000004 /* Products */, + FF0000000000000000000005 /* Frameworks */, + ); + path = /Users/cediackermann/Projects; + sourceTree = ""; + }; + FE0B6A8C2E81F8461958AA13 /* m323 */ = { + isa = PBXGroup; + children = ( + FE33D36F2BFBBE20D6696EBB /* Sources */, + ); + path = m323; + sourceTree = ""; + }; + FE33D36F2BFBBE20D6696EBB /* Sources */ = { + isa = PBXGroup; + children = ( + FE48BFC7F1F245E05F51C00A /* Aufgabe5 */, + ); + path = Sources; + sourceTree = ""; + }; + FE48BFC7F1F245E05F51C00A /* Aufgabe5 */ = { + isa = PBXGroup; + children = ( + FE92A788A8507CE3BA059C07 /* BUILD.bazel */, + FEDE40009AB4363F7C997327 /* main.swift */, + ); + path = Aufgabe5; + sourceTree = ""; + }; + FE92A788A8507CE3BA059C07 /* BUILD.bazel */ = {isa = PBXFileReference; explicitFileType = text.script.python; path = BUILD.bazel; sourceTree = ""; }; + FEDE40009AB4363F7C997327 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + 00FFD562061D9B444674FDE9 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDE40009AB4363F7C997327 /* main.swift */; }; + FF0000000000000000000004 /* Products */ = { + isa = PBXGroup; + children = ( + 000013B02A910000000000FF /* Aufgabe5 */, + ); + name = Products; + sourceTree = ""; + }; + FF0000000000000000000005 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + }; + rootObject = FF0000000000000000000001 /* Project object */; +} diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..08de0be --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py new file mode 100755 index 0000000..7b7b80e --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py @@ -0,0 +1,106 @@ +#!/usr/bin/python3 + +"""An lldb module that registers a stop hook to set swift settings.""" + +import lldb +import re + +# Order matters, it needs to be from the most nested to the least +_BUNDLE_EXTENSIONS = [ + ".framework", + ".xctest", + ".appex", + ".bundle", + ".app", +] + +_TRIPLE_MATCH = re.compile(r"([^-]+-[^-]+)(-\D+)[^-]*(-.*)?") + +_SETTINGS = { + "arm64-apple-macosx Aufgabe5": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, +} + +def __lldb_init_module(debugger, _internal_dict): + # Register the stop hook when this module is loaded in lldb + ci = debugger.GetCommandInterpreter() + res = lldb.SBCommandReturnObject() + ci.HandleCommand( + "target stop-hook add -P swift_debug_settings.StopHook", + res, + ) + if not res.Succeeded(): + print(f"""\ +Failed to register Swift debug options stop hook: + +{res.GetError()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""") + return + +def _get_relative_executable_path(module): + for extension in _BUNDLE_EXTENSIONS: + prefix, _, suffix = module.rpartition(extension) + if prefix: + return prefix.split("/")[-1] + extension + suffix + return module.split("/")[-1] + +class StopHook: + "An lldb stop hook class, that sets swift settings for the current module." + + def __init__(self, _target, _extra_args, _internal_dict): + pass + + def handle_stop(self, exe_ctx, _stream): + "Method that is called when the user stops in lldb." + module = exe_ctx.frame.module + if not module: + return + + module_name = module.file.GetDirectory() + "/" + module.file.GetFilename() + versionless_triple = _TRIPLE_MATCH.sub(r"\1\2\3", module.GetTriple()) + executable_path = _get_relative_executable_path(module_name) + key = f"{versionless_triple} {executable_path}" + + settings = _SETTINGS.get(key) + + if settings: + frameworks = " ".join([ + f'"{path}"' + for path in settings.get("f", []) + ]) + if frameworks: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-framework-search-paths {frameworks}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-framework-search-paths", + ) + + includes = " ".join([ + f'"{path}"' + for path in settings.get("s", []) + ]) + if includes: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-module-search-paths {includes}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-module-search-paths", + ) + + clang = settings.get("c") + if clang: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-extra-clang-flags '{clang}'", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-extra-clang-flags", + ) + + return True diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist new file mode 100644 index 0000000..8e6e093 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*.xctest diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist new file mode 100644 index 0000000..c0aeba8 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.appex/Contents/Frameworks/libclang_rt.asan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Contents/Frameworks/libXCTestBundleInject.dylib +/*.appex/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Contents/Frameworks/Testing.framework, +/*.appex/Contents/Frameworks/XCTAutomationSupport.framework +/*.appex/Contents/Frameworks/XCTest.framework +/*.appex/Contents/Frameworks/XCTestCore.framework +/*.appex/Contents/Frameworks/XCTestSupport.framework +/*.appex/Contents/Frameworks/XCUIAutomation.framework +/*.appex/Contents/Frameworks/XCUnit.framework +/*.appex/Frameworks/libclang_rt.asan*.dylib +/*.appex/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Frameworks/libXCTestBundleInject.dylib +/*.appex/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Frameworks/Testing.framework, +/*.appex/Frameworks/XCTAutomationSupport.framework +/*.appex/Frameworks/XCTest.framework +/*.appex/Frameworks/XCTestCore.framework +/*.appex/Frameworks/XCTestSupport.framework +/*.appex/Frameworks/XCUIAutomation.framework +/*.appex/Frameworks/XCUnit.framework +/*.appex/PlugIns/*.xctest diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh new file mode 100755 index 0000000..0045587 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh @@ -0,0 +1,209 @@ +# It is assumed that this file is `source`ed from another script, with the following variable set: +# +# - BAZEL_CONFIG +# - BAZEL_INTEGRATION_DIR +# - BAZEL_OUT +# - DEVELOPER_DIR +# - GENERATOR_LABEL +# - HOME +# - INTERNAL_DIR +# - OBJROOT +# - RULES_XCODEPROJ_BUILD_MODE +# - SRCROOT +# - TERM +# - USER +# - XCODE_PRODUCT_BUILD_VERSION +# - (optional) build_pre_config_flags +# - config +# - (optional) labels +# - output_groups +# - (optional) target_ids + +output_groups_flag="--output_groups=$(IFS=, ; echo "${output_groups[*]}")" +readonly output_groups_flag + +# Set `output_base` + +# In `runner.sh` the generator has the build output base set inside of the outer +# bazel's output path (`bazel-out/`). So here we need to make our output base +# changes relative to that changed path. +readonly build_output_base="$BAZEL_OUTPUT_BASE" + +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" +]]; then + # We use a different output base for Index Build to prevent normal builds and + # indexing waiting on bazel locks from the other. We nest it inside of the + # normal output base directory so that it's not cleaned up when running + # `bazel clean`, but is when running `bazel clean --expunge`. This matches + # Xcode behavior of not cleaning the Index Build outputs by default. + readonly output_base="${build_output_base%/*}/indexbuild_output_base" + readonly workspace_name="${PROJECT_DIR##*/}" + readonly output_path="$output_base/execroot/$workspace_name/bazel-out" + + # Use current path for "bazel-out/" and "external/" + # This fixes Index Build to use its version of generated and external files + readonly vfs_overlay_roots="{\"external-contents\": \"$output_path\",\"name\": \"$BAZEL_OUT\",\"type\": \"directory-remap\"},{\"external-contents\": \"$output_base/external\",\"name\": \"$BAZEL_EXTERNAL\",\"type\": \"directory-remap\"}" +else + readonly output_base="$build_output_base" + readonly output_path="$BAZEL_OUT" + readonly vfs_overlay_roots="" +fi + +# Set `bazel_cmd` for calling `bazel` + +bazelrcs=( + --noworkspace_rc + "--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj.bazelrc" +) +if [[ -s ".bazelrc" ]]; then + bazelrcs+=("--bazelrc=.bazelrc") +fi +if [[ -s "$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc" ]]; then + bazelrcs+=("--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc") +fi +readonly bazelrcs + +readonly allowed_vars=( + "BUILD_WORKSPACE_DIRECTORY" + "DEVELOPER_DIR" + "HOME" + "HTTP_PROXY" + "http_proxy" + "HTTPS_PROXY" + "https_proxy" + "NO_PROXY" + "no_proxy" + "SSH_AUTH_SOCK" + "TERM" + "USER" +) +passthrough_env=() +for var in "${allowed_vars[@]}"; do + if [[ -n "${!var:-}" ]]; then + passthrough_env+=("$var=${!var}") + fi +done + +source "$BAZEL_INTEGRATION_DIR/bazel_env.sh" + +bazel_cmd=( + env -i + "${passthrough_env[@]}" + "${envs[@]}" + "/Users/cediackermann/Projects/tools/bazel" + + # Restart bazel server if `DEVELOPER_DIR` changes to clear `developerDirCache` + "--host_jvm_args=-Xdock:name=$DEVELOPER_DIR" + + "${bazelrcs[@]}" + + --output_base "$output_base" +) +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" != "YES" +]]; then + # Allow normal builds to cancel Index Builds + bazel_cmd+=("--preemptible") +fi +readonly bazel_cmd + +readonly base_pre_config_flags=( + # Be explicit about our desired Xcode version + "--xcode_version=$XCODE_PRODUCT_BUILD_VERSION" + + # Set `DEVELOPER_DIR` in case a bazel wrapper filters it + "--repo_env=DEVELOPER_DIR=$DEVELOPER_DIR" + + # Work around https://github.com/bazelbuild/bazel/issues/8902 + # `USE_CLANG_CL` is only used on Windows, we set it here to cause Bazel to + # re-evaluate the cc_toolchain for a different Xcode version + "--repo_env=USE_CLANG_CL=$XCODE_PRODUCT_BUILD_VERSION" + "--repo_env=XCODE_VERSION=$XCODE_PRODUCT_BUILD_VERSION" + + # Don't block the end of the build for BES upload (artifacts OR events) + "--bes_upload_mode=NOWAIT_FOR_UPLOAD_COMPLETE" +) + + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + # Create VFS overlay + cat > "$OBJROOT/bazel-out-overlay.yaml" <&1 + +# Verify that we actually built what we requested + +if [[ -n "${target_ids:-}" ]]; then + if [[ ! -s "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe5/xcodeproj/xcodeproj_target_ids" ]]; then + echo "error: \"$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe5/xcodeproj/xcodeproj_target_ids\" was not created. This can happen if" \ +"you apply build-affecting flags to \"rules_xcodeproj_generator\" config, or" \ +"with the \"--@rules_xcodeproj//xcodeproj:extra_generator_flags\" flag." \ +"Please ensure that all build-affecting flags are moved to the" \ +"\"rules_xcodeproj\" config or" \ +"\"--@rules_xcodeproj//xcodeproj:extra_common_flags\" flag. If you are still" \ +"getting this error after adjusting your setup and regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi + + # We need to sort the inputs for `comm` to work on macOS 15.4+ + diff_output=$( + comm -23 \ + <(printf '%s\n' "${target_ids[@]}" | sort) \ + <(sort "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe5/xcodeproj/xcodeproj_target_ids") + ) + + if [ -n "$diff_output" ]; then + missing_target_ids=("${diff_output[@]}") + echo "error: There were some target IDs that weren't known to Bazel" \ +"(e.g. \"${missing_target_ids[0]}\"). Please regenerate the project to fix" \ +"this. If you are still getting this error after regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi +fi diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh new file mode 100755 index 0000000..a85cb66 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh @@ -0,0 +1,7 @@ +# Generated by rules_xcodeproj. Do not edit. +envs=( + LANG=en_US.UTF-8 + PATH=/bin:/usr/bin + BAZELISK_SKIP_WRAPPER=true + BAZEL_REAL=/Users/cediackermann/Library/Caches/bazelisk/downloads/sha256/2db883718453f0437a7bcb408e889dbf8539cdc4d61c8ebc3807a1a88d02ff08/bin/bazel +) diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py new file mode 100755 index 0000000..8fa40b2 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py @@ -0,0 +1,435 @@ +#!/usr/bin/python3 + +import datetime +import glob +import json +import os +import sys +import time +import traceback + +# Ordered the same as we order platforms in the generated Xcode project, except +# macOS is last +_DEVICE_PLATFORMS = { + "iphoneos": None, + "appletvos": None, + "watchos": None, + "macosx": None, +} +_SIMULATOR_PLATFORMS = { + "iphonesimulator": None, + "appletvsimulator": None, + "watchsimulator": None, + "macosx": None, +} + + +def _wait_for_value(calculate_value, value_name): + wait_counter = 0 + while True: + value = calculate_value() + if value: + break + if wait_counter == 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"note: ({now}) {value_name} not updated yet, waiting...", + file = sys.stderr, + flush = True, + ) + if wait_counter == 10: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +warning: ({now}) {value_name} still not updated after 10 seconds. If happens \ +frequently, or the cache is never created, please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + flush = True, + ) + time.sleep(1) + wait_counter += 1 + if wait_counter > 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +note: ({now}) {value_name} updated after {wait_counter} seconds.""", + file = sys.stderr, + flush = True, + ) + return value + + +def _get_build_request( + xcode_version, + objroot, + build_request_min_ctime): + if xcode_version < 1430: + # Before Xcode 14.3 + def wait_for_description(): + build_description_cache = max( + glob.iglob( + f"{objroot}/XCBuildData/BuildDescriptionCacheIndex-*", + ), + key = os.path.getctime, + ) + if (os.path.getctime(build_description_cache) >= + build_request_min_ctime): + return build_description_cache + return None + + build_description_cache = ( + _wait_for_value(wait_for_description, "BuildDescriptionCacheIndex") + ) + with open(build_description_cache, 'rb') as f: + f.seek(-32, os.SEEK_END) + build_request_id = f.read().decode('ASCII') + + build_request_file = ( + f"{objroot}/XCBuildData/{build_request_id}-buildRequest.json" + ) + def wait_for_build_request_file(): + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + return None + + return _wait_for_value( + wait_for_build_request_file, + f"\"{build_request_file}\"", + ) + + def wait_for_build_request(): + try: + xcbuilddata = max( + glob.iglob(f"{objroot}/XCBuildData/*.xcbuilddata"), + key = os.path.getctime, + ) + if os.path.getctime(xcbuilddata) < build_request_min_ctime: + return None + except (ValueError, FileNotFoundError, OSError): + # ValueError: no .xcbuilddata files yet (empty glob) + # FileNotFoundError/OSError: TOCTOU race - file deleted between glob and getctime + return None + build_request_file = f"{xcbuilddata}/build-request.json" + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + return None + + return _wait_for_value( + wait_for_build_request, + "newest 'buildRequest.json' file", + ) + + +def _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids): + # Xcode gets "stuck" in the `buildFiles` or `build` command for + # top-level targets, so we can't reliably change commands here. Leaving + # the code in place in case this is fixed in the future, or we want to + # do something similar in an XCBBuildService proxy. + # + # command = ( + # build_request.get("_buildCommand2", {}).get("command", "build") + # ) + command = "build" + parameters = build_request["parameters"] + platform = ( + parameters["activeRunDestination"]["platform"] + ) + configuration_name = parameters["configurationName"] + + labels_and_target_ids = [] + for target in build_request["configuredTargets"]: + label = guid_labels.get(target["guid"]) + if not label: + # `BazelDependency` and the like + continue + full_target_target_ids = guid_target_ids[target["guid"]] + target_target_ids = ( + full_target_target_ids.get(command) or + # Will only be `null` if `command == "buildFiles"` and there + # isn't a different compile target id + full_target_target_ids["build"] + ) + target_ids = _select_target_ids( + target_target_ids[configuration_name], + platform, + ) + for target_id in target_ids: + labels_and_target_ids.append((label, target_id)) + + if not labels_and_target_ids: + print( + """\ +error: Failed to determine labels and targets. Note, currently `.xcworkspace`s \ +aren't supported. Please make sure you are opening the generated \ +`.xcodeproj` file bundle directly. If you are, try using the "Clean Build \ +Folder" command instead (⇧ ⌘ K). If you still get this error after that, then \ +please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + + return labels_and_target_ids + + +def _calculate_guid_labels_and_target_ids(base_objroot): + pif_cache = f"{base_objroot}/XCBuildData/PIFCache" + project_cache = f"{pif_cache}/project" + target_cache = f"{pif_cache}/target" + + # The PIF cache will only be created before the `SetSessionUserInfo` + # command, which normally happens when a project is opened. If Derived Data + # is cleared while the project is open + if not (os.path.exists(project_cache) and os.path.exists(target_cache)): + print( + f"""\ +error: PIFCache ({pif_cache}) doesn't exist. If you manually cleared Derived \ +Data, you need to close and re-open the project for the PIFCache to be created \ +again. Using the "Clean Build Folder" command instead (⇧ ⌘ K) won't trigger \ +this error. If this error still happens after re-opening the project, please \ +file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + project_pif = max( + glob.iglob(f"{project_cache}/*"), + key = os.path.getctime, + ) + + guid_payload_parent = f"{base_objroot}/guid_payload" + guid_payload_path = f"""\ +{guid_payload_parent}/{os.path.basename(project_pif)}_v2.json""" + + if os.path.exists(guid_payload_path): + with open(guid_payload_path, encoding = "utf-8") as f: + payload = json.load(f) + return payload["labels"], payload["targetIds"] + + with open(project_pif, encoding = "utf-8") as f: + project_pif = json.load(f) + + targets = project_pif["targets"] + + guid_labels = {} + guid_target_ids = {} + for target_name in targets: + target_file = f"{target_cache}/{target_name}-json" + with open(target_file, encoding = "utf-8") as f: + target_pif = json.load(f) + + label = None + build_target_ids = {} + compile_target_ids = {} + for configuration in target_pif["buildConfigurations"]: + config_build_target_ids = {"key": "BAZEL_TARGET_ID"} + config_compile_target_ids = {"key": "BAZEL_COMPILE_TARGET_IDS"} + for key, value in configuration["buildSettings"].items(): + if key.startswith("BAZEL_TARGET_ID"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_TARGET_ID)` is used later + # in this processing to pull from an inherited setting. + if value == "$(BAZEL_TARGET_ID)": + target_ids = value + else: + # This is only a single value but the later parsing of + # these target ids assumes a list. + target_ids = [value] + + config_build_target_ids[_platform_from_build_key(key)] = ( + target_ids + ) + elif key.startswith("BAZEL_COMPILE_TARGET_IDS"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_COMPILE_TARGET_IDS)` is + # used later in this processing to pull from an inherited + # setting. + if value == "$(BAZEL_COMPILE_TARGET_IDS)": + target_ids = "$(BAZEL_COMPILE_TARGET_IDS)" + else: + # Target identifiers contain a space but are space separated. + # Split on all spaces then rejoin across the identifier pairs. + target_ids = value.split(" ") + target_ids = [ + " ".join(target_ids[i:i+2]) + for i in range(0, len(target_ids), 2) + ] + + config_compile_target_ids[_platform_from_compile_key(key)] = ( + target_ids + ) + elif key == "BAZEL_LABEL": + label = value + configuration_name = configuration["name"] + build_target_ids[configuration_name] = config_build_target_ids + compile_target_ids[configuration_name] = config_compile_target_ids + + if not label: + # `BazelDependency` and the like + continue + + target_ids = { + "build": build_target_ids, + } + if len(compile_target_ids) > 1: + target_ids["buildFiles"] = compile_target_ids + + guid = target_pif["guid"] + guid_labels[guid] = label + guid_target_ids[guid] = target_ids + + os.makedirs(guid_payload_parent, exist_ok = True) + with open(guid_payload_path, "w", encoding = "utf-8") as f: + payload = { + "labels": guid_labels, + "targetIds": guid_target_ids, + } + json.dump(payload, f) + + return guid_labels, guid_target_ids + + +def _platform_from_build_key(key): + if key.startswith("BAZEL_TARGET_ID[sdk="): + return key[20:-2] + return "" + + +def _platform_from_compile_key(key): + if key.startswith("BAZEL_COMPILE_TARGET_IDS[sdk="): + return key[29:-2] + return "" + + +def _select_target_ids(target_ids, platform): + key = target_ids["key"] + + platforms = {platform: None} + + # We need to try other similar platforms (i.e. other simulator platforms if + # `platform`` is for a simulator). This is to support schemes with targets + # of multiple platforms in them. Because `dict` is insertion ordered, + # `platform` will be checked first. + platforms.update(_similar_platforms(platform)) + + for platform in platforms: + platform_target_ids = target_ids.get(platform) + if platform_target_ids: + if platform_target_ids == f"$({key})": + return target_ids[""] + return platform_target_ids + return target_ids[""] + + +def _similar_platforms(platform): + if platform == "macosx" or "simulator" in platform: + return _SIMULATOR_PLATFORMS + return _DEVICE_PLATFORMS + + +def _main( + xcode_version, + objroot, + base_objroot, + marker_file, + prefixes_str): + if not os.path.exists(marker_file): + return + + build_request_min_ctime = os.path.getctime(marker_file) + + try: + xcode_version = int(xcode_version) + except ValueError: + print( + """ +warning: xcode_version was not an integer. Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""", + file = sys.stderr, + ) + xcode_version = 9999 + + prefixes = prefixes_str.split(",") + + try: + build_request = _get_build_request( + xcode_version, + objroot, + build_request_min_ctime, + ) + guid_labels, guid_target_ids = ( + _calculate_guid_labels_and_target_ids(base_objroot) + ) + except Exception: + print( + f"""\ +error: Failed to calculate labels and target ids from PIFCache: +{traceback.format_exc()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + labels_and_target_ids = _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids, + ) + + print("\n".join( + [ + f"{label}\n{prefix} {id}" + for label, id in labels_and_target_ids + for prefix in prefixes + ], + )) + + +if __name__ == "__main__": + _main( + # XCODE_VERSION_ACTUAL + sys.argv[1], + # non_preview_objroot + sys.argv[2], + # base_objroot + sys.argv[3], + # build_marker_file + sys.argv[4], + # output_group_prefixes + sys.argv[5], + ) diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/cc.dia b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/cc.dia new file mode 100644 index 0000000..c85cbfc Binary files /dev/null and b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/cc.dia differ diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/clang.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/clang.sh new file mode 100755 index 0000000..a327a2a --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/clang.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -euo pipefail + +while test $# -gt 0 +do + case $1 in + -MF) + shift + touch "$1" + ;; + --serialize-diagnostics) + shift + cp "${BASH_SOURCE%/*}/cc.dia" "$1" + ;; + *.o) + break + ;; + -v) + # TODO: Make this work with custom toolchains + DEV_DIR_PREFIX=$(awk '{ sub(/.*-isysroot /, ""); sub(/.Contents\/Developer.*/, ""); print}' <<< "${@:1}") + clang="$DEV_DIR_PREFIX/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + "$clang" "${@:1}" + break + ;; + esac + + shift +done diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh new file mode 100755 index 0000000..95a7457 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +function patch_dsym() { + local dsym_name="$1" + + shopt -s extglob + local binary_name="${dsym_name%.dSYM}" + binary_name="${binary_name%@(.app|.appex|.bundle|.dext|.kext|.framework|.pluginkit|.systemextension|.xctest|.xpc)}" + shopt +s extglob + + local binary_path="${dsym_name}/Contents/Resources/DWARF/${binary_name}" + + if [[ ! -f "$binary_path" ]]; then + echo "dSYM DWARF ${binary_path} does not exist." \ + "Skip dSYM patch." + return 1 + fi + + local dwarf_uuid + dwarf_uuid=$(dwarfdump --uuid "${binary_path}" | cut -d ' ' -f 2) + if [[ -z "${dwarf_uuid// /}" ]]; then + echo "Failed to get dSYM uuid." \ + "Skip dSYM patch." + return 1 + fi + + cat > "${dsym_name}/Contents/Resources/${dwarf_uuid}.plist" < + + + DBGVersion + 3 + DBGSourcePathRemapping + + ./bazel-out/ + $BAZEL_OUT/ + ./external/ + $BAZEL_EXTERNAL/ + ./ + $SRCROOT/ + + + +EOF +} + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ -n "${BAZEL_OUTPUTS_DSYM:-}" ]]; then + cd "${BAZEL_OUT%/*}" + + # shellcheck disable=SC2046 + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --archive \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + $(xargs -n1 <<< "$BAZEL_OUTPUTS_DSYM") \ + "$TARGET_BUILD_DIR" + + cd "${TARGET_BUILD_DIR}" + + export -f patch_dsym + # shellcheck disable=SC2016 + xargs -n1 sh -c 'patch_dsym $(basename "$1")' _ \ + <<< "$BAZEL_OUTPUTS_DSYM" +fi diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh new file mode 100755 index 0000000..6c1ce5c --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +set -euo pipefail + +# readonly forced_swift_compile_file="$1" +readonly exclude_list="$2" + +# # Touching this file on an error allows indexing to work better +# trap 'echo "private let touch = \"$(date +%s)\"" > "$DERIVED_FILE_DIR/$forced_swift_compile_file"' ERR + +readonly test_frameworks=( + "libXCTestBundleInject.dylib" + "libXCTestSwiftSupport.dylib" + "IDEBundleInjection.framework" + "XCTAutomationSupport.framework" + "Testing.framework" + "XCTest.framework" + "XCTestCore.framework" + "XCTestSupport.framework" + "XCUIAutomation.framework" + "XCUnit.framework" +) + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ "$ACTION" != indexbuild ]]; then + # Copy product + if [[ -n ${BAZEL_OUTPUTS_PRODUCT:-} ]]; then + cd "${BAZEL_OUTPUTS_PRODUCT%/*}" + + if [[ -f "$BAZEL_OUTPUTS_PRODUCT_BASENAME" ]]; then + # Product is a binary, so symlink instead of rsync, to allow for Bazel-set + # rpaths to work + ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME" + else + # Product is a bundle + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + "$BAZEL_OUTPUTS_PRODUCT_BASENAME" \ + "$TARGET_BUILD_DIR" + + if [[ -n "${TEST_HOST:-}" ]]; then + # We need to re-sign test frameworks that Xcode placed into the test + # host un-signed + readonly test_host_app="${TEST_HOST%/*}" + + # Only engage signing workflow if the test host is signed + if [[ -f "$test_host_app/embedded.mobileprovision" ]]; then + codesigning_authority=$(codesign -dvv "$TEST_HOST" 2>&1 >/dev/null | /usr/bin/sed -n -E 's/^Authority=(.*)/\1/p'| head -n 1) + + for framework in "${test_frameworks[@]}"; do + framework="$test_host_app/Frameworks/$framework" + if [[ -e "$framework" ]]; then + codesign -f \ + --preserve-metadata=identifier,entitlements,flags \ + --timestamp=none \ + --generate-entitlement-der \ + -s "$codesigning_authority" \ + "$framework" + fi + done + fi + fi + + # Incremental installation can fail if an embedded bundle is recompiled but + # the Info.plist is not updated. This causes the delta bundle that Xcode + # actually installs to not have a bundle ID for the embedded bundle. We + # avoid this potential issue by always including the Info.plist in the delta + # bundle by touching them. + # Source: https://github.com/bazelbuild/tulsi/commit/27354027fada7aa3ec3139fd686f85cc5039c564 + # TODO: Pass the exact list of files to touch to this script + readonly plugins_dir="$TARGET_BUILD_DIR/${PLUGINS_FOLDER_PATH:-}" + if [[ -d "$plugins_dir" ]]; then + find "$plugins_dir" -depth 2 -name "Info.plist" -exec touch {} \; + fi + + # Xcode Previews has a hard time finding frameworks (`@rpath`) when using + # framework schemes, so let's symlink them into + # `$TARGET_BUILD_DIR` (since we modify `@rpath` to always include + # `@loader_path/SwiftUIPreviewsFrameworks`) + if [[ "${ENABLE_PREVIEWS:-}" == "YES" && \ + -n "${PREVIEW_FRAMEWORK_PATHS:-}" ]]; then + mkdir -p "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + cd "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + + # shellcheck disable=SC2016 + xargs -n1 sh -c 'ln -shfF "$1" $(basename "$1")' _ \ + <<< "$PREVIEW_FRAMEWORK_PATHS" + fi + fi + fi +fi + +# TODO: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/402 +# Copy diagnostics, and on a change +# `echo "private let touch = \"$(date +%s)\"" > $DERIVED_FILE_DIR/$forced_swift_compile_file"` +# See git blame for this comment for an example diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh new file mode 100755 index 0000000..dcec422 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +readonly execution_root="$PROJECT_DIR" +readonly build_external="$execution_root/external" + +{ + +# Set `CWD` to `$execution_root` so relative paths in binaries work +# +# This is needed because we use the `oso_prefix_is_pwd` feature, which makes the +# paths to archives relative to the exec root. +echo "platform settings -w \"$execution_root\"" + +# "Undo" `-debug-prefix-map` for breakpoints +# +# This needs to cause the files to match exactly what Xcode set for breakpoints, +# which is why we don't use `$execution_root` here. Xcode will set the path +# based on the way you opened a file. If you open a file via the Project +# navigator, or indexing (e.g. Jump to Definition), it will use the paths +# specified below. + +# `bazel-out` when set from Project navigator or swiftsourcefile +echo "settings set target.source-map ./bazel-out/ \"$BAZEL_OUT\"" + +# `external` when set from Project navigator +echo "settings append target.source-map ./external/ \"$BAZEL_EXTERNAL\"" +# `external` when set from swiftsourcefile +echo "settings append target.source-map ./external/ \"$build_external\"" + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + readonly output_base="${execution_root%/*/*}" + + readonly workspace_name="${execution_root##*/}" + readonly index_execution_root="${output_base%/*}/indexbuild_output_base/execroot/$workspace_name" + + readonly index_bazel_out="$index_execution_root/bazel-out" + readonly index_external="$index_execution_root/external" + + mkdir -p "$index_bazel_out" + mkdir -p "$index_external" + + # `bazel-out` when set from indexing opened file + echo "settings append target.source-map ./bazel-out/ \"$index_bazel_out\"" + # `external` when set from indexing opened file + echo "settings append target.source-map ./external/ \"$index_external\"" +fi + +# Project files and locally resolved external repositories +# +# lldb seems to match breakpoints based on the second argument, using a simple +# prefix check that doesn't take into account the trailing slash. This means +# that we have to order the source-map settings so that the longest paths are +# first, otherwise an earlier setting can prevent a later setting from matching. +if [[ -n "${RESOLVED_REPOSITORIES:-}" ]]; then + # `external` for local repositories when set from Project navigator, + # and the project root + while IFS='' read -r x; do repos+=("$x"); done < <(xargs -n1 <<< "$RESOLVED_REPOSITORIES") + for (( i=0; i<${#repos[@]}; i+=2 )); do + prefix="${repos[$i]}" + path="${repos[$i+1]}" + echo "settings append target.source-map \"$prefix/\" \"$path\"" + done +fi + +# Import swift_debug_settings.py +# +# This Python module sets a stop hook, that when hit, sets the Swift debug +# settings (i.e. `target.swift-*``) for the module of the current frame. This +# fixes debugging when using `-serialize-debugging-options`. +echo "command script import \"$OBJROOT/$CONFIGURATION/swift_debug_settings.py\"" + +} > "$BAZEL_LLDB_INIT" diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist new file mode 100644 index 0000000..a2d6c45 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist @@ -0,0 +1,2 @@ +/*.framework/Modules/*** +/*.framework/SwiftUIPreviewsFrameworks/*** diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh new file mode 100755 index 0000000..a8506e4 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh @@ -0,0 +1,217 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +# Calculate Bazel `--output_groups` + +if [ "$ACTION" == "indexbuild" ]; then + echo >&2 "error: \`BazelDependencies\` should not run during Index Build." \ +"Please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" + exit 1 +else + if [[ "${ENABLE_PREVIEWS:-}" == "YES" ]]; then + # Compile params, products (i.e. bundles) and index store data, and link + # params + readonly output_group_prefixes="bc,bp,bl" + else + # Products (i.e. bundles) and index store data + readonly output_group_prefixes="bp" + fi + + # In Xcode 14 the "Index" directory was renamed to "Index.noindex". + # `$INDEX_DATA_STORE_DIR` is set to `$OBJROOT/INDEX_DIR/DataStore`, so we can + # use it to determine the name of the directory regardless of Xcode version. + readonly index_dir="${INDEX_DATA_STORE_DIR%/*}" + readonly index_dir_name="${index_dir##*/}" + + # Xcode doesn't adjust `$OBJROOT` in scheme action scripts when building for + # previews. So we need to look in the non-preview build directory for this file. + readonly non_preview_objroot="${OBJROOT/\/Intermediates.noindex\/Previews\/*//Intermediates.noindex}" + readonly base_objroot="${non_preview_objroot/\/$index_dir_name\/Build\/Intermediates.noindex//Build/Intermediates.noindex}" + readonly build_marker_file="$non_preview_objroot/build_marker" + + # We need to read from `$output_groups_file` as soon as possible, as concurrent + # writes to it can happen during indexing, which breaks the off-by-one-by-design + # nature of it + IFS=$'\n' read -r -d '' -a labels_and_output_groups < \ + <( "$CALCULATE_OUTPUT_GROUPS_SCRIPT" \ + "$XCODE_VERSION_ACTUAL" \ + "$non_preview_objroot" \ + "$base_objroot" \ + "$build_marker_file" \ + $output_group_prefixes \ + && printf '\0' ) + + readonly outputgroup_regex='[^\ ]+ @{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + raw_labels=() + raw_target_ids=() + output_groups=("index_import" "target_ids_list") + indexstores_filelists=() + for (( i=0; i<${#labels_and_output_groups[@]}; i+=2 )); do + raw_labels+=("${labels_and_output_groups[i]}") + + output_group="${labels_and_output_groups[i+1]}" + raw_target_ids+=("${output_group#* }") + output_groups+=("$output_group") + + output_type="${output_group%% *}" + + if [[ "$output_type" == 'xi' || "$output_type" == 'bi' ]]; then + if [[ $output_group =~ $outputgroup_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-${output_type}.filelist" + + indexstores_filelists+=("$filelist") + fi + fi + done + readonly indexstores_filelists + + if [ "${#output_groups[@]}" -eq 1 ]; then + echo "BazelDependencies invoked without any output groups set." \ + "Exiting early." + exit + else + labels=() + while IFS= read -r -d '' label; do + labels+=("$label") + done < <(printf "%s\0" "${raw_labels[@]}" | sort -uz) + + target_ids=() + while IFS= read -r -d '' target_id; do + target_ids+=("$target_id") + done < <(printf "%s\0" "${raw_target_ids[@]}" | sort -uz) + fi +fi + +# Build + +build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,sourceinfo} files for indexing + # - .a and .swiftmodule files for lldb + # - primary compilation input files (.c, .C, .cc, .cl, .cpp, .cu, .cxx, .c++, + # .m, .mm, .swift) for Xcode build input checking + # - files needed for Clang importer (headers, modulemaps, yaml files, etc.) + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +apply_sanitizers=1 +if [ "$ACTION" == "indexbuild" ]; then + readonly config="${BAZEL_CONFIG}_indexbuild" + + # Index Build doesn't need sanitizers + apply_sanitizers=0 +elif [ "${ENABLE_PREVIEWS:-}" == "YES" ]; then + readonly config="${BAZEL_CONFIG}_swiftuipreviews" +elif [ "${CLANG_COVERAGE_MAPPING:-}" == YES ] && [ "${BAZEL_SUPPRESS_COVERAGE_BUILD:-}" != YES ]; then + # Code coverage build + # + # CLANG_COVERAGE_MAPPING is set to YES when the active scheme's test action has code coverage enabled. It is configured + # irrespective of the value of ENABLE_CODE_COVERAGE, and of whether the current build action is for testing or not. + # + # We would rather use ENABLE_CODE_COVERAGE here, but the value of that setting is often YES even when code coverage is not + # enabled in the active scheme. + readonly config="${BAZEL_CONFIG}_coverage" + + echo "warning: Code coverage is enabled. In order to maintain compatibility with Xcode, the instrumented build is not hermetic. Remote cache performance will be affected." >&2 +else + readonly config="_${BAZEL_CONFIG}_build" +fi + +# Respect the "Continue building after errors" setting +continue_building_value="$(defaults read com.apple.dt.Xcode IDEBuildingContinueBuildingAfterErrors 2>/dev/null || echo 0)" +if [ "$continue_building_value" == "1" ]; then + build_pre_config_flags+=("--keep_going") +else + build_pre_config_flags+=("--nokeep_going") +fi + +# Runtime Sanitizers +if [[ $apply_sanitizers -eq 1 ]]; then + if [ "${ENABLE_ADDRESS_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=address + --linkopt=-fsanitize=address + --@@rules_swift+//swift:copt=-sanitize=address + --copt=-Wno-macro-redefined + --copt=-D_FORTIFY_SOURCE=0 + ) + fi + if [ "${ENABLE_THREAD_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=thread + --linkopt=-fsanitize=thread + --@@rules_swift+//swift:copt=-sanitize=thread + ) + fi + if [ "${ENABLE_UNDEFINED_BEHAVIOR_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=undefined + --linkopt=-fsanitize=undefined + ) + fi +fi +readonly build_pre_config_flags + +# `bazel_build.sh` sets `output_path` +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Async actions +# +# For these commands to run in the background, both stdout and stderr need to be +# redirected, otherwise Xcode will block the run script. + +readonly log_dir="$OBJROOT/rules_xcodeproj_logs" +mkdir -p "$log_dir" + +# Report errors from previous async actions +shopt -s nullglob +for log in "$log_dir"/*.async.log; do + if [[ -s "$log" ]]; then + command=$(basename "${log%.async.log}") + echo "warning: Previous run of \"$command\" had output:" >&2 + sed "s|^|warning: |" "$log" >&2 + echo "warning: If you believe this is a bug, please file a report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + fi +done + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + fi +fi diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh new file mode 100755 index 0000000..aa6f267 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +readonly config="${BAZEL_CONFIG}_indexbuild" + +# Compiled outputs (i.e. swiftmodules) and generated inputs +output_groups=( + # Compile params + "bc $BAZEL_TARGET_ID" + # Indexstores and their filelist. Requesting indexstore directories triggers + # transitive Swift compilation (producing swiftmodules, indexstores, and + # generated headers) without linking, avoiding large product binaries. We use + # `--remote_download_regex` below to download the files we care + # about. + "bi $BAZEL_TARGET_ID" +) + +indexstores_filelists=() +if [[ "$IMPORT_INDEX_BUILD_INDEXSTORES" == "YES" ]]; then + output_groups+=( + "index_import" + ) + + readonly targetid_regex='@{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + if [[ "$BAZEL_TARGET_ID" =~ $targetid_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-bi.filelist" + + indexstores_filelists+=("$filelist") + fi + + readonly indexstores_regex='.*\.indexstore/.*|' +else + readonly indexstores_regex='' +fi + +readonly build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,module,sourceinfo} files for indexing + # - compilation input files (.cfg, .c, .C .cc, .cl, .cpp, .cu, .cxx, .c++, + # .def, .h, .H, .hh, .hpp, .hxx, .h++, .hmap, .ilc, .inc, .ipp, .tcc, .tlh, + # .tpp, .m, .modulemap, .mm, .pch, .swift, .yaml) for index compilation + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=${indexstores_regex}.*\.(cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" + fi +fi diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/import_indexstores b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/import_indexstores new file mode 100755 index 0000000..a2bfe93 Binary files /dev/null and b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/import_indexstores differ diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/ld b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/ld new file mode 100755 index 0000000..2156250 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/ld @@ -0,0 +1,30 @@ +#!/bin/bash + +set -euo pipefail + +passthrough_args=("${@:1}") + +while test $# -gt 0 +do + case $1 in + *_dependency_info.dat) + ld_version=$(ld -v 2>&1 | grep ^@) + printf "\0%s\0" "$ld_version" > "$1" + break + ;; + + -isysroot) + shift + # PATH/DEVELOPER_DIR isn't set when this is called, so we need to calculate + # the developer dir from the sysroot to invoke clang (used below) + developer_dir="${1/\/Platforms\/*/}" + ;; + + *.preview-thunk.dylib) + # Pass through for SwiftUI Preview thunk compilation + # TODO: Make this work with custom toolchains + exec "$developer_dir/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "${passthrough_args[@]}" + ;; + esac + shift +done diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/libtool b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/libtool new file mode 100755 index 0000000..ec4d7df --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/libtool @@ -0,0 +1,21 @@ +#!/bin/bash + +set -euo pipefail + +original_args=("$@") + +while test $# -gt 0 +do + case $1 in + -V) + # Xcode 15+ needs to know the version of libtool + exec libtool "${original_args[@]}" + ;; + *_dependency_info.dat) + printf "\0 \0" > "$1" + break + ;; + esac + + shift +done diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py new file mode 100755 index 0000000..ff05b5a --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py @@ -0,0 +1,124 @@ +#!/usr/bin/python3 + +import os +import re +import subprocess +import sys +from typing import List +import signal + + +STRIP_COLOR_RE = re.compile(r"\x1b\[[0-9;]{1,}[A-Za-z]") +RELATIVE_DIAGNOSTICS_RE = re.compile( + r""" + ^ + (?P.+?:\d+(?::\d+)?:\s) # Capture location (e.g. "foo/bar:12:3: ") + (?:fatal\s)? # Dropping "fatal " + (?P(?:error|warning):\s) # Capture severity + (?P.*) # Capture the rest of the message + """, + re.VERBOSE, +) + +def _uppercase_first_letter(s: str) -> str: + return s[:1].upper() + s[1:] + +def _main(command: List[str]) -> None: + + def _signal_handler(signum, frame): + """Print signal information and ignore the signal.""" + signal_name = signal.Signals(signum).name + print(f"\nReceived signal {signal_name} ({signum})\n", file=sys.stderr) + return + + # Set up signal handler for SIGINT + signal.signal(signal.SIGINT, _signal_handler) + + srcroot = os.getenv("SRCROOT") + if not srcroot: + sys.exit("SRCROOT environment variable must be set") + + execution_root = os.getenv("PROJECT_DIR") + if not execution_root: + sys.exit("PROJECT_DIR environment variable must be set") + + bazel_out_directory = os.getenv("BAZEL_OUT") + if not bazel_out_directory: + sys.exit("BAZEL_OUT environment variable must be set") + bazel_out_prefix = bazel_out_directory[:-len("/bazel-out")] + if not bazel_out_prefix.startswith("/"): + bazel_out_prefix = f"{srcroot}/{bazel_out_prefix}" + + external_directory = os.getenv("BAZEL_EXTERNAL") + if not external_directory: + sys.exit("BAZEL_EXTERNAL environment variable must be set") + external_prefix = bazel_out_directory[:-len("/external")] + if not external_prefix.startswith("/"): + external_prefix = f"{srcroot}/{external_prefix}" + + should_strip_color = os.getenv("COLOR_DIAGNOSTICS", default="YES") != "YES" + + has_relative_diagnostic = False + + def _replacement(match: re.Match) -> str: + message = f"""\ +{match.group("loc")}{match.group("sev")}{_uppercase_first_letter(match.group("msg"))}\ +""" + + if message.startswith(execution_root): + # VFS overlays can make paths absolute, so make them relative again + message = message[(len(execution_root) + 1):] + + if message.startswith("/"): + # If still an absolute path, don't add a prefix + return message + + if message.startswith("bazel-out/"): + prefix = bazel_out_prefix + elif message.startswith("external/"): + prefix = external_prefix + else: + prefix = srcroot + + return f"{prefix}/{message}" + + process = subprocess.Popen( + command, bufsize=1, stderr=subprocess.PIPE, universal_newlines=True + ) + assert process.stderr + + def _process_log_line(line: str): + input_line = line.rstrip() + + if should_strip_color: + input_line = STRIP_COLOR_RE.sub("", input_line) + + if not input_line: + return + + output_line = RELATIVE_DIAGNOSTICS_RE.sub(_replacement, input_line) + # Record if we have performed a relative diagnostic substitution. + if output_line != input_line: + nonlocal has_relative_diagnostic + has_relative_diagnostic = True + + print(output_line, flush=True) + + while process.poll() is None: + _process_log_line(process.stderr.readline()) + + for line in process.stderr: + _process_log_line(line) + + # If the Bazel invocation failed and there was no formatted error found, + # print a nicer error message instead of a cryptic in Xcode: + # 'Command PhaseScriptExecution failed with a nonzero exit code' + if process.returncode != 0 and not has_relative_diagnostic: + print("error: The bazel build failed, please check the report navigator, " + "which may have more context about the failure.") + + sys.exit(process.returncode) + + +if __name__ == "__main__": + _main(sys.argv[1:]) diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/rsync b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/rsync new file mode 100755 index 0000000..f617c07 Binary files /dev/null and b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/rsync differ diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/swiftc b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/swiftc new file mode 100755 index 0000000..9fb0d47 Binary files /dev/null and b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/swiftc differ diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist new file mode 100644 index 0000000..6f37a4d --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist @@ -0,0 +1,27 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*** +/*.app/_WatchKitStub/*** +/*.app/PlugIns/*.xctest diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc new file mode 100644 index 0000000..a611ea8 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc @@ -0,0 +1,139 @@ +### `--config=rules_xcodeproj` +# +# Used directly when doing a normal build, but it is also the base config of all +# the `rules_xcodeproj_*` configs. Adjust this config if you want something to +# apply to all builds (which should be most settings). + +common:rules_xcodeproj --verbose_failures + +# Increase the default file digest cache size to 500k entries, as 50k (the +# default) is too small for large projects. +common:rules_xcodeproj --cache_computed_file_digests=500000 + +# We default to `dbg` since debugging is broken otherwise +common:rules_xcodeproj --compilation_mode=dbg + +# Xcode builds shouldn't mess with the workspace's symlinks +common:rules_xcodeproj --experimental_convenience_symlinks=ignore + +# Projects with large C/C++ target command-lines can fail to generate due +# without using params files. While the targets themselves might use params +# files, currently `Action.args` won't unless +# `--experimental_use_cpp_compile_action_args_params_file` is set. +# https://github.com/bazelbuild/bazel/issues/20746 would allow us to remove the +# need for this flag. +common:rules_xcodeproj --experimental_use_cpp_compile_action_args_params_file + +# Not using `--define=apple.experimental.tree_artifact_outputs=1` is slow (we +# have to unzip an archive on each build). If this doesn't work for your +# project, you can set `--define=apple.experimental.tree_artifact_outputs=0` +# on `common:rules_xcodeproj` in your `.bazelrc` or `xcodeproj.bazelrc` file. +common:rules_xcodeproj --define=apple.experimental.tree_artifact_outputs=1 + +# Fix Test Issue navigation +common:rules_xcodeproj --features=apple.swizzle_absolute_xcttestsourcelocation + +# `oso_prefix_is_pwd` removes absolute paths in debug info, which increases +# cache hit rates. We "undo" this in `bazel.lldbinit`, so debugging still works. +common:rules_xcodeproj --features=oso_prefix_is_pwd + +# `relative_ast_path` uses relative paths when passing `--add_ast_path` to the +# linker, which increases cache hit rates. We "undo" this in `bazel.lldbinit`, +# so debugging still works. +common:rules_xcodeproj --features=relative_ast_path + +# `swift.cacheable_swiftmodules` passes `-no-serialize-debugging-options` to +# `swiftc`, which fixes lldb crashes and increases cache hit rates. We "undo" +# this in `swift_debug_settings.py`, so debugging still works. +common:rules_xcodeproj --features=swift.cacheable_swiftmodules + +# `swift.index-while-building` passes `-index-store-path` to `swiftc`, which +# generates index store data. We enable this globally, because we import indexes +# in Index Build as well. And even if we didn't, we would still want it enabled +# to get cache hits between normal and Index Build builds. +common:rules_xcodeproj --features=swift.index_while_building +common:rules_xcodeproj --features=swift.use_global_index_store + +# Removes potentially large unneeded event from the BEP +common:rules_xcodeproj --nolegacy_important_outputs + +# `--show_result=0` prevents showing the spec.json and intermediate `.xcodeproj` +# in the logs when generating, and all of the many outputs when building +common:rules_xcodeproj --show_result=0 + +# Disable sandboxing. Sandboxing on macOS is still very slow. +common:rules_xcodeproj --noworker_sandboxing +common:rules_xcodeproj --spawn_strategy=remote,worker,local + +# Needed to download aspect output groups +build:rules_xcodeproj --remote_download_outputs=toplevel + +### `--config=rules_xcodeproj_generator` +# +# Used when generating a project. + +common:rules_xcodeproj_generator --config=rules_xcodeproj + +### `--config=rules_xcodeproj_indexbuild` +# +# Used when doing an Index Build. + +common:rules_xcodeproj_indexbuild --config=rules_xcodeproj + +# Disable BES for Index Builds, as it runs a lot, and isn't user invoked +common:rules_xcodeproj_indexbuild --bes_backend= --bes_results_url= + +### `--config=rules_xcodeproj_coverage` +# +# Used when doing building for code coverage. + +common:rules_xcodeproj_coverage --config=rules_xcodeproj + +# Enable features that allow for building for instrumentation. +# +# Of particular note are the (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +# features, which remap the execroot during the build as the absolute, canonical path +# to the source root. +# +# This approach breaks remote caching when building for testing and codeCoverageEnabled +# is set to YES, but does not affect other builds (for running, or for testing without +# coverage). +common:rules_xcodeproj_coverage --features=coverage +common:rules_xcodeproj_coverage --features=llvm_coverage_map_format +common:rules_xcodeproj_coverage --features=_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=swift.coverage +common:rules_xcodeproj_coverage --features=swift._coverage_prefix_map_absolute_sources_non_hermetic + +# Disable features that interfere with (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=-coverage_prefix_map +common:rules_xcodeproj_coverage --features=-file_prefix_map +common:rules_xcodeproj_coverage --features=-swift.coverage_prefix_map +common:rules_xcodeproj_coverage --features=-swift.file_prefix_map + +### `--config=rules_xcodeproj_swiftuipreviews` +# +# Used when doing a Xcode Previews build. + +common:rules_xcodeproj_swiftuipreviews --config=rules_xcodeproj + +# Allow frameworks to find framework dependencies when running a preview +# See `$PROJECT_FILE_PATH/rules_xcodeproj/bazel/copy_outputs.sh` for more info +common:rules_xcodeproj_swiftuipreviews --linkopt="-Wl,-rpath,@loader_path/SwiftUIPreviewsFrameworks" + +# `swiftc` flags needed for SwiftUI Previews +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-implicit-dynamic +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-private-imports +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-dynamic-replacement-chaining + +### `--config=_rules_xcodeproj_build` +# +# Private implementation detail. Don't adjust this config, adjust +# `rules_xcodeproj` instead. This config exists solely to allow project-level +# configs to work correctly. + +common:_rules_xcodeproj_build --config=rules_xcodeproj + +### Project specific configs + +# Import `xcodeproj.bazelrc` if it exists +try-import %workspace%/xcodeproj.bazelrc diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist new file mode 100644 index 0000000..5ce1dc5 --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist @@ -0,0 +1,24 @@ +/*.xctest/Contents/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Contents/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Contents/Frameworks/Testing.framework, +/*.xctest/Contents/Frameworks/XCTAutomationSupport.framework +/*.xctest/Contents/Frameworks/XCTest.framework +/*.xctest/Contents/Frameworks/XCTestCore.framework +/*.xctest/Contents/Frameworks/XCTestSupport.framework +/*.xctest/Contents/Frameworks/XCUIAutomation.framework +/*.xctest/Contents/Frameworks/XCUnit.framework +/*.xctest/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Frameworks/Testing.framework, +/*.xctest/Frameworks/XCTAutomationSupport.framework +/*.xctest/Frameworks/XCTest.framework +/*.xctest/Frameworks/XCTestCore.framework +/*.xctest/Frameworks/XCTestSupport.framework +/*.xctest/Frameworks/XCUIAutomation.framework +/*.xctest/Frameworks/XCUnit.framework diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/generated.xcfilelist b/Sources/Aufgabe5/Aufgabe5.xcodeproj/rules_xcodeproj/generated.xcfilelist new file mode 100755 index 0000000..e69de29 diff --git a/Sources/Aufgabe5/Aufgabe5.xcodeproj/xcshareddata/xcschemes/Aufgabe5.xcscheme b/Sources/Aufgabe5/Aufgabe5.xcodeproj/xcshareddata/xcschemes/Aufgabe5.xcscheme new file mode 100644 index 0000000..8671fcf --- /dev/null +++ b/Sources/Aufgabe5/Aufgabe5.xcodeproj/xcshareddata/xcschemes/Aufgabe5.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Aufgabe5/BUILD.bazel b/Sources/Aufgabe5/BUILD.bazel index 2ddaeb0..71f058a 100644 --- a/Sources/Aufgabe5/BUILD.bazel +++ b/Sources/Aufgabe5/BUILD.bazel @@ -8,3 +8,33 @@ swift_binary( srcs = ["main.swift"], visibility = ["//visibility:public"], ) + +# BEGIN GENERATED XCODEPROJ +load("@rules_xcodeproj//xcodeproj:defs.bzl", "top_level_target", "xcodeproj") + +filegroup( + name = "xcodeproj_extra_files", + srcs = glob( + ["**/*"], + exclude = [ + "BUILD.bazel", + "BUILD", + "**/*.xcodeproj/**", + "**/.*", + "**/.*/**", + ], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) + +xcodeproj( + name = "xcodeproj", + project_name = "Aufgabe5", + tags = ["manual"], + extra_files = [":xcodeproj_extra_files"], + top_level_targets = [ + "//m323/Sources/Aufgabe5:Aufgabe5", + ], +) +# END GENERATED XCODEPROJ diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.pbxproj b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.pbxproj new file mode 100755 index 0000000..8079642 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.pbxproj @@ -0,0 +1,474 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 60; + objects = { + FF0100000000000000000004 /* Generate Bazel Dependencies */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Generate Bazel Dependencies"; + outputFileListPaths = ( + "$(INTERNAL_DIR)/generated.xcfilelist", + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$BAZEL_INTEGRATION_DIR/generate_bazel_dependencies.sh\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000005 /* Create swift_debug_settings.py */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BAZEL_INTEGRATION_DIR)/$(CONFIGURATION)-swift_debug_settings.py", + ); + name = "Create swift_debug_settings.py"; + outputPaths = ( + "$(OBJROOT)/$(CONFIGURATION)/swift_debug_settings.py", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "perl -pe '\n # Replace \"__BAZEL_XCODE_DEVELOPER_DIR__\" with \"$(DEVELOPER_DIR)\"\n s/__BAZEL_XCODE_DEVELOPER_DIR__/\\$(DEVELOPER_DIR)/g;\n\n # Replace \"__BAZEL_XCODE_SDKROOT__\" with \"$(SDKROOT)\"\n s/__BAZEL_XCODE_SDKROOT__/\\$(SDKROOT)/g;\n\n # Replace build settings with their values\n s/\n \\$ # Match a dollar sign\n (\\()? # Optionally match an opening parenthesis and capture it\n ([a-zA-Z_]\\w*) # Match a variable name and capture it\n (?(1)\\)) # If an opening parenthesis was captured, match a closing parenthesis\n /$ENV{$2}/gx; # Replace the entire matched string with the value of the corresponding environment variable\n\n' \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BAZEL_PACKAGE_BIN_DIR = rules_xcodeproj; + CALCULATE_OUTPUT_GROUPS_SCRIPT = "$(BAZEL_INTEGRATION_DIR)/calculate_output_groups.py"; + CC = ""; + CXX = ""; + INDEXING_SUPPORTED_PLATFORMS__ = "$(INDEXING_SUPPORTED_PLATFORMS__NO)"; + INDEXING_SUPPORTED_PLATFORMS__NO = macosx; + INDEXING_SUPPORTED_PLATFORMS__YES = macosx; + INDEX_DISABLE_SCRIPT_EXECUTION = YES; + LD = ""; + LDPLUSPLUS = ""; + LIBTOOL = libtool; + SUPPORTED_PLATFORMS = "$(INDEXING_SUPPORTED_PLATFORMS__$(INDEX_ENABLE_BUILD_ARENA))"; + SUPPORTS_MACCATALYST = YES; + SWIFT_EXEC = swiftc; + TAPI_EXEC = ""; + TARGET_IDS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe6/xcodeproj/xcodeproj_target_ids"; + TARGET_NAME = BazelDependencies; + }; + name = Debug; + }; + FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0100000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0100000000000000000001 /* BazelDependencies */ = { + isa = PBXAggregateTarget; + buildConfigurationList = FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */; + buildPhases = ( + FF0100000000000000000004 /* Generate Bazel Dependencies */, + FF0100000000000000000005 /* Create swift_debug_settings.py */, + ); + dependencies = ( + ); + name = BazelDependencies; + productName = BazelDependencies; + }; + FF0000000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO; + BAZEL_CONFIG = rules_xcodeproj; + BAZEL_EXTERNAL = "$(BAZEL_OUTPUT_BASE)/external"; + BAZEL_INTEGRATION_DIR = "$(INTERNAL_DIR)/bazel"; + BAZEL_LLDB_INIT = "$(PROJECT_FILE_PATH)/rules_xcodeproj/bazel.lldbinit"; + BAZEL_OUT = "$(PROJECT_DIR)/bazel-out"; + BAZEL_OUTPUT_BASE = "$(_BAZEL_OUTPUT_BASE:standardizepath)"; + BAZEL_WORKSPACE_ROOT = "$(SRCROOT)"; + BUILD_DIR = "$(SYMROOT)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + BUILD_MARKER_FILE = "$(OBJROOT)/build_marker"; + BUILD_WORKSPACE_DIRECTORY = "$(SRCROOT)"; + CC = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_MODULES_AUTOLINK = NO; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGN_STYLE = Manual; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(BAZEL_PACKAGE_BIN_DIR)"; + COPY_PHASE_STRIP = NO; + CXX = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + DEBUG_INFORMATION_FORMAT = dwarf; + DSTROOT = "$(PROJECT_TEMP_DIR)"; + ENABLE_DEBUG_DYLIB = NO; + ENABLE_DEFAULT_SEARCH_PATHS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_OPTIMIZATION_LEVEL = 0; + IMPORT_INDEX_BUILD_INDEXSTORES = YES; + INDEXING_PROJECT_DIR__ = "$(INDEXING_PROJECT_DIR__NO)"; + INDEXING_PROJECT_DIR__NO = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + INDEXING_PROJECT_DIR__YES = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/indexbuild_output_base/execroot/_main; + INDEX_DATA_STORE_DIR = "$(INDEX_DATA_STORE_DIR)"; + INDEX_FORCE_SCRIPT_EXECUTION = YES; + INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_index_import/index-import"; + INSTALL_PATH = "$(BAZEL_PACKAGE_BIN_DIR)/$(TARGET_NAME)/bin"; + INTERNAL_DIR = "$(PROJECT_FILE_PATH)/rules_xcodeproj"; + LD = "$(BAZEL_INTEGRATION_DIR)/ld"; + LDPLUSPLUS = "$(BAZEL_INTEGRATION_DIR)/ld"; + LD_DYLIB_INSTALL_NAME = ""; + LD_OBJC_ABI_VERSION = ""; + LD_RUNPATH_SEARCH_PATHS = ""; + LEGACY_INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_legacy_index_import/index-import"; + LIBTOOL = "$(BAZEL_INTEGRATION_DIR)/libtool"; + ONLY_ACTIVE_ARCH = YES; + PROJECT_DIR = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + RESOLVED_REPOSITORIES = "\".\" \"/Users/cediackermann/Projects\""; + RULES_XCODEPROJ_BUILD_MODE = bazel; + SRCROOT = /Users/cediackermann/Projects; + SUPPORTS_MACCATALYST = NO; + SWIFT_EXEC = "$(BAZEL_INTEGRATION_DIR)/swiftc"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_USE_INTEGRATED_DRIVER = NO; + SWIFT_VERSION = 5.0; + TAPI_EXEC = /usr/bin/true; + TARGET_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(BAZEL_PACKAGE_BIN_DIR)/$(COMPILE_TARGET_NAME)"; + USE_HEADERMAP = NO; + VALIDATE_WORKSPACE = NO; + _BAZEL_OUTPUT_BASE = "$(PROJECT_DIR)/../.."; + }; + name = Debug; + }; + FF0000000000000000000002 /* Build configuration list for PBXProject */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0000000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0000000000000000000001 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = FF0000000000000000000002 /* Build configuration list for PBXProject */; + compatibilityVersion = "Xcode 15.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + mainGroup = FF0000000000000000000003 /* /Users/cediackermann/Projects */; + productRefGroup = FF0000000000000000000004 /* Products */; + projectDirPath = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + projectRoot = ""; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 9999; + LastUpgradeCheck = 9999; + TargetAttributes = { + FF0100000000000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0000A1493BB5000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0100640DBA1D000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + }; + }; + knownRegions = ( + en, + Base, + ); + targets = ( + FF0100000000000000000001 /* BazelDependencies */, + 0000A1493BB5000000000001 /* Aufgabe6 */, + 0100640DBA1D000000000001 /* Extra */, + ); + }; + 0000A1493BB5000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0000A1493BB5000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0000A1493BB5000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00FFF0EEE77C6B9C02FC1ADB /* main.swift in Sources */, + 00FFE1E2E2E693DA11E095E7 /* first.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0000A1493BB5000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323/Sources/Aufgabe6"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Aufgabe6_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = Aufgabe6_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6"; + BAZEL_TARGET_ID = "@@//m323/Sources/Aufgabe6:Aufgabe6 darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = Aufgabe6; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Aufgabe6.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Aufgabe6_objs/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_Sources_Aufgabe6_Aufgabe6_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_Sources_Aufgabe6_Aufgabe6; + PRODUCT_NAME = Aufgabe6; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = Aufgabe6; + }; + name = Debug; + }; + 0000A1493BB5000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe6" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0000A1493BB5000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0000A1493BB50000000000FF /* Aufgabe6 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Aufgabe6; sourceTree = BUILT_PRODUCTS_DIR; }; + 0000A1493BB5000000000001 /* Aufgabe6 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0000A1493BB5000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe6" */; + buildPhases = ( + 0000A1493BB5000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0000A1493BB5000000000005 /* Create Link Dependencies */, + 0000A1493BB5000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0002A1493BB5FF0001000000 /* PBXTargetDependency */, + ); + name = Aufgabe6; + productName = Aufgabe6; + productReference = 0000A1493BB50000000000FF /* Aufgabe6 */; + productType = "com.apple.product-type.tool"; + }; + 0100640DBA1D000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0100640DBA1D000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0100640DBA1D000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 01FF43143471D66916F91B5B /* extra.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0100640DBA1D000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323/Sources/Aufgabe6:Extra"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Extra_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = Extra_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6"; + BAZEL_TARGET_ID = "@@//m323/Sources/Aufgabe6:Extra darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = Extra; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Extra.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Sources/Aufgabe6/Extra_objs/extra.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_Sources_Aufgabe6_Extra_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_Sources_Aufgabe6_Extra; + PRODUCT_NAME = Extra; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = Extra; + }; + name = Debug; + }; + 0100640DBA1D000000000002 /* Build configuration list for PBXNativeTarget "Extra" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0100640DBA1D000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0100640DBA1D0000000000FF /* Extra */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Extra; sourceTree = BUILT_PRODUCTS_DIR; }; + 0100640DBA1D000000000001 /* Extra */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0100640DBA1D000000000002 /* Build configuration list for PBXNativeTarget "Extra" */; + buildPhases = ( + 0100640DBA1D000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0100640DBA1D000000000005 /* Create Link Dependencies */, + 0100640DBA1D000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0102640DBA1DFF0001000000 /* PBXTargetDependency */, + ); + name = Extra; + productName = Extra; + productReference = 0100640DBA1D0000000000FF /* Extra */; + productType = "com.apple.product-type.tool"; + }; + 0001A1493BB5FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0002A1493BB5FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0001A1493BB5FF0001000000 /* PBXContainerItemProxy */; + }; + 0101640DBA1DFF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0102640DBA1DFF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0101640DBA1DFF0001000000 /* PBXContainerItemProxy */; + }; + FF0000000000000000000003 /* /Users/cediackermann/Projects */ = { + isa = PBXGroup; + children = ( + FE0B6A8C2E81F8461958AA13 /* m323 */, + FF0000000000000000000004 /* Products */, + FF0000000000000000000005 /* Frameworks */, + ); + path = /Users/cediackermann/Projects; + sourceTree = ""; + }; + FE0B6A8C2E81F8461958AA13 /* m323 */ = { + isa = PBXGroup; + children = ( + FE33D36F2BFBBE20D6696EBB /* Sources */, + ); + path = m323; + sourceTree = ""; + }; + FE33D36F2BFBBE20D6696EBB /* Sources */ = { + isa = PBXGroup; + children = ( + FEC186E08D3374154F0C14E0 /* Aufgabe6 */, + ); + path = Sources; + sourceTree = ""; + }; + FE51748CF30B1321F53F6034 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE7464FA6878297D0F5ECE74 /* first.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = first.swift; sourceTree = ""; }; + FEA1F73807F520BB795C2287 /* extra.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = extra.swift; sourceTree = ""; }; + FEC186E08D3374154F0C14E0 /* Aufgabe6 */ = { + isa = PBXGroup; + children = ( + FEC40CFC1F502045AD601284 /* BUILD.bazel */, + FEA1F73807F520BB795C2287 /* extra.swift */, + FEC694F5848FABAA43A28B59 /* extraUnsafe.swift */, + FE7464FA6878297D0F5ECE74 /* first.swift */, + FE51748CF30B1321F53F6034 /* main.swift */, + ); + path = Aufgabe6; + sourceTree = ""; + }; + FEC40CFC1F502045AD601284 /* BUILD.bazel */ = {isa = PBXFileReference; explicitFileType = text.script.python; path = BUILD.bazel; sourceTree = ""; }; + FEC694F5848FABAA43A28B59 /* extraUnsafe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = extraUnsafe.swift; sourceTree = ""; }; + 00FFE1E2E2E693DA11E095E7 /* first.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7464FA6878297D0F5ECE74 /* first.swift */; }; + 00FFF0EEE77C6B9C02FC1ADB /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE51748CF30B1321F53F6034 /* main.swift */; }; + 01FF43143471D66916F91B5B /* extra.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEA1F73807F520BB795C2287 /* extra.swift */; }; + FF0000000000000000000004 /* Products */ = { + isa = PBXGroup; + children = ( + 0000A1493BB50000000000FF /* Aufgabe6 */, + 0100640DBA1D0000000000FF /* Extra */, + ); + name = Products; + sourceTree = ""; + }; + FF0000000000000000000005 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + }; + rootObject = FF0000000000000000000001 /* Project object */; +} diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..08de0be --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py new file mode 100755 index 0000000..81b5d7b --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py @@ -0,0 +1,109 @@ +#!/usr/bin/python3 + +"""An lldb module that registers a stop hook to set swift settings.""" + +import lldb +import re + +# Order matters, it needs to be from the most nested to the least +_BUNDLE_EXTENSIONS = [ + ".framework", + ".xctest", + ".appex", + ".bundle", + ".app", +] + +_TRIPLE_MATCH = re.compile(r"([^-]+-[^-]+)(-\D+)[^-]*(-.*)?") + +_SETTINGS = { + "arm64-apple-macosx Aufgabe6": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx Extra": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, +} + +def __lldb_init_module(debugger, _internal_dict): + # Register the stop hook when this module is loaded in lldb + ci = debugger.GetCommandInterpreter() + res = lldb.SBCommandReturnObject() + ci.HandleCommand( + "target stop-hook add -P swift_debug_settings.StopHook", + res, + ) + if not res.Succeeded(): + print(f"""\ +Failed to register Swift debug options stop hook: + +{res.GetError()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""") + return + +def _get_relative_executable_path(module): + for extension in _BUNDLE_EXTENSIONS: + prefix, _, suffix = module.rpartition(extension) + if prefix: + return prefix.split("/")[-1] + extension + suffix + return module.split("/")[-1] + +class StopHook: + "An lldb stop hook class, that sets swift settings for the current module." + + def __init__(self, _target, _extra_args, _internal_dict): + pass + + def handle_stop(self, exe_ctx, _stream): + "Method that is called when the user stops in lldb." + module = exe_ctx.frame.module + if not module: + return + + module_name = module.file.GetDirectory() + "/" + module.file.GetFilename() + versionless_triple = _TRIPLE_MATCH.sub(r"\1\2\3", module.GetTriple()) + executable_path = _get_relative_executable_path(module_name) + key = f"{versionless_triple} {executable_path}" + + settings = _SETTINGS.get(key) + + if settings: + frameworks = " ".join([ + f'"{path}"' + for path in settings.get("f", []) + ]) + if frameworks: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-framework-search-paths {frameworks}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-framework-search-paths", + ) + + includes = " ".join([ + f'"{path}"' + for path in settings.get("s", []) + ]) + if includes: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-module-search-paths {includes}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-module-search-paths", + ) + + clang = settings.get("c") + if clang: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-extra-clang-flags '{clang}'", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-extra-clang-flags", + ) + + return True diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist new file mode 100644 index 0000000..8e6e093 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*.xctest diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist new file mode 100644 index 0000000..c0aeba8 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.appex/Contents/Frameworks/libclang_rt.asan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Contents/Frameworks/libXCTestBundleInject.dylib +/*.appex/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Contents/Frameworks/Testing.framework, +/*.appex/Contents/Frameworks/XCTAutomationSupport.framework +/*.appex/Contents/Frameworks/XCTest.framework +/*.appex/Contents/Frameworks/XCTestCore.framework +/*.appex/Contents/Frameworks/XCTestSupport.framework +/*.appex/Contents/Frameworks/XCUIAutomation.framework +/*.appex/Contents/Frameworks/XCUnit.framework +/*.appex/Frameworks/libclang_rt.asan*.dylib +/*.appex/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Frameworks/libXCTestBundleInject.dylib +/*.appex/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Frameworks/Testing.framework, +/*.appex/Frameworks/XCTAutomationSupport.framework +/*.appex/Frameworks/XCTest.framework +/*.appex/Frameworks/XCTestCore.framework +/*.appex/Frameworks/XCTestSupport.framework +/*.appex/Frameworks/XCUIAutomation.framework +/*.appex/Frameworks/XCUnit.framework +/*.appex/PlugIns/*.xctest diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh new file mode 100755 index 0000000..75e9d29 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh @@ -0,0 +1,209 @@ +# It is assumed that this file is `source`ed from another script, with the following variable set: +# +# - BAZEL_CONFIG +# - BAZEL_INTEGRATION_DIR +# - BAZEL_OUT +# - DEVELOPER_DIR +# - GENERATOR_LABEL +# - HOME +# - INTERNAL_DIR +# - OBJROOT +# - RULES_XCODEPROJ_BUILD_MODE +# - SRCROOT +# - TERM +# - USER +# - XCODE_PRODUCT_BUILD_VERSION +# - (optional) build_pre_config_flags +# - config +# - (optional) labels +# - output_groups +# - (optional) target_ids + +output_groups_flag="--output_groups=$(IFS=, ; echo "${output_groups[*]}")" +readonly output_groups_flag + +# Set `output_base` + +# In `runner.sh` the generator has the build output base set inside of the outer +# bazel's output path (`bazel-out/`). So here we need to make our output base +# changes relative to that changed path. +readonly build_output_base="$BAZEL_OUTPUT_BASE" + +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" +]]; then + # We use a different output base for Index Build to prevent normal builds and + # indexing waiting on bazel locks from the other. We nest it inside of the + # normal output base directory so that it's not cleaned up when running + # `bazel clean`, but is when running `bazel clean --expunge`. This matches + # Xcode behavior of not cleaning the Index Build outputs by default. + readonly output_base="${build_output_base%/*}/indexbuild_output_base" + readonly workspace_name="${PROJECT_DIR##*/}" + readonly output_path="$output_base/execroot/$workspace_name/bazel-out" + + # Use current path for "bazel-out/" and "external/" + # This fixes Index Build to use its version of generated and external files + readonly vfs_overlay_roots="{\"external-contents\": \"$output_path\",\"name\": \"$BAZEL_OUT\",\"type\": \"directory-remap\"},{\"external-contents\": \"$output_base/external\",\"name\": \"$BAZEL_EXTERNAL\",\"type\": \"directory-remap\"}" +else + readonly output_base="$build_output_base" + readonly output_path="$BAZEL_OUT" + readonly vfs_overlay_roots="" +fi + +# Set `bazel_cmd` for calling `bazel` + +bazelrcs=( + --noworkspace_rc + "--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj.bazelrc" +) +if [[ -s ".bazelrc" ]]; then + bazelrcs+=("--bazelrc=.bazelrc") +fi +if [[ -s "$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc" ]]; then + bazelrcs+=("--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc") +fi +readonly bazelrcs + +readonly allowed_vars=( + "BUILD_WORKSPACE_DIRECTORY" + "DEVELOPER_DIR" + "HOME" + "HTTP_PROXY" + "http_proxy" + "HTTPS_PROXY" + "https_proxy" + "NO_PROXY" + "no_proxy" + "SSH_AUTH_SOCK" + "TERM" + "USER" +) +passthrough_env=() +for var in "${allowed_vars[@]}"; do + if [[ -n "${!var:-}" ]]; then + passthrough_env+=("$var=${!var}") + fi +done + +source "$BAZEL_INTEGRATION_DIR/bazel_env.sh" + +bazel_cmd=( + env -i + "${passthrough_env[@]}" + "${envs[@]}" + "/Users/cediackermann/Projects/tools/bazel" + + # Restart bazel server if `DEVELOPER_DIR` changes to clear `developerDirCache` + "--host_jvm_args=-Xdock:name=$DEVELOPER_DIR" + + "${bazelrcs[@]}" + + --output_base "$output_base" +) +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" != "YES" +]]; then + # Allow normal builds to cancel Index Builds + bazel_cmd+=("--preemptible") +fi +readonly bazel_cmd + +readonly base_pre_config_flags=( + # Be explicit about our desired Xcode version + "--xcode_version=$XCODE_PRODUCT_BUILD_VERSION" + + # Set `DEVELOPER_DIR` in case a bazel wrapper filters it + "--repo_env=DEVELOPER_DIR=$DEVELOPER_DIR" + + # Work around https://github.com/bazelbuild/bazel/issues/8902 + # `USE_CLANG_CL` is only used on Windows, we set it here to cause Bazel to + # re-evaluate the cc_toolchain for a different Xcode version + "--repo_env=USE_CLANG_CL=$XCODE_PRODUCT_BUILD_VERSION" + "--repo_env=XCODE_VERSION=$XCODE_PRODUCT_BUILD_VERSION" + + # Don't block the end of the build for BES upload (artifacts OR events) + "--bes_upload_mode=NOWAIT_FOR_UPLOAD_COMPLETE" +) + + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + # Create VFS overlay + cat > "$OBJROOT/bazel-out-overlay.yaml" <&1 + +# Verify that we actually built what we requested + +if [[ -n "${target_ids:-}" ]]; then + if [[ ! -s "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe6/xcodeproj/xcodeproj_target_ids" ]]; then + echo "error: \"$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe6/xcodeproj/xcodeproj_target_ids\" was not created. This can happen if" \ +"you apply build-affecting flags to \"rules_xcodeproj_generator\" config, or" \ +"with the \"--@rules_xcodeproj//xcodeproj:extra_generator_flags\" flag." \ +"Please ensure that all build-affecting flags are moved to the" \ +"\"rules_xcodeproj\" config or" \ +"\"--@rules_xcodeproj//xcodeproj:extra_common_flags\" flag. If you are still" \ +"getting this error after adjusting your setup and regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi + + # We need to sort the inputs for `comm` to work on macOS 15.4+ + diff_output=$( + comm -23 \ + <(printf '%s\n' "${target_ids[@]}" | sort) \ + <(sort "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/Sources/Aufgabe6/xcodeproj/xcodeproj_target_ids") + ) + + if [ -n "$diff_output" ]; then + missing_target_ids=("${diff_output[@]}") + echo "error: There were some target IDs that weren't known to Bazel" \ +"(e.g. \"${missing_target_ids[0]}\"). Please regenerate the project to fix" \ +"this. If you are still getting this error after regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi +fi diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh new file mode 100755 index 0000000..a85cb66 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh @@ -0,0 +1,7 @@ +# Generated by rules_xcodeproj. Do not edit. +envs=( + LANG=en_US.UTF-8 + PATH=/bin:/usr/bin + BAZELISK_SKIP_WRAPPER=true + BAZEL_REAL=/Users/cediackermann/Library/Caches/bazelisk/downloads/sha256/2db883718453f0437a7bcb408e889dbf8539cdc4d61c8ebc3807a1a88d02ff08/bin/bazel +) diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py new file mode 100755 index 0000000..8fa40b2 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py @@ -0,0 +1,435 @@ +#!/usr/bin/python3 + +import datetime +import glob +import json +import os +import sys +import time +import traceback + +# Ordered the same as we order platforms in the generated Xcode project, except +# macOS is last +_DEVICE_PLATFORMS = { + "iphoneos": None, + "appletvos": None, + "watchos": None, + "macosx": None, +} +_SIMULATOR_PLATFORMS = { + "iphonesimulator": None, + "appletvsimulator": None, + "watchsimulator": None, + "macosx": None, +} + + +def _wait_for_value(calculate_value, value_name): + wait_counter = 0 + while True: + value = calculate_value() + if value: + break + if wait_counter == 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"note: ({now}) {value_name} not updated yet, waiting...", + file = sys.stderr, + flush = True, + ) + if wait_counter == 10: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +warning: ({now}) {value_name} still not updated after 10 seconds. If happens \ +frequently, or the cache is never created, please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + flush = True, + ) + time.sleep(1) + wait_counter += 1 + if wait_counter > 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +note: ({now}) {value_name} updated after {wait_counter} seconds.""", + file = sys.stderr, + flush = True, + ) + return value + + +def _get_build_request( + xcode_version, + objroot, + build_request_min_ctime): + if xcode_version < 1430: + # Before Xcode 14.3 + def wait_for_description(): + build_description_cache = max( + glob.iglob( + f"{objroot}/XCBuildData/BuildDescriptionCacheIndex-*", + ), + key = os.path.getctime, + ) + if (os.path.getctime(build_description_cache) >= + build_request_min_ctime): + return build_description_cache + return None + + build_description_cache = ( + _wait_for_value(wait_for_description, "BuildDescriptionCacheIndex") + ) + with open(build_description_cache, 'rb') as f: + f.seek(-32, os.SEEK_END) + build_request_id = f.read().decode('ASCII') + + build_request_file = ( + f"{objroot}/XCBuildData/{build_request_id}-buildRequest.json" + ) + def wait_for_build_request_file(): + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + return None + + return _wait_for_value( + wait_for_build_request_file, + f"\"{build_request_file}\"", + ) + + def wait_for_build_request(): + try: + xcbuilddata = max( + glob.iglob(f"{objroot}/XCBuildData/*.xcbuilddata"), + key = os.path.getctime, + ) + if os.path.getctime(xcbuilddata) < build_request_min_ctime: + return None + except (ValueError, FileNotFoundError, OSError): + # ValueError: no .xcbuilddata files yet (empty glob) + # FileNotFoundError/OSError: TOCTOU race - file deleted between glob and getctime + return None + build_request_file = f"{xcbuilddata}/build-request.json" + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + return None + + return _wait_for_value( + wait_for_build_request, + "newest 'buildRequest.json' file", + ) + + +def _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids): + # Xcode gets "stuck" in the `buildFiles` or `build` command for + # top-level targets, so we can't reliably change commands here. Leaving + # the code in place in case this is fixed in the future, or we want to + # do something similar in an XCBBuildService proxy. + # + # command = ( + # build_request.get("_buildCommand2", {}).get("command", "build") + # ) + command = "build" + parameters = build_request["parameters"] + platform = ( + parameters["activeRunDestination"]["platform"] + ) + configuration_name = parameters["configurationName"] + + labels_and_target_ids = [] + for target in build_request["configuredTargets"]: + label = guid_labels.get(target["guid"]) + if not label: + # `BazelDependency` and the like + continue + full_target_target_ids = guid_target_ids[target["guid"]] + target_target_ids = ( + full_target_target_ids.get(command) or + # Will only be `null` if `command == "buildFiles"` and there + # isn't a different compile target id + full_target_target_ids["build"] + ) + target_ids = _select_target_ids( + target_target_ids[configuration_name], + platform, + ) + for target_id in target_ids: + labels_and_target_ids.append((label, target_id)) + + if not labels_and_target_ids: + print( + """\ +error: Failed to determine labels and targets. Note, currently `.xcworkspace`s \ +aren't supported. Please make sure you are opening the generated \ +`.xcodeproj` file bundle directly. If you are, try using the "Clean Build \ +Folder" command instead (⇧ ⌘ K). If you still get this error after that, then \ +please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + + return labels_and_target_ids + + +def _calculate_guid_labels_and_target_ids(base_objroot): + pif_cache = f"{base_objroot}/XCBuildData/PIFCache" + project_cache = f"{pif_cache}/project" + target_cache = f"{pif_cache}/target" + + # The PIF cache will only be created before the `SetSessionUserInfo` + # command, which normally happens when a project is opened. If Derived Data + # is cleared while the project is open + if not (os.path.exists(project_cache) and os.path.exists(target_cache)): + print( + f"""\ +error: PIFCache ({pif_cache}) doesn't exist. If you manually cleared Derived \ +Data, you need to close and re-open the project for the PIFCache to be created \ +again. Using the "Clean Build Folder" command instead (⇧ ⌘ K) won't trigger \ +this error. If this error still happens after re-opening the project, please \ +file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + project_pif = max( + glob.iglob(f"{project_cache}/*"), + key = os.path.getctime, + ) + + guid_payload_parent = f"{base_objroot}/guid_payload" + guid_payload_path = f"""\ +{guid_payload_parent}/{os.path.basename(project_pif)}_v2.json""" + + if os.path.exists(guid_payload_path): + with open(guid_payload_path, encoding = "utf-8") as f: + payload = json.load(f) + return payload["labels"], payload["targetIds"] + + with open(project_pif, encoding = "utf-8") as f: + project_pif = json.load(f) + + targets = project_pif["targets"] + + guid_labels = {} + guid_target_ids = {} + for target_name in targets: + target_file = f"{target_cache}/{target_name}-json" + with open(target_file, encoding = "utf-8") as f: + target_pif = json.load(f) + + label = None + build_target_ids = {} + compile_target_ids = {} + for configuration in target_pif["buildConfigurations"]: + config_build_target_ids = {"key": "BAZEL_TARGET_ID"} + config_compile_target_ids = {"key": "BAZEL_COMPILE_TARGET_IDS"} + for key, value in configuration["buildSettings"].items(): + if key.startswith("BAZEL_TARGET_ID"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_TARGET_ID)` is used later + # in this processing to pull from an inherited setting. + if value == "$(BAZEL_TARGET_ID)": + target_ids = value + else: + # This is only a single value but the later parsing of + # these target ids assumes a list. + target_ids = [value] + + config_build_target_ids[_platform_from_build_key(key)] = ( + target_ids + ) + elif key.startswith("BAZEL_COMPILE_TARGET_IDS"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_COMPILE_TARGET_IDS)` is + # used later in this processing to pull from an inherited + # setting. + if value == "$(BAZEL_COMPILE_TARGET_IDS)": + target_ids = "$(BAZEL_COMPILE_TARGET_IDS)" + else: + # Target identifiers contain a space but are space separated. + # Split on all spaces then rejoin across the identifier pairs. + target_ids = value.split(" ") + target_ids = [ + " ".join(target_ids[i:i+2]) + for i in range(0, len(target_ids), 2) + ] + + config_compile_target_ids[_platform_from_compile_key(key)] = ( + target_ids + ) + elif key == "BAZEL_LABEL": + label = value + configuration_name = configuration["name"] + build_target_ids[configuration_name] = config_build_target_ids + compile_target_ids[configuration_name] = config_compile_target_ids + + if not label: + # `BazelDependency` and the like + continue + + target_ids = { + "build": build_target_ids, + } + if len(compile_target_ids) > 1: + target_ids["buildFiles"] = compile_target_ids + + guid = target_pif["guid"] + guid_labels[guid] = label + guid_target_ids[guid] = target_ids + + os.makedirs(guid_payload_parent, exist_ok = True) + with open(guid_payload_path, "w", encoding = "utf-8") as f: + payload = { + "labels": guid_labels, + "targetIds": guid_target_ids, + } + json.dump(payload, f) + + return guid_labels, guid_target_ids + + +def _platform_from_build_key(key): + if key.startswith("BAZEL_TARGET_ID[sdk="): + return key[20:-2] + return "" + + +def _platform_from_compile_key(key): + if key.startswith("BAZEL_COMPILE_TARGET_IDS[sdk="): + return key[29:-2] + return "" + + +def _select_target_ids(target_ids, platform): + key = target_ids["key"] + + platforms = {platform: None} + + # We need to try other similar platforms (i.e. other simulator platforms if + # `platform`` is for a simulator). This is to support schemes with targets + # of multiple platforms in them. Because `dict` is insertion ordered, + # `platform` will be checked first. + platforms.update(_similar_platforms(platform)) + + for platform in platforms: + platform_target_ids = target_ids.get(platform) + if platform_target_ids: + if platform_target_ids == f"$({key})": + return target_ids[""] + return platform_target_ids + return target_ids[""] + + +def _similar_platforms(platform): + if platform == "macosx" or "simulator" in platform: + return _SIMULATOR_PLATFORMS + return _DEVICE_PLATFORMS + + +def _main( + xcode_version, + objroot, + base_objroot, + marker_file, + prefixes_str): + if not os.path.exists(marker_file): + return + + build_request_min_ctime = os.path.getctime(marker_file) + + try: + xcode_version = int(xcode_version) + except ValueError: + print( + """ +warning: xcode_version was not an integer. Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""", + file = sys.stderr, + ) + xcode_version = 9999 + + prefixes = prefixes_str.split(",") + + try: + build_request = _get_build_request( + xcode_version, + objroot, + build_request_min_ctime, + ) + guid_labels, guid_target_ids = ( + _calculate_guid_labels_and_target_ids(base_objroot) + ) + except Exception: + print( + f"""\ +error: Failed to calculate labels and target ids from PIFCache: +{traceback.format_exc()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + labels_and_target_ids = _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids, + ) + + print("\n".join( + [ + f"{label}\n{prefix} {id}" + for label, id in labels_and_target_ids + for prefix in prefixes + ], + )) + + +if __name__ == "__main__": + _main( + # XCODE_VERSION_ACTUAL + sys.argv[1], + # non_preview_objroot + sys.argv[2], + # base_objroot + sys.argv[3], + # build_marker_file + sys.argv[4], + # output_group_prefixes + sys.argv[5], + ) diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/cc.dia b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/cc.dia new file mode 100644 index 0000000..c85cbfc Binary files /dev/null and b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/cc.dia differ diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/clang.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/clang.sh new file mode 100755 index 0000000..a327a2a --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/clang.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -euo pipefail + +while test $# -gt 0 +do + case $1 in + -MF) + shift + touch "$1" + ;; + --serialize-diagnostics) + shift + cp "${BASH_SOURCE%/*}/cc.dia" "$1" + ;; + *.o) + break + ;; + -v) + # TODO: Make this work with custom toolchains + DEV_DIR_PREFIX=$(awk '{ sub(/.*-isysroot /, ""); sub(/.Contents\/Developer.*/, ""); print}' <<< "${@:1}") + clang="$DEV_DIR_PREFIX/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + "$clang" "${@:1}" + break + ;; + esac + + shift +done diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh new file mode 100755 index 0000000..95a7457 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +function patch_dsym() { + local dsym_name="$1" + + shopt -s extglob + local binary_name="${dsym_name%.dSYM}" + binary_name="${binary_name%@(.app|.appex|.bundle|.dext|.kext|.framework|.pluginkit|.systemextension|.xctest|.xpc)}" + shopt +s extglob + + local binary_path="${dsym_name}/Contents/Resources/DWARF/${binary_name}" + + if [[ ! -f "$binary_path" ]]; then + echo "dSYM DWARF ${binary_path} does not exist." \ + "Skip dSYM patch." + return 1 + fi + + local dwarf_uuid + dwarf_uuid=$(dwarfdump --uuid "${binary_path}" | cut -d ' ' -f 2) + if [[ -z "${dwarf_uuid// /}" ]]; then + echo "Failed to get dSYM uuid." \ + "Skip dSYM patch." + return 1 + fi + + cat > "${dsym_name}/Contents/Resources/${dwarf_uuid}.plist" < + + + DBGVersion + 3 + DBGSourcePathRemapping + + ./bazel-out/ + $BAZEL_OUT/ + ./external/ + $BAZEL_EXTERNAL/ + ./ + $SRCROOT/ + + + +EOF +} + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ -n "${BAZEL_OUTPUTS_DSYM:-}" ]]; then + cd "${BAZEL_OUT%/*}" + + # shellcheck disable=SC2046 + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --archive \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + $(xargs -n1 <<< "$BAZEL_OUTPUTS_DSYM") \ + "$TARGET_BUILD_DIR" + + cd "${TARGET_BUILD_DIR}" + + export -f patch_dsym + # shellcheck disable=SC2016 + xargs -n1 sh -c 'patch_dsym $(basename "$1")' _ \ + <<< "$BAZEL_OUTPUTS_DSYM" +fi diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh new file mode 100755 index 0000000..6c1ce5c --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +set -euo pipefail + +# readonly forced_swift_compile_file="$1" +readonly exclude_list="$2" + +# # Touching this file on an error allows indexing to work better +# trap 'echo "private let touch = \"$(date +%s)\"" > "$DERIVED_FILE_DIR/$forced_swift_compile_file"' ERR + +readonly test_frameworks=( + "libXCTestBundleInject.dylib" + "libXCTestSwiftSupport.dylib" + "IDEBundleInjection.framework" + "XCTAutomationSupport.framework" + "Testing.framework" + "XCTest.framework" + "XCTestCore.framework" + "XCTestSupport.framework" + "XCUIAutomation.framework" + "XCUnit.framework" +) + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ "$ACTION" != indexbuild ]]; then + # Copy product + if [[ -n ${BAZEL_OUTPUTS_PRODUCT:-} ]]; then + cd "${BAZEL_OUTPUTS_PRODUCT%/*}" + + if [[ -f "$BAZEL_OUTPUTS_PRODUCT_BASENAME" ]]; then + # Product is a binary, so symlink instead of rsync, to allow for Bazel-set + # rpaths to work + ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME" + else + # Product is a bundle + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + "$BAZEL_OUTPUTS_PRODUCT_BASENAME" \ + "$TARGET_BUILD_DIR" + + if [[ -n "${TEST_HOST:-}" ]]; then + # We need to re-sign test frameworks that Xcode placed into the test + # host un-signed + readonly test_host_app="${TEST_HOST%/*}" + + # Only engage signing workflow if the test host is signed + if [[ -f "$test_host_app/embedded.mobileprovision" ]]; then + codesigning_authority=$(codesign -dvv "$TEST_HOST" 2>&1 >/dev/null | /usr/bin/sed -n -E 's/^Authority=(.*)/\1/p'| head -n 1) + + for framework in "${test_frameworks[@]}"; do + framework="$test_host_app/Frameworks/$framework" + if [[ -e "$framework" ]]; then + codesign -f \ + --preserve-metadata=identifier,entitlements,flags \ + --timestamp=none \ + --generate-entitlement-der \ + -s "$codesigning_authority" \ + "$framework" + fi + done + fi + fi + + # Incremental installation can fail if an embedded bundle is recompiled but + # the Info.plist is not updated. This causes the delta bundle that Xcode + # actually installs to not have a bundle ID for the embedded bundle. We + # avoid this potential issue by always including the Info.plist in the delta + # bundle by touching them. + # Source: https://github.com/bazelbuild/tulsi/commit/27354027fada7aa3ec3139fd686f85cc5039c564 + # TODO: Pass the exact list of files to touch to this script + readonly plugins_dir="$TARGET_BUILD_DIR/${PLUGINS_FOLDER_PATH:-}" + if [[ -d "$plugins_dir" ]]; then + find "$plugins_dir" -depth 2 -name "Info.plist" -exec touch {} \; + fi + + # Xcode Previews has a hard time finding frameworks (`@rpath`) when using + # framework schemes, so let's symlink them into + # `$TARGET_BUILD_DIR` (since we modify `@rpath` to always include + # `@loader_path/SwiftUIPreviewsFrameworks`) + if [[ "${ENABLE_PREVIEWS:-}" == "YES" && \ + -n "${PREVIEW_FRAMEWORK_PATHS:-}" ]]; then + mkdir -p "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + cd "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + + # shellcheck disable=SC2016 + xargs -n1 sh -c 'ln -shfF "$1" $(basename "$1")' _ \ + <<< "$PREVIEW_FRAMEWORK_PATHS" + fi + fi + fi +fi + +# TODO: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/402 +# Copy diagnostics, and on a change +# `echo "private let touch = \"$(date +%s)\"" > $DERIVED_FILE_DIR/$forced_swift_compile_file"` +# See git blame for this comment for an example diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh new file mode 100755 index 0000000..dcec422 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +readonly execution_root="$PROJECT_DIR" +readonly build_external="$execution_root/external" + +{ + +# Set `CWD` to `$execution_root` so relative paths in binaries work +# +# This is needed because we use the `oso_prefix_is_pwd` feature, which makes the +# paths to archives relative to the exec root. +echo "platform settings -w \"$execution_root\"" + +# "Undo" `-debug-prefix-map` for breakpoints +# +# This needs to cause the files to match exactly what Xcode set for breakpoints, +# which is why we don't use `$execution_root` here. Xcode will set the path +# based on the way you opened a file. If you open a file via the Project +# navigator, or indexing (e.g. Jump to Definition), it will use the paths +# specified below. + +# `bazel-out` when set from Project navigator or swiftsourcefile +echo "settings set target.source-map ./bazel-out/ \"$BAZEL_OUT\"" + +# `external` when set from Project navigator +echo "settings append target.source-map ./external/ \"$BAZEL_EXTERNAL\"" +# `external` when set from swiftsourcefile +echo "settings append target.source-map ./external/ \"$build_external\"" + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + readonly output_base="${execution_root%/*/*}" + + readonly workspace_name="${execution_root##*/}" + readonly index_execution_root="${output_base%/*}/indexbuild_output_base/execroot/$workspace_name" + + readonly index_bazel_out="$index_execution_root/bazel-out" + readonly index_external="$index_execution_root/external" + + mkdir -p "$index_bazel_out" + mkdir -p "$index_external" + + # `bazel-out` when set from indexing opened file + echo "settings append target.source-map ./bazel-out/ \"$index_bazel_out\"" + # `external` when set from indexing opened file + echo "settings append target.source-map ./external/ \"$index_external\"" +fi + +# Project files and locally resolved external repositories +# +# lldb seems to match breakpoints based on the second argument, using a simple +# prefix check that doesn't take into account the trailing slash. This means +# that we have to order the source-map settings so that the longest paths are +# first, otherwise an earlier setting can prevent a later setting from matching. +if [[ -n "${RESOLVED_REPOSITORIES:-}" ]]; then + # `external` for local repositories when set from Project navigator, + # and the project root + while IFS='' read -r x; do repos+=("$x"); done < <(xargs -n1 <<< "$RESOLVED_REPOSITORIES") + for (( i=0; i<${#repos[@]}; i+=2 )); do + prefix="${repos[$i]}" + path="${repos[$i+1]}" + echo "settings append target.source-map \"$prefix/\" \"$path\"" + done +fi + +# Import swift_debug_settings.py +# +# This Python module sets a stop hook, that when hit, sets the Swift debug +# settings (i.e. `target.swift-*``) for the module of the current frame. This +# fixes debugging when using `-serialize-debugging-options`. +echo "command script import \"$OBJROOT/$CONFIGURATION/swift_debug_settings.py\"" + +} > "$BAZEL_LLDB_INIT" diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist new file mode 100644 index 0000000..a2d6c45 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist @@ -0,0 +1,2 @@ +/*.framework/Modules/*** +/*.framework/SwiftUIPreviewsFrameworks/*** diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh new file mode 100755 index 0000000..a8506e4 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh @@ -0,0 +1,217 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +# Calculate Bazel `--output_groups` + +if [ "$ACTION" == "indexbuild" ]; then + echo >&2 "error: \`BazelDependencies\` should not run during Index Build." \ +"Please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" + exit 1 +else + if [[ "${ENABLE_PREVIEWS:-}" == "YES" ]]; then + # Compile params, products (i.e. bundles) and index store data, and link + # params + readonly output_group_prefixes="bc,bp,bl" + else + # Products (i.e. bundles) and index store data + readonly output_group_prefixes="bp" + fi + + # In Xcode 14 the "Index" directory was renamed to "Index.noindex". + # `$INDEX_DATA_STORE_DIR` is set to `$OBJROOT/INDEX_DIR/DataStore`, so we can + # use it to determine the name of the directory regardless of Xcode version. + readonly index_dir="${INDEX_DATA_STORE_DIR%/*}" + readonly index_dir_name="${index_dir##*/}" + + # Xcode doesn't adjust `$OBJROOT` in scheme action scripts when building for + # previews. So we need to look in the non-preview build directory for this file. + readonly non_preview_objroot="${OBJROOT/\/Intermediates.noindex\/Previews\/*//Intermediates.noindex}" + readonly base_objroot="${non_preview_objroot/\/$index_dir_name\/Build\/Intermediates.noindex//Build/Intermediates.noindex}" + readonly build_marker_file="$non_preview_objroot/build_marker" + + # We need to read from `$output_groups_file` as soon as possible, as concurrent + # writes to it can happen during indexing, which breaks the off-by-one-by-design + # nature of it + IFS=$'\n' read -r -d '' -a labels_and_output_groups < \ + <( "$CALCULATE_OUTPUT_GROUPS_SCRIPT" \ + "$XCODE_VERSION_ACTUAL" \ + "$non_preview_objroot" \ + "$base_objroot" \ + "$build_marker_file" \ + $output_group_prefixes \ + && printf '\0' ) + + readonly outputgroup_regex='[^\ ]+ @{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + raw_labels=() + raw_target_ids=() + output_groups=("index_import" "target_ids_list") + indexstores_filelists=() + for (( i=0; i<${#labels_and_output_groups[@]}; i+=2 )); do + raw_labels+=("${labels_and_output_groups[i]}") + + output_group="${labels_and_output_groups[i+1]}" + raw_target_ids+=("${output_group#* }") + output_groups+=("$output_group") + + output_type="${output_group%% *}" + + if [[ "$output_type" == 'xi' || "$output_type" == 'bi' ]]; then + if [[ $output_group =~ $outputgroup_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-${output_type}.filelist" + + indexstores_filelists+=("$filelist") + fi + fi + done + readonly indexstores_filelists + + if [ "${#output_groups[@]}" -eq 1 ]; then + echo "BazelDependencies invoked without any output groups set." \ + "Exiting early." + exit + else + labels=() + while IFS= read -r -d '' label; do + labels+=("$label") + done < <(printf "%s\0" "${raw_labels[@]}" | sort -uz) + + target_ids=() + while IFS= read -r -d '' target_id; do + target_ids+=("$target_id") + done < <(printf "%s\0" "${raw_target_ids[@]}" | sort -uz) + fi +fi + +# Build + +build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,sourceinfo} files for indexing + # - .a and .swiftmodule files for lldb + # - primary compilation input files (.c, .C, .cc, .cl, .cpp, .cu, .cxx, .c++, + # .m, .mm, .swift) for Xcode build input checking + # - files needed for Clang importer (headers, modulemaps, yaml files, etc.) + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +apply_sanitizers=1 +if [ "$ACTION" == "indexbuild" ]; then + readonly config="${BAZEL_CONFIG}_indexbuild" + + # Index Build doesn't need sanitizers + apply_sanitizers=0 +elif [ "${ENABLE_PREVIEWS:-}" == "YES" ]; then + readonly config="${BAZEL_CONFIG}_swiftuipreviews" +elif [ "${CLANG_COVERAGE_MAPPING:-}" == YES ] && [ "${BAZEL_SUPPRESS_COVERAGE_BUILD:-}" != YES ]; then + # Code coverage build + # + # CLANG_COVERAGE_MAPPING is set to YES when the active scheme's test action has code coverage enabled. It is configured + # irrespective of the value of ENABLE_CODE_COVERAGE, and of whether the current build action is for testing or not. + # + # We would rather use ENABLE_CODE_COVERAGE here, but the value of that setting is often YES even when code coverage is not + # enabled in the active scheme. + readonly config="${BAZEL_CONFIG}_coverage" + + echo "warning: Code coverage is enabled. In order to maintain compatibility with Xcode, the instrumented build is not hermetic. Remote cache performance will be affected." >&2 +else + readonly config="_${BAZEL_CONFIG}_build" +fi + +# Respect the "Continue building after errors" setting +continue_building_value="$(defaults read com.apple.dt.Xcode IDEBuildingContinueBuildingAfterErrors 2>/dev/null || echo 0)" +if [ "$continue_building_value" == "1" ]; then + build_pre_config_flags+=("--keep_going") +else + build_pre_config_flags+=("--nokeep_going") +fi + +# Runtime Sanitizers +if [[ $apply_sanitizers -eq 1 ]]; then + if [ "${ENABLE_ADDRESS_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=address + --linkopt=-fsanitize=address + --@@rules_swift+//swift:copt=-sanitize=address + --copt=-Wno-macro-redefined + --copt=-D_FORTIFY_SOURCE=0 + ) + fi + if [ "${ENABLE_THREAD_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=thread + --linkopt=-fsanitize=thread + --@@rules_swift+//swift:copt=-sanitize=thread + ) + fi + if [ "${ENABLE_UNDEFINED_BEHAVIOR_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=undefined + --linkopt=-fsanitize=undefined + ) + fi +fi +readonly build_pre_config_flags + +# `bazel_build.sh` sets `output_path` +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Async actions +# +# For these commands to run in the background, both stdout and stderr need to be +# redirected, otherwise Xcode will block the run script. + +readonly log_dir="$OBJROOT/rules_xcodeproj_logs" +mkdir -p "$log_dir" + +# Report errors from previous async actions +shopt -s nullglob +for log in "$log_dir"/*.async.log; do + if [[ -s "$log" ]]; then + command=$(basename "${log%.async.log}") + echo "warning: Previous run of \"$command\" had output:" >&2 + sed "s|^|warning: |" "$log" >&2 + echo "warning: If you believe this is a bug, please file a report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + fi +done + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + fi +fi diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh new file mode 100755 index 0000000..aa6f267 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +readonly config="${BAZEL_CONFIG}_indexbuild" + +# Compiled outputs (i.e. swiftmodules) and generated inputs +output_groups=( + # Compile params + "bc $BAZEL_TARGET_ID" + # Indexstores and their filelist. Requesting indexstore directories triggers + # transitive Swift compilation (producing swiftmodules, indexstores, and + # generated headers) without linking, avoiding large product binaries. We use + # `--remote_download_regex` below to download the files we care + # about. + "bi $BAZEL_TARGET_ID" +) + +indexstores_filelists=() +if [[ "$IMPORT_INDEX_BUILD_INDEXSTORES" == "YES" ]]; then + output_groups+=( + "index_import" + ) + + readonly targetid_regex='@{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + if [[ "$BAZEL_TARGET_ID" =~ $targetid_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-bi.filelist" + + indexstores_filelists+=("$filelist") + fi + + readonly indexstores_regex='.*\.indexstore/.*|' +else + readonly indexstores_regex='' +fi + +readonly build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,module,sourceinfo} files for indexing + # - compilation input files (.cfg, .c, .C .cc, .cl, .cpp, .cu, .cxx, .c++, + # .def, .h, .H, .hh, .hpp, .hxx, .h++, .hmap, .ilc, .inc, .ipp, .tcc, .tlh, + # .tpp, .m, .modulemap, .mm, .pch, .swift, .yaml) for index compilation + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=${indexstores_regex}.*\.(cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" + fi +fi diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/import_indexstores b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/import_indexstores new file mode 100755 index 0000000..a2bfe93 Binary files /dev/null and b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/import_indexstores differ diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/ld b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/ld new file mode 100755 index 0000000..2156250 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/ld @@ -0,0 +1,30 @@ +#!/bin/bash + +set -euo pipefail + +passthrough_args=("${@:1}") + +while test $# -gt 0 +do + case $1 in + *_dependency_info.dat) + ld_version=$(ld -v 2>&1 | grep ^@) + printf "\0%s\0" "$ld_version" > "$1" + break + ;; + + -isysroot) + shift + # PATH/DEVELOPER_DIR isn't set when this is called, so we need to calculate + # the developer dir from the sysroot to invoke clang (used below) + developer_dir="${1/\/Platforms\/*/}" + ;; + + *.preview-thunk.dylib) + # Pass through for SwiftUI Preview thunk compilation + # TODO: Make this work with custom toolchains + exec "$developer_dir/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "${passthrough_args[@]}" + ;; + esac + shift +done diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/libtool b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/libtool new file mode 100755 index 0000000..ec4d7df --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/libtool @@ -0,0 +1,21 @@ +#!/bin/bash + +set -euo pipefail + +original_args=("$@") + +while test $# -gt 0 +do + case $1 in + -V) + # Xcode 15+ needs to know the version of libtool + exec libtool "${original_args[@]}" + ;; + *_dependency_info.dat) + printf "\0 \0" > "$1" + break + ;; + esac + + shift +done diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py new file mode 100755 index 0000000..ff05b5a --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py @@ -0,0 +1,124 @@ +#!/usr/bin/python3 + +import os +import re +import subprocess +import sys +from typing import List +import signal + + +STRIP_COLOR_RE = re.compile(r"\x1b\[[0-9;]{1,}[A-Za-z]") +RELATIVE_DIAGNOSTICS_RE = re.compile( + r""" + ^ + (?P.+?:\d+(?::\d+)?:\s) # Capture location (e.g. "foo/bar:12:3: ") + (?:fatal\s)? # Dropping "fatal " + (?P(?:error|warning):\s) # Capture severity + (?P.*) # Capture the rest of the message + """, + re.VERBOSE, +) + +def _uppercase_first_letter(s: str) -> str: + return s[:1].upper() + s[1:] + +def _main(command: List[str]) -> None: + + def _signal_handler(signum, frame): + """Print signal information and ignore the signal.""" + signal_name = signal.Signals(signum).name + print(f"\nReceived signal {signal_name} ({signum})\n", file=sys.stderr) + return + + # Set up signal handler for SIGINT + signal.signal(signal.SIGINT, _signal_handler) + + srcroot = os.getenv("SRCROOT") + if not srcroot: + sys.exit("SRCROOT environment variable must be set") + + execution_root = os.getenv("PROJECT_DIR") + if not execution_root: + sys.exit("PROJECT_DIR environment variable must be set") + + bazel_out_directory = os.getenv("BAZEL_OUT") + if not bazel_out_directory: + sys.exit("BAZEL_OUT environment variable must be set") + bazel_out_prefix = bazel_out_directory[:-len("/bazel-out")] + if not bazel_out_prefix.startswith("/"): + bazel_out_prefix = f"{srcroot}/{bazel_out_prefix}" + + external_directory = os.getenv("BAZEL_EXTERNAL") + if not external_directory: + sys.exit("BAZEL_EXTERNAL environment variable must be set") + external_prefix = bazel_out_directory[:-len("/external")] + if not external_prefix.startswith("/"): + external_prefix = f"{srcroot}/{external_prefix}" + + should_strip_color = os.getenv("COLOR_DIAGNOSTICS", default="YES") != "YES" + + has_relative_diagnostic = False + + def _replacement(match: re.Match) -> str: + message = f"""\ +{match.group("loc")}{match.group("sev")}{_uppercase_first_letter(match.group("msg"))}\ +""" + + if message.startswith(execution_root): + # VFS overlays can make paths absolute, so make them relative again + message = message[(len(execution_root) + 1):] + + if message.startswith("/"): + # If still an absolute path, don't add a prefix + return message + + if message.startswith("bazel-out/"): + prefix = bazel_out_prefix + elif message.startswith("external/"): + prefix = external_prefix + else: + prefix = srcroot + + return f"{prefix}/{message}" + + process = subprocess.Popen( + command, bufsize=1, stderr=subprocess.PIPE, universal_newlines=True + ) + assert process.stderr + + def _process_log_line(line: str): + input_line = line.rstrip() + + if should_strip_color: + input_line = STRIP_COLOR_RE.sub("", input_line) + + if not input_line: + return + + output_line = RELATIVE_DIAGNOSTICS_RE.sub(_replacement, input_line) + # Record if we have performed a relative diagnostic substitution. + if output_line != input_line: + nonlocal has_relative_diagnostic + has_relative_diagnostic = True + + print(output_line, flush=True) + + while process.poll() is None: + _process_log_line(process.stderr.readline()) + + for line in process.stderr: + _process_log_line(line) + + # If the Bazel invocation failed and there was no formatted error found, + # print a nicer error message instead of a cryptic in Xcode: + # 'Command PhaseScriptExecution failed with a nonzero exit code' + if process.returncode != 0 and not has_relative_diagnostic: + print("error: The bazel build failed, please check the report navigator, " + "which may have more context about the failure.") + + sys.exit(process.returncode) + + +if __name__ == "__main__": + _main(sys.argv[1:]) diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/rsync b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/rsync new file mode 100755 index 0000000..f617c07 Binary files /dev/null and b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/rsync differ diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/swiftc b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/swiftc new file mode 100755 index 0000000..9fb0d47 Binary files /dev/null and b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/swiftc differ diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist new file mode 100644 index 0000000..6f37a4d --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist @@ -0,0 +1,27 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*** +/*.app/_WatchKitStub/*** +/*.app/PlugIns/*.xctest diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc new file mode 100644 index 0000000..a611ea8 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc @@ -0,0 +1,139 @@ +### `--config=rules_xcodeproj` +# +# Used directly when doing a normal build, but it is also the base config of all +# the `rules_xcodeproj_*` configs. Adjust this config if you want something to +# apply to all builds (which should be most settings). + +common:rules_xcodeproj --verbose_failures + +# Increase the default file digest cache size to 500k entries, as 50k (the +# default) is too small for large projects. +common:rules_xcodeproj --cache_computed_file_digests=500000 + +# We default to `dbg` since debugging is broken otherwise +common:rules_xcodeproj --compilation_mode=dbg + +# Xcode builds shouldn't mess with the workspace's symlinks +common:rules_xcodeproj --experimental_convenience_symlinks=ignore + +# Projects with large C/C++ target command-lines can fail to generate due +# without using params files. While the targets themselves might use params +# files, currently `Action.args` won't unless +# `--experimental_use_cpp_compile_action_args_params_file` is set. +# https://github.com/bazelbuild/bazel/issues/20746 would allow us to remove the +# need for this flag. +common:rules_xcodeproj --experimental_use_cpp_compile_action_args_params_file + +# Not using `--define=apple.experimental.tree_artifact_outputs=1` is slow (we +# have to unzip an archive on each build). If this doesn't work for your +# project, you can set `--define=apple.experimental.tree_artifact_outputs=0` +# on `common:rules_xcodeproj` in your `.bazelrc` or `xcodeproj.bazelrc` file. +common:rules_xcodeproj --define=apple.experimental.tree_artifact_outputs=1 + +# Fix Test Issue navigation +common:rules_xcodeproj --features=apple.swizzle_absolute_xcttestsourcelocation + +# `oso_prefix_is_pwd` removes absolute paths in debug info, which increases +# cache hit rates. We "undo" this in `bazel.lldbinit`, so debugging still works. +common:rules_xcodeproj --features=oso_prefix_is_pwd + +# `relative_ast_path` uses relative paths when passing `--add_ast_path` to the +# linker, which increases cache hit rates. We "undo" this in `bazel.lldbinit`, +# so debugging still works. +common:rules_xcodeproj --features=relative_ast_path + +# `swift.cacheable_swiftmodules` passes `-no-serialize-debugging-options` to +# `swiftc`, which fixes lldb crashes and increases cache hit rates. We "undo" +# this in `swift_debug_settings.py`, so debugging still works. +common:rules_xcodeproj --features=swift.cacheable_swiftmodules + +# `swift.index-while-building` passes `-index-store-path` to `swiftc`, which +# generates index store data. We enable this globally, because we import indexes +# in Index Build as well. And even if we didn't, we would still want it enabled +# to get cache hits between normal and Index Build builds. +common:rules_xcodeproj --features=swift.index_while_building +common:rules_xcodeproj --features=swift.use_global_index_store + +# Removes potentially large unneeded event from the BEP +common:rules_xcodeproj --nolegacy_important_outputs + +# `--show_result=0` prevents showing the spec.json and intermediate `.xcodeproj` +# in the logs when generating, and all of the many outputs when building +common:rules_xcodeproj --show_result=0 + +# Disable sandboxing. Sandboxing on macOS is still very slow. +common:rules_xcodeproj --noworker_sandboxing +common:rules_xcodeproj --spawn_strategy=remote,worker,local + +# Needed to download aspect output groups +build:rules_xcodeproj --remote_download_outputs=toplevel + +### `--config=rules_xcodeproj_generator` +# +# Used when generating a project. + +common:rules_xcodeproj_generator --config=rules_xcodeproj + +### `--config=rules_xcodeproj_indexbuild` +# +# Used when doing an Index Build. + +common:rules_xcodeproj_indexbuild --config=rules_xcodeproj + +# Disable BES for Index Builds, as it runs a lot, and isn't user invoked +common:rules_xcodeproj_indexbuild --bes_backend= --bes_results_url= + +### `--config=rules_xcodeproj_coverage` +# +# Used when doing building for code coverage. + +common:rules_xcodeproj_coverage --config=rules_xcodeproj + +# Enable features that allow for building for instrumentation. +# +# Of particular note are the (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +# features, which remap the execroot during the build as the absolute, canonical path +# to the source root. +# +# This approach breaks remote caching when building for testing and codeCoverageEnabled +# is set to YES, but does not affect other builds (for running, or for testing without +# coverage). +common:rules_xcodeproj_coverage --features=coverage +common:rules_xcodeproj_coverage --features=llvm_coverage_map_format +common:rules_xcodeproj_coverage --features=_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=swift.coverage +common:rules_xcodeproj_coverage --features=swift._coverage_prefix_map_absolute_sources_non_hermetic + +# Disable features that interfere with (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=-coverage_prefix_map +common:rules_xcodeproj_coverage --features=-file_prefix_map +common:rules_xcodeproj_coverage --features=-swift.coverage_prefix_map +common:rules_xcodeproj_coverage --features=-swift.file_prefix_map + +### `--config=rules_xcodeproj_swiftuipreviews` +# +# Used when doing a Xcode Previews build. + +common:rules_xcodeproj_swiftuipreviews --config=rules_xcodeproj + +# Allow frameworks to find framework dependencies when running a preview +# See `$PROJECT_FILE_PATH/rules_xcodeproj/bazel/copy_outputs.sh` for more info +common:rules_xcodeproj_swiftuipreviews --linkopt="-Wl,-rpath,@loader_path/SwiftUIPreviewsFrameworks" + +# `swiftc` flags needed for SwiftUI Previews +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-implicit-dynamic +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-private-imports +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-dynamic-replacement-chaining + +### `--config=_rules_xcodeproj_build` +# +# Private implementation detail. Don't adjust this config, adjust +# `rules_xcodeproj` instead. This config exists solely to allow project-level +# configs to work correctly. + +common:_rules_xcodeproj_build --config=rules_xcodeproj + +### Project specific configs + +# Import `xcodeproj.bazelrc` if it exists +try-import %workspace%/xcodeproj.bazelrc diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist new file mode 100644 index 0000000..5ce1dc5 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist @@ -0,0 +1,24 @@ +/*.xctest/Contents/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Contents/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Contents/Frameworks/Testing.framework, +/*.xctest/Contents/Frameworks/XCTAutomationSupport.framework +/*.xctest/Contents/Frameworks/XCTest.framework +/*.xctest/Contents/Frameworks/XCTestCore.framework +/*.xctest/Contents/Frameworks/XCTestSupport.framework +/*.xctest/Contents/Frameworks/XCUIAutomation.framework +/*.xctest/Contents/Frameworks/XCUnit.framework +/*.xctest/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Frameworks/Testing.framework, +/*.xctest/Frameworks/XCTAutomationSupport.framework +/*.xctest/Frameworks/XCTest.framework +/*.xctest/Frameworks/XCTestCore.framework +/*.xctest/Frameworks/XCTestSupport.framework +/*.xctest/Frameworks/XCUIAutomation.framework +/*.xctest/Frameworks/XCUnit.framework diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/generated.xcfilelist b/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/generated.xcfilelist new file mode 100755 index 0000000..e69de29 diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Aufgabe6.xcscheme b/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Aufgabe6.xcscheme new file mode 100644 index 0000000..54cb536 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Aufgabe6.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Extra.xcscheme b/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Extra.xcscheme new file mode 100644 index 0000000..6e6b073 --- /dev/null +++ b/Sources/Aufgabe6/Aufgabe6.xcodeproj/xcshareddata/xcschemes/Extra.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Aufgabe6/BUILD.bazel b/Sources/Aufgabe6/BUILD.bazel index 228d7f8..06383cc 100644 --- a/Sources/Aufgabe6/BUILD.bazel +++ b/Sources/Aufgabe6/BUILD.bazel @@ -2,6 +2,43 @@ load("@rules_swift//swift:swift.bzl", "swift_binary") swift_binary( name = "Aufgabe6", - srcs = ["main.swift","first.swift", "second.swift"], + srcs = ["main.swift","first.swift"], visibility = ["//visibility:public"], ) + +swift_binary( + name = "Extra", + srcs = ["extra.swift"], + visibility = ["//visibility:public"], +) + +# BEGIN GENERATED XCODEPROJ +load("@rules_xcodeproj//xcodeproj:defs.bzl", "top_level_target", "xcodeproj") + +filegroup( + name = "xcodeproj_extra_files", + srcs = glob( + ["**/*"], + exclude = [ + "BUILD.bazel", + "BUILD", + "**/*.xcodeproj/**", + "**/.*", + "**/.*/**", + ], + allow_empty = True, + ), + visibility = ["//visibility:public"], +) + +xcodeproj( + name = "xcodeproj", + project_name = "Aufgabe6", + tags = ["manual"], + extra_files = [":xcodeproj_extra_files"], + top_level_targets = [ + "//m323/Sources/Aufgabe6:Aufgabe6", + "//m323/Sources/Aufgabe6:Extra", + ], +) +# END GENERATED XCODEPROJ diff --git a/m323.xcodeproj/project.pbxproj b/m323.xcodeproj/project.pbxproj new file mode 100755 index 0000000..3980fa0 --- /dev/null +++ b/m323.xcodeproj/project.pbxproj @@ -0,0 +1,1504 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 60; + objects = { + FF0100000000000000000004 /* Generate Bazel Dependencies */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Generate Bazel Dependencies"; + outputFileListPaths = ( + "$(INTERNAL_DIR)/generated.xcfilelist", + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$BAZEL_INTEGRATION_DIR/generate_bazel_dependencies.sh\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000005 /* Create swift_debug_settings.py */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BAZEL_INTEGRATION_DIR)/$(CONFIGURATION)-swift_debug_settings.py", + ); + name = "Create swift_debug_settings.py"; + outputPaths = ( + "$(OBJROOT)/$(CONFIGURATION)/swift_debug_settings.py", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "perl -pe '\n # Replace \"__BAZEL_XCODE_DEVELOPER_DIR__\" with \"$(DEVELOPER_DIR)\"\n s/__BAZEL_XCODE_DEVELOPER_DIR__/\\$(DEVELOPER_DIR)/g;\n\n # Replace \"__BAZEL_XCODE_SDKROOT__\" with \"$(SDKROOT)\"\n s/__BAZEL_XCODE_SDKROOT__/\\$(SDKROOT)/g;\n\n # Replace build settings with their values\n s/\n \\$ # Match a dollar sign\n (\\()? # Optionally match an opening parenthesis and capture it\n ([a-zA-Z_]\\w*) # Match a variable name and capture it\n (?(1)\\)) # If an opening parenthesis was captured, match a closing parenthesis\n /$ENV{$2}/gx; # Replace the entire matched string with the value of the corresponding environment variable\n\n' \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\n"; + showEnvVarsInLog = 0; + }; + FF0100000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BAZEL_PACKAGE_BIN_DIR = rules_xcodeproj; + CALCULATE_OUTPUT_GROUPS_SCRIPT = "$(BAZEL_INTEGRATION_DIR)/calculate_output_groups.py"; + CC = ""; + CXX = ""; + INDEXING_SUPPORTED_PLATFORMS__ = "$(INDEXING_SUPPORTED_PLATFORMS__NO)"; + INDEXING_SUPPORTED_PLATFORMS__NO = macosx; + INDEXING_SUPPORTED_PLATFORMS__YES = macosx; + INDEX_DISABLE_SCRIPT_EXECUTION = YES; + LD = ""; + LDPLUSPLUS = ""; + LIBTOOL = libtool; + SUPPORTED_PLATFORMS = "$(INDEXING_SUPPORTED_PLATFORMS__$(INDEX_ENABLE_BUILD_ARENA))"; + SUPPORTS_MACCATALYST = YES; + SWIFT_EXEC = swiftc; + TAPI_EXEC = ""; + TARGET_IDS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/xcodeproj/xcodeproj_target_ids"; + TARGET_NAME = BazelDependencies; + }; + name = Debug; + }; + FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0100000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0100000000000000000001 /* BazelDependencies */ = { + isa = PBXAggregateTarget; + buildConfigurationList = FF0100000000000000000002 /* Build configuration list for PBXAggregateTarget "BazelDependencies" */; + buildPhases = ( + FF0100000000000000000004 /* Generate Bazel Dependencies */, + FF0100000000000000000005 /* Create swift_debug_settings.py */, + ); + dependencies = ( + ); + name = BazelDependencies; + productName = BazelDependencies; + }; + FF0000000000000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO; + BAZEL_CONFIG = rules_xcodeproj; + BAZEL_EXTERNAL = "$(BAZEL_OUTPUT_BASE)/external"; + BAZEL_INTEGRATION_DIR = "$(INTERNAL_DIR)/bazel"; + BAZEL_LLDB_INIT = "$(PROJECT_FILE_PATH)/rules_xcodeproj/bazel.lldbinit"; + BAZEL_OUT = "$(PROJECT_DIR)/bazel-out"; + BAZEL_OUTPUT_BASE = "$(_BAZEL_OUTPUT_BASE:standardizepath)"; + BAZEL_WORKSPACE_ROOT = "$(SRCROOT)"; + BUILD_DIR = "$(SYMROOT)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + BUILD_MARKER_FILE = "$(OBJROOT)/build_marker"; + BUILD_WORKSPACE_DIRECTORY = "$(SRCROOT)"; + CC = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_MODULES_AUTOLINK = NO; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGN_STYLE = Manual; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(BAZEL_PACKAGE_BIN_DIR)"; + COPY_PHASE_STRIP = NO; + CXX = "$(BAZEL_INTEGRATION_DIR)/clang.sh"; + DEBUG_INFORMATION_FORMAT = dwarf; + DSTROOT = "$(PROJECT_TEMP_DIR)"; + ENABLE_DEBUG_DYLIB = NO; + ENABLE_DEFAULT_SEARCH_PATHS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_OPTIMIZATION_LEVEL = 0; + IMPORT_INDEX_BUILD_INDEXSTORES = YES; + INDEXING_PROJECT_DIR__ = "$(INDEXING_PROJECT_DIR__NO)"; + INDEXING_PROJECT_DIR__NO = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + INDEXING_PROJECT_DIR__YES = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/indexbuild_output_base/execroot/_main; + INDEX_DATA_STORE_DIR = "$(INDEX_DATA_STORE_DIR)"; + INDEX_FORCE_SCRIPT_EXECUTION = YES; + INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_index_import/index-import"; + INSTALL_PATH = "$(BAZEL_PACKAGE_BIN_DIR)/$(TARGET_NAME)/bin"; + INTERNAL_DIR = "$(PROJECT_FILE_PATH)/rules_xcodeproj"; + LD = "$(BAZEL_INTEGRATION_DIR)/ld"; + LDPLUSPLUS = "$(BAZEL_INTEGRATION_DIR)/ld"; + LD_DYLIB_INSTALL_NAME = ""; + LD_OBJC_ABI_VERSION = ""; + LD_RUNPATH_SEARCH_PATHS = ""; + LEGACY_INDEX_IMPORT = "$(BAZEL_OUT)/darwin_arm64-opt-exec/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_legacy_index_import/index-import"; + LIBTOOL = "$(BAZEL_INTEGRATION_DIR)/libtool"; + ONLY_ACTIVE_ARCH = YES; + PROJECT_DIR = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + RESOLVED_REPOSITORIES = "\".\" \"/Users/cediackermann/Projects\""; + RULES_XCODEPROJ_BUILD_MODE = bazel; + SRCROOT = /Users/cediackermann/Projects; + SUPPORTS_MACCATALYST = NO; + SWIFT_EXEC = "$(BAZEL_INTEGRATION_DIR)/swiftc"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_USE_INTEGRATED_DRIVER = NO; + SWIFT_VERSION = 5.0; + TAPI_EXEC = /usr/bin/true; + TARGET_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(BAZEL_PACKAGE_BIN_DIR)/$(COMPILE_TARGET_NAME)"; + USE_HEADERMAP = NO; + VALIDATE_WORKSPACE = NO; + _BAZEL_OUTPUT_BASE = "$(PROJECT_DIR)/../.."; + }; + name = Debug; + }; + FF0000000000000000000002 /* Build configuration list for PBXProject */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF0000000000000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + FF0000000000000000000001 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = FF0000000000000000000002 /* Build configuration list for PBXProject */; + compatibilityVersion = "Xcode 15.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + mainGroup = FF0000000000000000000003 /* /Users/cediackermann/Projects */; + productRefGroup = FF0000000000000000000004 /* Products */; + projectDirPath = /Users/cediackermann/Library/Caches/bazel/_bazel_cediackermann/32ebb412f2c3c34f6a486c67eed584f9/rules_xcodeproj.noindex/build_output_base/execroot/_main; + projectRoot = ""; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 9999; + LastUpgradeCheck = 9999; + TargetAttributes = { + FF0100000000000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0000BD3C9EC8000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0100ECF1F706000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0200FFDB3B65000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0300751D4F21000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0200B238902E000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 02003AC71E1F000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 02008BBAC3A6000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0400914C3FC0000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 06001C703C4E000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + 0500988D58C3000000000001 = { + CreatedOnToolsVersion = 26.6.0; + LastSwiftMigration = 9999; + }; + }; + }; + knownRegions = ( + en, + Base, + ); + targets = ( + FF0100000000000000000001 /* BazelDependencies */, + 0000BD3C9EC8000000000001 /* 01_MapUebungen */, + 0100ECF1F706000000000001 /* 02_FilterUebungen */, + 0200FFDB3B65000000000001 /* 03_MapUndFilterUebungen */, + 0300751D4F21000000000001 /* 04_FoldLeftUebungen */, + 0200B238902E000000000001 /* 05_FlatMapUebungen */, + 02003AC71E1F000000000001 /* 06_ForComprehensionsUebungen */, + 02008BBAC3A6000000000001 /* Aufgabe3 */, + 0400914C3FC0000000000001 /* LeetCode */, + 06001C703C4E000000000001 /* m323 */, + 0500988D58C3000000000001 /* WeDontLikeCharA */, + ); + }; + 0000BD3C9EC8000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0000BD3C9EC8000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0000BD3C9EC8000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00FFF74522CB433D9110604A /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0000BD3C9EC8000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:01_MapUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/01_MapUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 01_MapUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:01_MapUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 01_MapUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/01_MapUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/01_MapUebungen_objs/Sources/Aufgabe4/01_MapUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_01_MapUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_01_MapUebungen; + PRODUCT_NAME = 01_MapUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 01_MapUebungen; + }; + name = Debug; + }; + 0000BD3C9EC8000000000002 /* Build configuration list for PBXNativeTarget "01_MapUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0000BD3C9EC8000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0000BD3C9EC80000000000FF /* 01_MapUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 01_MapUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 0000BD3C9EC8000000000001 /* 01_MapUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0000BD3C9EC8000000000002 /* Build configuration list for PBXNativeTarget "01_MapUebungen" */; + buildPhases = ( + 0000BD3C9EC8000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0000BD3C9EC8000000000005 /* Create Link Dependencies */, + 0000BD3C9EC8000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0002BD3C9EC8FF0001000000 /* PBXTargetDependency */, + ); + name = 01_MapUebungen; + productName = 01_MapUebungen; + productReference = 0000BD3C9EC80000000000FF /* 01_MapUebungen */; + productType = "com.apple.product-type.tool"; + }; + 0100ECF1F706000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0100ECF1F706000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0100ECF1F706000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 01FF8C6F0E2E4247037BD26C /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0100ECF1F706000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:02_FilterUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/02_FilterUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 02_FilterUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:02_FilterUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 02_FilterUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/02_FilterUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/02_FilterUebungen_objs/Sources/Aufgabe4/02_FilterUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_02_FilterUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_02_FilterUebungen; + PRODUCT_NAME = 02_FilterUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 02_FilterUebungen; + }; + name = Debug; + }; + 0100ECF1F706000000000002 /* Build configuration list for PBXNativeTarget "02_FilterUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0100ECF1F706000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0100ECF1F7060000000000FF /* 02_FilterUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 02_FilterUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 0100ECF1F706000000000001 /* 02_FilterUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0100ECF1F706000000000002 /* Build configuration list for PBXNativeTarget "02_FilterUebungen" */; + buildPhases = ( + 0100ECF1F706000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0100ECF1F706000000000005 /* Create Link Dependencies */, + 0100ECF1F706000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0102ECF1F706FF0001000000 /* PBXTargetDependency */, + ); + name = 02_FilterUebungen; + productName = 02_FilterUebungen; + productReference = 0100ECF1F7060000000000FF /* 02_FilterUebungen */; + productType = "com.apple.product-type.tool"; + }; + 0200FFDB3B65000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0200FFDB3B65000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0200FFDB3B65000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02FF75FE3D19EE9709CB1FAF /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0200FFDB3B65000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:03_MapUndFilterUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/03_MapUndFilterUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 03_MapUndFilterUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:03_MapUndFilterUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 03_MapUndFilterUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/03_MapUndFilterUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/03_MapUndFilterUebungen_objs/Sources/Aufgabe4/03_MapUndFilterUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_03_MapUndFilterUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_03_MapUndFilterUebungen; + PRODUCT_NAME = 03_MapUndFilterUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 03_MapUndFilterUebungen; + }; + name = Debug; + }; + 0200FFDB3B65000000000002 /* Build configuration list for PBXNativeTarget "03_MapUndFilterUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0200FFDB3B65000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0200FFDB3B650000000000FF /* 03_MapUndFilterUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 03_MapUndFilterUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 0200FFDB3B65000000000001 /* 03_MapUndFilterUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0200FFDB3B65000000000002 /* Build configuration list for PBXNativeTarget "03_MapUndFilterUebungen" */; + buildPhases = ( + 0200FFDB3B65000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0200FFDB3B65000000000005 /* Create Link Dependencies */, + 0200FFDB3B65000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0202FFDB3B65FF0001000000 /* PBXTargetDependency */, + ); + name = 03_MapUndFilterUebungen; + productName = 03_MapUndFilterUebungen; + productReference = 0200FFDB3B650000000000FF /* 03_MapUndFilterUebungen */; + productType = "com.apple.product-type.tool"; + }; + 0200B238902E000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0200B238902E000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0200B238902E000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02FFB29402E605E42359511E /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0200B238902E000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:05_FlatMapUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/05_FlatMapUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 05_FlatMapUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:05_FlatMapUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 05_FlatMapUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/05_FlatMapUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/05_FlatMapUebungen_objs/Sources/Aufgabe4/05_FlatMapUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_05_FlatMapUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_05_FlatMapUebungen; + PRODUCT_NAME = 05_FlatMapUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 05_FlatMapUebungen; + }; + name = Debug; + }; + 0200B238902E000000000002 /* Build configuration list for PBXNativeTarget "05_FlatMapUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0200B238902E000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0200B238902E0000000000FF /* 05_FlatMapUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 05_FlatMapUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 0200B238902E000000000001 /* 05_FlatMapUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0200B238902E000000000002 /* Build configuration list for PBXNativeTarget "05_FlatMapUebungen" */; + buildPhases = ( + 0200B238902E000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0200B238902E000000000005 /* Create Link Dependencies */, + 0200B238902E000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0202B238902EFF0001000000 /* PBXTargetDependency */, + ); + name = 05_FlatMapUebungen; + productName = 05_FlatMapUebungen; + productReference = 0200B238902E0000000000FF /* 05_FlatMapUebungen */; + productType = "com.apple.product-type.tool"; + }; + 02003AC71E1F000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 02003AC71E1F000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 02003AC71E1F000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02FFD8826A00E3E81141B34B /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 02003AC71E1F000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:06_ForComprehensionsUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/06_ForComprehensionsUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 06_ForComprehensionsUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:06_ForComprehensionsUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 06_ForComprehensionsUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/06_ForComprehensionsUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/06_ForComprehensionsUebungen_objs/Sources/Aufgabe4/06_ForComprehensionsUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_06_ForComprehensionsUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_06_ForComprehensionsUebungen; + PRODUCT_NAME = 06_ForComprehensionsUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 06_ForComprehensionsUebungen; + }; + name = Debug; + }; + 02003AC71E1F000000000002 /* Build configuration list for PBXNativeTarget "06_ForComprehensionsUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 02003AC71E1F000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 02003AC71E1F0000000000FF /* 06_ForComprehensionsUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 06_ForComprehensionsUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 02003AC71E1F000000000001 /* 06_ForComprehensionsUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 02003AC71E1F000000000002 /* Build configuration list for PBXNativeTarget "06_ForComprehensionsUebungen" */; + buildPhases = ( + 02003AC71E1F000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 02003AC71E1F000000000005 /* Create Link Dependencies */, + 02003AC71E1F000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 02023AC71E1FFF0001000000 /* PBXTargetDependency */, + ); + name = 06_ForComprehensionsUebungen; + productName = 06_ForComprehensionsUebungen; + productReference = 02003AC71E1F0000000000FF /* 06_ForComprehensionsUebungen */; + productType = "com.apple.product-type.tool"; + }; + 02008BBAC3A6000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 02008BBAC3A6000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 02008BBAC3A6000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 02FF451A626E1C07FF0B96C3 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 02008BBAC3A6000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:Aufgabe3"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Aufgabe3_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = Aufgabe3_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:Aufgabe3 darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = Aufgabe3; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Aufgabe3.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/Aufgabe3_objs/Sources/Aufgabe3/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_Aufgabe3_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_Aufgabe3; + PRODUCT_NAME = Aufgabe3; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = Aufgabe3; + }; + name = Debug; + }; + 02008BBAC3A6000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 02008BBAC3A6000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 02008BBAC3A60000000000FF /* Aufgabe3 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Aufgabe3; sourceTree = BUILT_PRODUCTS_DIR; }; + 02008BBAC3A6000000000001 /* Aufgabe3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 02008BBAC3A6000000000002 /* Build configuration list for PBXNativeTarget "Aufgabe3" */; + buildPhases = ( + 02008BBAC3A6000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 02008BBAC3A6000000000005 /* Create Link Dependencies */, + 02008BBAC3A6000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 02028BBAC3A6FF0001000000 /* PBXTargetDependency */, + ); + name = Aufgabe3; + productName = Aufgabe3; + productReference = 02008BBAC3A60000000000FF /* Aufgabe3 */; + productType = "com.apple.product-type.tool"; + }; + 0300751D4F21000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0300751D4F21000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0300751D4F21000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03FF6E42F5A37A5F03E569F7 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0300751D4F21000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:04_FoldLeftUebungen"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/04_FoldLeftUebungen_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = 04_FoldLeftUebungen_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:04_FoldLeftUebungen darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = 04_FoldLeftUebungen; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/04_FoldLeftUebungen.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/04_FoldLeftUebungen_objs/Sources/Aufgabe4/04_FoldLeftUebungen/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_04_FoldLeftUebungen_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_04_FoldLeftUebungen; + PRODUCT_NAME = 04_FoldLeftUebungen; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = 04_FoldLeftUebungen; + }; + name = Debug; + }; + 0300751D4F21000000000002 /* Build configuration list for PBXNativeTarget "04_FoldLeftUebungen" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0300751D4F21000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0300751D4F210000000000FF /* 04_FoldLeftUebungen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 04_FoldLeftUebungen; sourceTree = BUILT_PRODUCTS_DIR; }; + 0300751D4F21000000000001 /* 04_FoldLeftUebungen */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0300751D4F21000000000002 /* Build configuration list for PBXNativeTarget "04_FoldLeftUebungen" */; + buildPhases = ( + 0300751D4F21000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0300751D4F21000000000005 /* Create Link Dependencies */, + 0300751D4F21000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0302751D4F21FF0001000000 /* PBXTargetDependency */, + ); + name = 04_FoldLeftUebungen; + productName = 04_FoldLeftUebungen; + productReference = 0300751D4F210000000000FF /* 04_FoldLeftUebungen */; + productType = "com.apple.product-type.tool"; + }; + 0400914C3FC0000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0400914C3FC0000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0400914C3FC0000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04FFE185EDDA8F4AC4356AFA /* LeetCode.swift in Sources */, + 04FFACACB0639AD61B3F698F /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0400914C3FC0000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:LeetCode"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/LeetCode_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = LeetCode_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:LeetCode darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = LeetCode; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/LeetCode.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/LeetCode_objs/Sources/LeetCode/LeetCode.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_LeetCode_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_LeetCode; + PRODUCT_NAME = LeetCode; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = LeetCode; + }; + name = Debug; + }; + 0400914C3FC0000000000002 /* Build configuration list for PBXNativeTarget "LeetCode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0400914C3FC0000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0400914C3FC00000000000FF /* LeetCode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LeetCode; sourceTree = BUILT_PRODUCTS_DIR; }; + 0400914C3FC0000000000001 /* LeetCode */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0400914C3FC0000000000002 /* Build configuration list for PBXNativeTarget "LeetCode" */; + buildPhases = ( + 0400914C3FC0000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0400914C3FC0000000000005 /* Create Link Dependencies */, + 0400914C3FC0000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0402914C3FC0FF0001000000 /* PBXTargetDependency */, + ); + name = LeetCode; + productName = LeetCode; + productReference = 0400914C3FC00000000000FF /* LeetCode */; + productType = "com.apple.product-type.tool"; + }; + 0500988D58C3000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0500988D58C3000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 0500988D58C3000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05FFF2D37EB5732EF17A68EF /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0500988D58C3000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:WeDontLikeCharA"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/WeDontLikeCharA_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = WeDontLikeCharA_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:WeDontLikeCharA darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = WeDontLikeCharA; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/WeDontLikeCharA.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/WeDontLikeCharA_objs/Sources/WeDontLikeCharA/main.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_WeDontLikeCharA_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_WeDontLikeCharA; + PRODUCT_NAME = WeDontLikeCharA; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = WeDontLikeCharA; + }; + name = Debug; + }; + 0500988D58C3000000000002 /* Build configuration list for PBXNativeTarget "WeDontLikeCharA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0500988D58C3000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 0500988D58C30000000000FF /* WeDontLikeCharA */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WeDontLikeCharA; sourceTree = BUILT_PRODUCTS_DIR; }; + 0500988D58C3000000000001 /* WeDontLikeCharA */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0500988D58C3000000000002 /* Build configuration list for PBXNativeTarget "WeDontLikeCharA" */; + buildPhases = ( + 0500988D58C3000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 0500988D58C3000000000005 /* Create Link Dependencies */, + 0500988D58C3000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 0502988D58C3FF0001000000 /* PBXTargetDependency */, + ); + name = WeDontLikeCharA; + productName = WeDontLikeCharA; + productReference = 0500988D58C30000000000FF /* WeDontLikeCharA */; + productType = "com.apple.product-type.tool"; + }; + 06001C703C4E000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Bazel Outputs / Generate Bazel Dependencies (Index Build)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"$ACTION\" == \"indexbuild\" ]]; then\n cd \"$SRCROOT\"\n\n \"$BAZEL_INTEGRATION_DIR/generate_index_build_bazel_dependencies.sh\"\nelse\n \"$BAZEL_INTEGRATION_DIR/copy_outputs.sh\" \\\n \"_BazelForcedCompile_.swift\" \\\n \"\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 06001C703C4E000000000005 /* Create Link Dependencies */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(LINK_PARAMS_FILE)", + ); + name = "Create Link Dependencies"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/link.params", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\nif [[ \"${ENABLE_PREVIEWS:-}\" == \"YES\" ]]; then\nperl -pe 's/\\$(\\()?([a-zA-Z_]\\w*)(?(1)\\))/$ENV{$2}/g' \\\n \"$SCRIPT_INPUT_FILE_0\" > \"$SCRIPT_OUTPUT_FILE_0\"\nelse\n touch \"$SCRIPT_OUTPUT_FILE_0\"\nfi\n"; + showEnvVarsInLog = 0; + }; + 06001C703C4E000000000006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 06FF9DD15BCF46B7B43EA2BB /* m323.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 06001C703C4E000000000100 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = arm64; + BAZEL_LABEL = "@@//m323:m323"; + BAZEL_OUTPUTS_PRODUCT = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/m323_codesigned"; + BAZEL_OUTPUTS_PRODUCT_BASENAME = m323_codesigned; + BAZEL_PACKAGE_BIN_DIR = "bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323"; + BAZEL_TARGET_ID = "@@//m323:m323 darwin_arm64-dbg-ST-9a5aec5712f9"; + COMPILE_TARGET_NAME = m323; + EXECUTABLE_EXTENSION = ""; + LINK_PARAMS_FILE = "$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/m323.rules_xcodeproj.link.params"; + MACOSX_DEPLOYMENT_TARGET = 26.5; + OTHER_LDFLAGS = "@$(DERIVED_FILE_DIR)/link.params"; + OTHER_SWIFT_FLAGS = "-Xcc -working-directory -Xcc $(PROJECT_DIR) -working-directory $(PROJECT_DIR) -enforce-exclusivity=checked -emit-const-values-path bazel-out/darwin_arm64-dbg-ST-9a5aec5712f9/bin/m323/m323_objs/Sources/m323/m323.swift.swiftconstvalues -DDEBUG -Onone -Xfrontend -internalize-at-link -enable-testing -disable-sandbox -file-compilation-dir . -Xcc -iquote -Xcc $(PROJECT_DIR) -Xcc -iquote -Xcc $(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -Xfrontend -disable-clang-spi -enable-experimental-feature AccessLevelOnImport -Xfrontend -entry-point-function-name -Xfrontend m323_m323_main -Xcc -O0 -Xcc -DDEBUG=1 -Xcc -fstack-protector -Xcc -fstack-protector-all -Xfrontend -checked-async-objc-bridging=on"; + PRODUCT_MODULE_NAME = m323_m323; + PRODUCT_NAME = m323; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = macosx; + SWIFT_ENABLE_EMIT_CONST_VALUES = NO; + TARGET_NAME = m323; + }; + name = Debug; + }; + 06001C703C4E000000000002 /* Build configuration list for PBXNativeTarget "m323" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 06001C703C4E000000000100 /* Debug */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 06001C703C4E0000000000FF /* m323 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = m323; sourceTree = BUILT_PRODUCTS_DIR; }; + 06001C703C4E000000000001 /* m323 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 06001C703C4E000000000002 /* Build configuration list for PBXNativeTarget "m323" */; + buildPhases = ( + 06001C703C4E000000000003 /* Copy Bazel Outputs / Generate Bazel Dependencies (Index Build) */, + 06001C703C4E000000000005 /* Create Link Dependencies */, + 06001C703C4E000000000006 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + 06021C703C4EFF0001000000 /* PBXTargetDependency */, + ); + name = m323; + productName = m323; + productReference = 06001C703C4E0000000000FF /* m323 */; + productType = "com.apple.product-type.tool"; + }; + 0001BD3C9EC8FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0002BD3C9EC8FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0001BD3C9EC8FF0001000000 /* PBXContainerItemProxy */; + }; + 0101ECF1F706FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0102ECF1F706FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0101ECF1F706FF0001000000 /* PBXContainerItemProxy */; + }; + 0201FFDB3B65FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0202FFDB3B65FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0201FFDB3B65FF0001000000 /* PBXContainerItemProxy */; + }; + 0301751D4F21FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0302751D4F21FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0301751D4F21FF0001000000 /* PBXContainerItemProxy */; + }; + 0201B238902EFF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0202B238902EFF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0201B238902EFF0001000000 /* PBXContainerItemProxy */; + }; + 02013AC71E1FFF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 02023AC71E1FFF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 02013AC71E1FFF0001000000 /* PBXContainerItemProxy */; + }; + 02018BBAC3A6FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 02028BBAC3A6FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 02018BBAC3A6FF0001000000 /* PBXContainerItemProxy */; + }; + 0401914C3FC0FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0402914C3FC0FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0401914C3FC0FF0001000000 /* PBXContainerItemProxy */; + }; + 06011C703C4EFF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 06021C703C4EFF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 06011C703C4EFF0001000000 /* PBXContainerItemProxy */; + }; + 0501988D58C3FF0001000000 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FF0000000000000000000001 /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF0100000000000000000001; + remoteInfo = BazelDependencies; + }; + 0502988D58C3FF0001000000 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = BazelDependencies; + target = FF0100000000000000000001 /* BazelDependencies */; + targetProxy = 0501988D58C3FF0001000000 /* PBXContainerItemProxy */; + }; + FF0000000000000000000003 /* /Users/cediackermann/Projects */ = { + isa = PBXGroup; + children = ( + FE0B6A8C2E81F8461958AA13 /* m323 */, + FF0000000000000000000004 /* Products */, + FF0000000000000000000005 /* Frameworks */, + ); + path = /Users/cediackermann/Projects; + sourceTree = ""; + }; + FE00612040669FAF729D49AA /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE02EF2040CEF9D2B44A1010 /* LeetCode */ = { + isa = PBXGroup; + children = ( + FE41B11B59FD943059386908 /* LeetCode.swift */, + FE00612040669FAF729D49AA /* main.swift */, + ); + path = LeetCode; + sourceTree = ""; + }; + FE09D44427ABE09155087B03 /* m323Tests */ = { + isa = PBXGroup; + children = ( + FE44FBE715C5BDFDA80ECDCC /* m323Tests.swift */, + ); + path = m323Tests; + sourceTree = ""; + }; + FE0B04460B1D6B9B11594D1B /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE0B6A8C2E81F8461958AA13 /* m323 */ = { + isa = PBXGroup; + children = ( + FE166C9A692D51E6024F7FE8 /* 01 */, + FE33D36F2BFBBE20D6696EBB /* Sources */, + FE9208E0847E4A0D28D5D289 /* Tests */, + FE449A7A30D9D2FA6C52623F /* BUILD.bazel */, + FE6DD6306FA3343F52C01D12 /* Package.swift */, + ); + path = m323; + sourceTree = ""; + }; + FE1152FEB3187EBABB67CDCA /* Aufgabe4 */ = { + isa = PBXGroup; + children = ( + FEF05EECE85EC60CF9AC7819 /* 01_MapUebungen */, + FEAC57083ABF810671B4C68B /* 02_FilterUebungen */, + FEFFFC3F434A9A24388AC854 /* 03_MapUndFilterUebungen */, + FEB34F9C1FA0B510DCC8C950 /* 04_FoldLeftUebungen */, + FE1404842936BD862A2256B9 /* 05_FlatMapUebungen */, + FEBA6B32F69C48F98B78947D /* 06_ForComprehensionsUebungen */, + FE7E7DCB3151B40291745FC0 /* File.txt */, + ); + path = Aufgabe4; + sourceTree = ""; + }; + FE12F9F1B4BE2AAA18A9EB4B /* Aufgabe3 */ = { + isa = PBXGroup; + children = ( + FEF3402C581841D2AF90ACFB /* main.swift */, + FE3BEC8769F9169865AC414B /* PureOrNotPure.md */, + ); + path = Aufgabe3; + sourceTree = ""; + }; + FE1404842936BD862A2256B9 /* 05_FlatMapUebungen */ = { + isa = PBXGroup; + children = ( + FEB7E46A4A20CE46D0765E2E /* main.swift */, + ); + path = 05_FlatMapUebungen; + sourceTree = ""; + }; + FE146E3F4483945E04E504F7 /* ShoppingCartImperative.java */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.java; path = ShoppingCartImperative.java; sourceTree = ""; }; + FE166C9A692D51E6024F7FE8 /* 01 */ = { + isa = PBXGroup; + children = ( + FE5C4A40CE75BC60096B82E9 /* Drei.java */, + FE6F843D1149E6C4D815F795 /* Eins.java */, + FEFB3034C5FA9AC0604BA059 /* ShoppingCartFunctional.java */, + FE146E3F4483945E04E504F7 /* ShoppingCartImperative.java */, + ); + path = 01; + sourceTree = ""; + }; + FE33D36F2BFBBE20D6696EBB /* Sources */ = { + isa = PBXGroup; + children = ( + FE12F9F1B4BE2AAA18A9EB4B /* Aufgabe3 */, + FE1152FEB3187EBABB67CDCA /* Aufgabe4 */, + FE02EF2040CEF9D2B44A1010 /* LeetCode */, + FE5F6E7CCED8AB1DFBDC6C99 /* m323 */, + FEF421DCE33FD17844814950 /* WeDontLikeCharA */, + ); + path = Sources; + sourceTree = ""; + }; + FE3BAF9803A457076E1006CF /* m323.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = m323.swift; sourceTree = ""; }; + FE3BEC8769F9169865AC414B /* PureOrNotPure.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PureOrNotPure.md; sourceTree = ""; }; + FE41B11B59FD943059386908 /* LeetCode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeetCode.swift; sourceTree = ""; }; + FE449A7A30D9D2FA6C52623F /* BUILD.bazel */ = {isa = PBXFileReference; explicitFileType = text.script.python; path = BUILD.bazel; sourceTree = ""; }; + FE44FBE715C5BDFDA80ECDCC /* m323Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = m323Tests.swift; sourceTree = ""; }; + FE5C4A40CE75BC60096B82E9 /* Drei.java */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.java; path = Drei.java; sourceTree = ""; }; + FE5F6E7CCED8AB1DFBDC6C99 /* m323 */ = { + isa = PBXGroup; + children = ( + FE3BAF9803A457076E1006CF /* m323.swift */, + ); + path = m323; + sourceTree = ""; + }; + FE6221723CCCD19779F16AC2 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE6DD6306FA3343F52C01D12 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + FE6F843D1149E6C4D815F795 /* Eins.java */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.java; path = Eins.java; sourceTree = ""; }; + FE7E7DCB3151B40291745FC0 /* File.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = File.txt; sourceTree = ""; }; + FE7EEF041D742C358F7251CC /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE839AD63DC0AFBA0116C87A /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FE9208E0847E4A0D28D5D289 /* Tests */ = { + isa = PBXGroup; + children = ( + FE09D44427ABE09155087B03 /* m323Tests */, + ); + path = Tests; + sourceTree = ""; + }; + FEAC57083ABF810671B4C68B /* 02_FilterUebungen */ = { + isa = PBXGroup; + children = ( + FE6221723CCCD19779F16AC2 /* main.swift */, + ); + path = 02_FilterUebungen; + sourceTree = ""; + }; + FEB34F9C1FA0B510DCC8C950 /* 04_FoldLeftUebungen */ = { + isa = PBXGroup; + children = ( + FE7EEF041D742C358F7251CC /* main.swift */, + ); + path = 04_FoldLeftUebungen; + sourceTree = ""; + }; + FEB7E46A4A20CE46D0765E2E /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FEBA6B32F69C48F98B78947D /* 06_ForComprehensionsUebungen */ = { + isa = PBXGroup; + children = ( + FEF373A6D363EBEF2D3AE87E /* main.swift */, + ); + path = 06_ForComprehensionsUebungen; + sourceTree = ""; + }; + FED1C9C1D684180A7C8ED32C /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FEF05EECE85EC60CF9AC7819 /* 01_MapUebungen */ = { + isa = PBXGroup; + children = ( + FED1C9C1D684180A7C8ED32C /* main.swift */, + ); + path = 01_MapUebungen; + sourceTree = ""; + }; + FEF3402C581841D2AF90ACFB /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FEF373A6D363EBEF2D3AE87E /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + FEF421DCE33FD17844814950 /* WeDontLikeCharA */ = { + isa = PBXGroup; + children = ( + FE839AD63DC0AFBA0116C87A /* main.swift */, + ); + path = WeDontLikeCharA; + sourceTree = ""; + }; + FEFB3034C5FA9AC0604BA059 /* ShoppingCartFunctional.java */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.java; path = ShoppingCartFunctional.java; sourceTree = ""; }; + FEFFFC3F434A9A24388AC854 /* 03_MapUndFilterUebungen */ = { + isa = PBXGroup; + children = ( + FE0B04460B1D6B9B11594D1B /* main.swift */, + ); + path = 03_MapUndFilterUebungen; + sourceTree = ""; + }; + 00FFF74522CB433D9110604A /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED1C9C1D684180A7C8ED32C /* main.swift */; }; + 01FF8C6F0E2E4247037BD26C /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE6221723CCCD19779F16AC2 /* main.swift */; }; + 02FF451A626E1C07FF0B96C3 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF3402C581841D2AF90ACFB /* main.swift */; }; + 02FF75FE3D19EE9709CB1FAF /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE0B04460B1D6B9B11594D1B /* main.swift */; }; + 02FFB29402E605E42359511E /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEB7E46A4A20CE46D0765E2E /* main.swift */; }; + 02FFD8826A00E3E81141B34B /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF373A6D363EBEF2D3AE87E /* main.swift */; }; + 03FF6E42F5A37A5F03E569F7 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7EEF041D742C358F7251CC /* main.swift */; }; + 04FFACACB0639AD61B3F698F /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE00612040669FAF729D49AA /* main.swift */; }; + 04FFE185EDDA8F4AC4356AFA /* LeetCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41B11B59FD943059386908 /* LeetCode.swift */; }; + 05FFF2D37EB5732EF17A68EF /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE839AD63DC0AFBA0116C87A /* main.swift */; }; + 06FF9DD15BCF46B7B43EA2BB /* m323.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE3BAF9803A457076E1006CF /* m323.swift */; }; + FF0000000000000000000004 /* Products */ = { + isa = PBXGroup; + children = ( + 0000BD3C9EC80000000000FF /* 01_MapUebungen */, + 0100ECF1F7060000000000FF /* 02_FilterUebungen */, + 0200FFDB3B650000000000FF /* 03_MapUndFilterUebungen */, + 0300751D4F210000000000FF /* 04_FoldLeftUebungen */, + 0200B238902E0000000000FF /* 05_FlatMapUebungen */, + 02003AC71E1F0000000000FF /* 06_ForComprehensionsUebungen */, + 02008BBAC3A60000000000FF /* Aufgabe3 */, + 0400914C3FC00000000000FF /* LeetCode */, + 06001C703C4E0000000000FF /* m323 */, + 0500988D58C30000000000FF /* WeDontLikeCharA */, + ); + name = Products; + sourceTree = ""; + }; + FF0000000000000000000005 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + }; + rootObject = FF0000000000000000000001 /* Project object */; +} diff --git a/m323.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/m323.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/m323.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/m323.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/m323.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/m323.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/m323.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/m323.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..08de0be --- /dev/null +++ b/m323.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py b/m323.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py new file mode 100755 index 0000000..ed3e38c --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/Debug-swift_debug_settings.py @@ -0,0 +1,133 @@ +#!/usr/bin/python3 + +"""An lldb module that registers a stop hook to set swift settings.""" + +import lldb +import re + +# Order matters, it needs to be from the most nested to the least +_BUNDLE_EXTENSIONS = [ + ".framework", + ".xctest", + ".appex", + ".bundle", + ".app", +] + +_TRIPLE_MATCH = re.compile(r"([^-]+-[^-]+)(-\D+)[^-]*(-.*)?") + +_SETTINGS = { + "arm64-apple-macosx 01_MapUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx 02_FilterUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx 03_MapUndFilterUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx 04_FoldLeftUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx 05_FlatMapUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx 06_ForComprehensionsUebungen": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx Aufgabe3": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx LeetCode": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx WeDontLikeCharA": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, + "arm64-apple-macosx m323": { + "c": "-iquote$(PROJECT_DIR) -iquote$(BAZEL_OUT)/darwin_arm64-dbg-ST-9a5aec5712f9/bin -O0 -DDEBUG=1 -fstack-protector -fstack-protector-all", + }, +} + +def __lldb_init_module(debugger, _internal_dict): + # Register the stop hook when this module is loaded in lldb + ci = debugger.GetCommandInterpreter() + res = lldb.SBCommandReturnObject() + ci.HandleCommand( + "target stop-hook add -P swift_debug_settings.StopHook", + res, + ) + if not res.Succeeded(): + print(f"""\ +Failed to register Swift debug options stop hook: + +{res.GetError()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""") + return + +def _get_relative_executable_path(module): + for extension in _BUNDLE_EXTENSIONS: + prefix, _, suffix = module.rpartition(extension) + if prefix: + return prefix.split("/")[-1] + extension + suffix + return module.split("/")[-1] + +class StopHook: + "An lldb stop hook class, that sets swift settings for the current module." + + def __init__(self, _target, _extra_args, _internal_dict): + pass + + def handle_stop(self, exe_ctx, _stream): + "Method that is called when the user stops in lldb." + module = exe_ctx.frame.module + if not module: + return + + module_name = module.file.GetDirectory() + "/" + module.file.GetFilename() + versionless_triple = _TRIPLE_MATCH.sub(r"\1\2\3", module.GetTriple()) + executable_path = _get_relative_executable_path(module_name) + key = f"{versionless_triple} {executable_path}" + + settings = _SETTINGS.get(key) + + if settings: + frameworks = " ".join([ + f'"{path}"' + for path in settings.get("f", []) + ]) + if frameworks: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-framework-search-paths {frameworks}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-framework-search-paths", + ) + + includes = " ".join([ + f'"{path}"' + for path in settings.get("s", []) + ]) + if includes: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-module-search-paths {includes}", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-module-search-paths", + ) + + clang = settings.get("c") + if clang: + lldb.debugger.HandleCommand( + f"settings set -- target.swift-extra-clang-flags '{clang}'", + ) + else: + lldb.debugger.HandleCommand( + "settings clear target.swift-extra-clang-flags", + ) + + return True diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist b/m323.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist new file mode 100644 index 0000000..8e6e093 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/app.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*.xctest diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist b/m323.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist new file mode 100644 index 0000000..c0aeba8 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/appex.exclude.rsynclist @@ -0,0 +1,25 @@ +/*.appex/Contents/Frameworks/libclang_rt.asan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Contents/Frameworks/libXCTestBundleInject.dylib +/*.appex/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Contents/Frameworks/Testing.framework, +/*.appex/Contents/Frameworks/XCTAutomationSupport.framework +/*.appex/Contents/Frameworks/XCTest.framework +/*.appex/Contents/Frameworks/XCTestCore.framework +/*.appex/Contents/Frameworks/XCTestSupport.framework +/*.appex/Contents/Frameworks/XCUIAutomation.framework +/*.appex/Contents/Frameworks/XCUnit.framework +/*.appex/Frameworks/libclang_rt.asan*.dylib +/*.appex/Frameworks/libclang_rt.tsan*.dylib +/*.appex/Frameworks/libclang_rt.ubsan*.dylib +/*.appex/Frameworks/libXCTestBundleInject.dylib +/*.appex/Frameworks/libXCTestSwiftSupport.dylib +/*.appex/Frameworks/Testing.framework, +/*.appex/Frameworks/XCTAutomationSupport.framework +/*.appex/Frameworks/XCTest.framework +/*.appex/Frameworks/XCTestCore.framework +/*.appex/Frameworks/XCTestSupport.framework +/*.appex/Frameworks/XCUIAutomation.framework +/*.appex/Frameworks/XCUnit.framework +/*.appex/PlugIns/*.xctest diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh b/m323.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh new file mode 100755 index 0000000..6679466 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/bazel_build.sh @@ -0,0 +1,209 @@ +# It is assumed that this file is `source`ed from another script, with the following variable set: +# +# - BAZEL_CONFIG +# - BAZEL_INTEGRATION_DIR +# - BAZEL_OUT +# - DEVELOPER_DIR +# - GENERATOR_LABEL +# - HOME +# - INTERNAL_DIR +# - OBJROOT +# - RULES_XCODEPROJ_BUILD_MODE +# - SRCROOT +# - TERM +# - USER +# - XCODE_PRODUCT_BUILD_VERSION +# - (optional) build_pre_config_flags +# - config +# - (optional) labels +# - output_groups +# - (optional) target_ids + +output_groups_flag="--output_groups=$(IFS=, ; echo "${output_groups[*]}")" +readonly output_groups_flag + +# Set `output_base` + +# In `runner.sh` the generator has the build output base set inside of the outer +# bazel's output path (`bazel-out/`). So here we need to make our output base +# changes relative to that changed path. +readonly build_output_base="$BAZEL_OUTPUT_BASE" + +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" +]]; then + # We use a different output base for Index Build to prevent normal builds and + # indexing waiting on bazel locks from the other. We nest it inside of the + # normal output base directory so that it's not cleaned up when running + # `bazel clean`, but is when running `bazel clean --expunge`. This matches + # Xcode behavior of not cleaning the Index Build outputs by default. + readonly output_base="${build_output_base%/*}/indexbuild_output_base" + readonly workspace_name="${PROJECT_DIR##*/}" + readonly output_path="$output_base/execroot/$workspace_name/bazel-out" + + # Use current path for "bazel-out/" and "external/" + # This fixes Index Build to use its version of generated and external files + readonly vfs_overlay_roots="{\"external-contents\": \"$output_path\",\"name\": \"$BAZEL_OUT\",\"type\": \"directory-remap\"},{\"external-contents\": \"$output_base/external\",\"name\": \"$BAZEL_EXTERNAL\",\"type\": \"directory-remap\"}" +else + readonly output_base="$build_output_base" + readonly output_path="$BAZEL_OUT" + readonly vfs_overlay_roots="" +fi + +# Set `bazel_cmd` for calling `bazel` + +bazelrcs=( + --noworkspace_rc + "--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj.bazelrc" +) +if [[ -s ".bazelrc" ]]; then + bazelrcs+=("--bazelrc=.bazelrc") +fi +if [[ -s "$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc" ]]; then + bazelrcs+=("--bazelrc=$BAZEL_INTEGRATION_DIR/xcodeproj_extra_flags.bazelrc") +fi +readonly bazelrcs + +readonly allowed_vars=( + "BUILD_WORKSPACE_DIRECTORY" + "DEVELOPER_DIR" + "HOME" + "HTTP_PROXY" + "http_proxy" + "HTTPS_PROXY" + "https_proxy" + "NO_PROXY" + "no_proxy" + "SSH_AUTH_SOCK" + "TERM" + "USER" +) +passthrough_env=() +for var in "${allowed_vars[@]}"; do + if [[ -n "${!var:-}" ]]; then + passthrough_env+=("$var=${!var}") + fi +done + +source "$BAZEL_INTEGRATION_DIR/bazel_env.sh" + +bazel_cmd=( + env -i + "${passthrough_env[@]}" + "${envs[@]}" + "/Users/cediackermann/Projects/tools/bazel" + + # Restart bazel server if `DEVELOPER_DIR` changes to clear `developerDirCache` + "--host_jvm_args=-Xdock:name=$DEVELOPER_DIR" + + "${bazelrcs[@]}" + + --output_base "$output_base" +) +if [[ + "$ACTION" == "indexbuild" && + "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" != "YES" +]]; then + # Allow normal builds to cancel Index Builds + bazel_cmd+=("--preemptible") +fi +readonly bazel_cmd + +readonly base_pre_config_flags=( + # Be explicit about our desired Xcode version + "--xcode_version=$XCODE_PRODUCT_BUILD_VERSION" + + # Set `DEVELOPER_DIR` in case a bazel wrapper filters it + "--repo_env=DEVELOPER_DIR=$DEVELOPER_DIR" + + # Work around https://github.com/bazelbuild/bazel/issues/8902 + # `USE_CLANG_CL` is only used on Windows, we set it here to cause Bazel to + # re-evaluate the cc_toolchain for a different Xcode version + "--repo_env=USE_CLANG_CL=$XCODE_PRODUCT_BUILD_VERSION" + "--repo_env=XCODE_VERSION=$XCODE_PRODUCT_BUILD_VERSION" + + # Don't block the end of the build for BES upload (artifacts OR events) + "--bes_upload_mode=NOWAIT_FOR_UPLOAD_COMPLETE" +) + + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + # Create VFS overlay + cat > "$OBJROOT/bazel-out-overlay.yaml" <&1 + +# Verify that we actually built what we requested + +if [[ -n "${target_ids:-}" ]]; then + if [[ ! -s "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/xcodeproj/xcodeproj_target_ids" ]]; then + echo "error: \"$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/xcodeproj/xcodeproj_target_ids\" was not created. This can happen if" \ +"you apply build-affecting flags to \"rules_xcodeproj_generator\" config, or" \ +"with the \"--@rules_xcodeproj//xcodeproj:extra_generator_flags\" flag." \ +"Please ensure that all build-affecting flags are moved to the" \ +"\"rules_xcodeproj\" config or" \ +"\"--@rules_xcodeproj//xcodeproj:extra_common_flags\" flag. If you are still" \ +"getting this error after adjusting your setup and regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi + + # We need to sort the inputs for `comm` to work on macOS 15.4+ + diff_output=$( + comm -23 \ + <(printf '%s\n' "${target_ids[@]}" | sort) \ + <(sort "$PROJECT_DIR/bazel-out/darwin_arm64-dbg/bin/external/rules_xcodeproj++rules_repos+rules_xcodeproj_generated/generator/m323/xcodeproj/xcodeproj_target_ids") + ) + + if [ -n "$diff_output" ]; then + missing_target_ids=("${diff_output[@]}") + echo "error: There were some target IDs that weren't known to Bazel" \ +"(e.g. \"${missing_target_ids[0]}\"). Please regenerate the project to fix" \ +"this. If you are still getting this error after regenerating your project," \ +"please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + exit 1 + fi +fi diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh b/m323.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh new file mode 100755 index 0000000..a85cb66 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/bazel_env.sh @@ -0,0 +1,7 @@ +# Generated by rules_xcodeproj. Do not edit. +envs=( + LANG=en_US.UTF-8 + PATH=/bin:/usr/bin + BAZELISK_SKIP_WRAPPER=true + BAZEL_REAL=/Users/cediackermann/Library/Caches/bazelisk/downloads/sha256/2db883718453f0437a7bcb408e889dbf8539cdc4d61c8ebc3807a1a88d02ff08/bin/bazel +) diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py b/m323.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py new file mode 100755 index 0000000..8fa40b2 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/calculate_output_groups.py @@ -0,0 +1,435 @@ +#!/usr/bin/python3 + +import datetime +import glob +import json +import os +import sys +import time +import traceback + +# Ordered the same as we order platforms in the generated Xcode project, except +# macOS is last +_DEVICE_PLATFORMS = { + "iphoneos": None, + "appletvos": None, + "watchos": None, + "macosx": None, +} +_SIMULATOR_PLATFORMS = { + "iphonesimulator": None, + "appletvsimulator": None, + "watchsimulator": None, + "macosx": None, +} + + +def _wait_for_value(calculate_value, value_name): + wait_counter = 0 + while True: + value = calculate_value() + if value: + break + if wait_counter == 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"note: ({now}) {value_name} not updated yet, waiting...", + file = sys.stderr, + flush = True, + ) + if wait_counter == 10: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +warning: ({now}) {value_name} still not updated after 10 seconds. If happens \ +frequently, or the cache is never created, please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + flush = True, + ) + time.sleep(1) + wait_counter += 1 + if wait_counter > 0: + now = datetime.datetime.now().strftime('%H:%M:%S') + print( + f"""\ +note: ({now}) {value_name} updated after {wait_counter} seconds.""", + file = sys.stderr, + flush = True, + ) + return value + + +def _get_build_request( + xcode_version, + objroot, + build_request_min_ctime): + if xcode_version < 1430: + # Before Xcode 14.3 + def wait_for_description(): + build_description_cache = max( + glob.iglob( + f"{objroot}/XCBuildData/BuildDescriptionCacheIndex-*", + ), + key = os.path.getctime, + ) + if (os.path.getctime(build_description_cache) >= + build_request_min_ctime): + return build_description_cache + return None + + build_description_cache = ( + _wait_for_value(wait_for_description, "BuildDescriptionCacheIndex") + ) + with open(build_description_cache, 'rb') as f: + f.seek(-32, os.SEEK_END) + build_request_id = f.read().decode('ASCII') + + build_request_file = ( + f"{objroot}/XCBuildData/{build_request_id}-buildRequest.json" + ) + def wait_for_build_request_file(): + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + return None + + return _wait_for_value( + wait_for_build_request_file, + f"\"{build_request_file}\"", + ) + + def wait_for_build_request(): + try: + xcbuilddata = max( + glob.iglob(f"{objroot}/XCBuildData/*.xcbuilddata"), + key = os.path.getctime, + ) + if os.path.getctime(xcbuilddata) < build_request_min_ctime: + return None + except (ValueError, FileNotFoundError, OSError): + # ValueError: no .xcbuilddata files yet (empty glob) + # FileNotFoundError/OSError: TOCTOU race - file deleted between glob and getctime + return None + build_request_file = f"{xcbuilddata}/build-request.json" + if os.path.exists(build_request_file): + with open(build_request_file, encoding = "utf-8") as f: + # Parse the build-request.json file + try: + return json.load(f) + except Exception as error: + print( + f"""\ +error: Failed to parse '{build_request_file}': +{type(error).__name__}: {error}. + +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + return None + + return _wait_for_value( + wait_for_build_request, + "newest 'buildRequest.json' file", + ) + + +def _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids): + # Xcode gets "stuck" in the `buildFiles` or `build` command for + # top-level targets, so we can't reliably change commands here. Leaving + # the code in place in case this is fixed in the future, or we want to + # do something similar in an XCBBuildService proxy. + # + # command = ( + # build_request.get("_buildCommand2", {}).get("command", "build") + # ) + command = "build" + parameters = build_request["parameters"] + platform = ( + parameters["activeRunDestination"]["platform"] + ) + configuration_name = parameters["configurationName"] + + labels_and_target_ids = [] + for target in build_request["configuredTargets"]: + label = guid_labels.get(target["guid"]) + if not label: + # `BazelDependency` and the like + continue + full_target_target_ids = guid_target_ids[target["guid"]] + target_target_ids = ( + full_target_target_ids.get(command) or + # Will only be `null` if `command == "buildFiles"` and there + # isn't a different compile target id + full_target_target_ids["build"] + ) + target_ids = _select_target_ids( + target_target_ids[configuration_name], + platform, + ) + for target_id in target_ids: + labels_and_target_ids.append((label, target_id)) + + if not labels_and_target_ids: + print( + """\ +error: Failed to determine labels and targets. Note, currently `.xcworkspace`s \ +aren't supported. Please make sure you are opening the generated \ +`.xcodeproj` file bundle directly. If you are, try using the "Clean Build \ +Folder" command instead (⇧ ⌘ K). If you still get this error after that, then \ +please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + exit(1) + + return labels_and_target_ids + + +def _calculate_guid_labels_and_target_ids(base_objroot): + pif_cache = f"{base_objroot}/XCBuildData/PIFCache" + project_cache = f"{pif_cache}/project" + target_cache = f"{pif_cache}/target" + + # The PIF cache will only be created before the `SetSessionUserInfo` + # command, which normally happens when a project is opened. If Derived Data + # is cleared while the project is open + if not (os.path.exists(project_cache) and os.path.exists(target_cache)): + print( + f"""\ +error: PIFCache ({pif_cache}) doesn't exist. If you manually cleared Derived \ +Data, you need to close and re-open the project for the PIFCache to be created \ +again. Using the "Clean Build Folder" command instead (⇧ ⌘ K) won't trigger \ +this error. If this error still happens after re-opening the project, please \ +file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + project_pif = max( + glob.iglob(f"{project_cache}/*"), + key = os.path.getctime, + ) + + guid_payload_parent = f"{base_objroot}/guid_payload" + guid_payload_path = f"""\ +{guid_payload_parent}/{os.path.basename(project_pif)}_v2.json""" + + if os.path.exists(guid_payload_path): + with open(guid_payload_path, encoding = "utf-8") as f: + payload = json.load(f) + return payload["labels"], payload["targetIds"] + + with open(project_pif, encoding = "utf-8") as f: + project_pif = json.load(f) + + targets = project_pif["targets"] + + guid_labels = {} + guid_target_ids = {} + for target_name in targets: + target_file = f"{target_cache}/{target_name}-json" + with open(target_file, encoding = "utf-8") as f: + target_pif = json.load(f) + + label = None + build_target_ids = {} + compile_target_ids = {} + for configuration in target_pif["buildConfigurations"]: + config_build_target_ids = {"key": "BAZEL_TARGET_ID"} + config_compile_target_ids = {"key": "BAZEL_COMPILE_TARGET_IDS"} + for key, value in configuration["buildSettings"].items(): + if key.startswith("BAZEL_TARGET_ID"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_TARGET_ID)` is used later + # in this processing to pull from an inherited setting. + if value == "$(BAZEL_TARGET_ID)": + target_ids = value + else: + # This is only a single value but the later parsing of + # these target ids assumes a list. + target_ids = [value] + + config_build_target_ids[_platform_from_build_key(key)] = ( + target_ids + ) + elif key.startswith("BAZEL_COMPILE_TARGET_IDS"): + # This uses a list in the case where the value isn't meant to + # be inherited. Otherwise, `$(BAZEL_COMPILE_TARGET_IDS)` is + # used later in this processing to pull from an inherited + # setting. + if value == "$(BAZEL_COMPILE_TARGET_IDS)": + target_ids = "$(BAZEL_COMPILE_TARGET_IDS)" + else: + # Target identifiers contain a space but are space separated. + # Split on all spaces then rejoin across the identifier pairs. + target_ids = value.split(" ") + target_ids = [ + " ".join(target_ids[i:i+2]) + for i in range(0, len(target_ids), 2) + ] + + config_compile_target_ids[_platform_from_compile_key(key)] = ( + target_ids + ) + elif key == "BAZEL_LABEL": + label = value + configuration_name = configuration["name"] + build_target_ids[configuration_name] = config_build_target_ids + compile_target_ids[configuration_name] = config_compile_target_ids + + if not label: + # `BazelDependency` and the like + continue + + target_ids = { + "build": build_target_ids, + } + if len(compile_target_ids) > 1: + target_ids["buildFiles"] = compile_target_ids + + guid = target_pif["guid"] + guid_labels[guid] = label + guid_target_ids[guid] = target_ids + + os.makedirs(guid_payload_parent, exist_ok = True) + with open(guid_payload_path, "w", encoding = "utf-8") as f: + payload = { + "labels": guid_labels, + "targetIds": guid_target_ids, + } + json.dump(payload, f) + + return guid_labels, guid_target_ids + + +def _platform_from_build_key(key): + if key.startswith("BAZEL_TARGET_ID[sdk="): + return key[20:-2] + return "" + + +def _platform_from_compile_key(key): + if key.startswith("BAZEL_COMPILE_TARGET_IDS[sdk="): + return key[29:-2] + return "" + + +def _select_target_ids(target_ids, platform): + key = target_ids["key"] + + platforms = {platform: None} + + # We need to try other similar platforms (i.e. other simulator platforms if + # `platform`` is for a simulator). This is to support schemes with targets + # of multiple platforms in them. Because `dict` is insertion ordered, + # `platform` will be checked first. + platforms.update(_similar_platforms(platform)) + + for platform in platforms: + platform_target_ids = target_ids.get(platform) + if platform_target_ids: + if platform_target_ids == f"$({key})": + return target_ids[""] + return platform_target_ids + return target_ids[""] + + +def _similar_platforms(platform): + if platform == "macosx" or "simulator" in platform: + return _SIMULATOR_PLATFORMS + return _DEVICE_PLATFORMS + + +def _main( + xcode_version, + objroot, + base_objroot, + marker_file, + prefixes_str): + if not os.path.exists(marker_file): + return + + build_request_min_ctime = os.path.getctime(marker_file) + + try: + xcode_version = int(xcode_version) + except ValueError: + print( + """ +warning: xcode_version was not an integer. Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md +""", + file = sys.stderr, + ) + xcode_version = 9999 + + prefixes = prefixes_str.split(",") + + try: + build_request = _get_build_request( + xcode_version, + objroot, + build_request_min_ctime, + ) + guid_labels, guid_target_ids = ( + _calculate_guid_labels_and_target_ids(base_objroot) + ) + except Exception: + print( + f"""\ +error: Failed to calculate labels and target ids from PIFCache: +{traceback.format_exc()} +Please file a bug report here: \ +https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md""", + file = sys.stderr, + ) + sys.exit(1) + + labels_and_target_ids = _calculate_label_and_target_ids( + build_request, + guid_labels, + guid_target_ids, + ) + + print("\n".join( + [ + f"{label}\n{prefix} {id}" + for label, id in labels_and_target_ids + for prefix in prefixes + ], + )) + + +if __name__ == "__main__": + _main( + # XCODE_VERSION_ACTUAL + sys.argv[1], + # non_preview_objroot + sys.argv[2], + # base_objroot + sys.argv[3], + # build_marker_file + sys.argv[4], + # output_group_prefixes + sys.argv[5], + ) diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/cc.dia b/m323.xcodeproj/rules_xcodeproj/bazel/cc.dia new file mode 100644 index 0000000..c85cbfc Binary files /dev/null and b/m323.xcodeproj/rules_xcodeproj/bazel/cc.dia differ diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/clang.sh b/m323.xcodeproj/rules_xcodeproj/bazel/clang.sh new file mode 100755 index 0000000..a327a2a --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/clang.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -euo pipefail + +while test $# -gt 0 +do + case $1 in + -MF) + shift + touch "$1" + ;; + --serialize-diagnostics) + shift + cp "${BASH_SOURCE%/*}/cc.dia" "$1" + ;; + *.o) + break + ;; + -v) + # TODO: Make this work with custom toolchains + DEV_DIR_PREFIX=$(awk '{ sub(/.*-isysroot /, ""); sub(/.Contents\/Developer.*/, ""); print}' <<< "${@:1}") + clang="$DEV_DIR_PREFIX/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + "$clang" "${@:1}" + break + ;; + esac + + shift +done diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh b/m323.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh new file mode 100755 index 0000000..95a7457 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/copy_dsyms.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +function patch_dsym() { + local dsym_name="$1" + + shopt -s extglob + local binary_name="${dsym_name%.dSYM}" + binary_name="${binary_name%@(.app|.appex|.bundle|.dext|.kext|.framework|.pluginkit|.systemextension|.xctest|.xpc)}" + shopt +s extglob + + local binary_path="${dsym_name}/Contents/Resources/DWARF/${binary_name}" + + if [[ ! -f "$binary_path" ]]; then + echo "dSYM DWARF ${binary_path} does not exist." \ + "Skip dSYM patch." + return 1 + fi + + local dwarf_uuid + dwarf_uuid=$(dwarfdump --uuid "${binary_path}" | cut -d ' ' -f 2) + if [[ -z "${dwarf_uuid// /}" ]]; then + echo "Failed to get dSYM uuid." \ + "Skip dSYM patch." + return 1 + fi + + cat > "${dsym_name}/Contents/Resources/${dwarf_uuid}.plist" < + + + DBGVersion + 3 + DBGSourcePathRemapping + + ./bazel-out/ + $BAZEL_OUT/ + ./external/ + $BAZEL_EXTERNAL/ + ./ + $SRCROOT/ + + + +EOF +} + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ -n "${BAZEL_OUTPUTS_DSYM:-}" ]]; then + cd "${BAZEL_OUT%/*}" + + # shellcheck disable=SC2046 + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --archive \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + $(xargs -n1 <<< "$BAZEL_OUTPUTS_DSYM") \ + "$TARGET_BUILD_DIR" + + cd "${TARGET_BUILD_DIR}" + + export -f patch_dsym + # shellcheck disable=SC2016 + xargs -n1 sh -c 'patch_dsym $(basename "$1")' _ \ + <<< "$BAZEL_OUTPUTS_DSYM" +fi diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh b/m323.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh new file mode 100755 index 0000000..6c1ce5c --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/copy_outputs.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +set -euo pipefail + +# readonly forced_swift_compile_file="$1" +readonly exclude_list="$2" + +# # Touching this file on an error allows indexing to work better +# trap 'echo "private let touch = \"$(date +%s)\"" > "$DERIVED_FILE_DIR/$forced_swift_compile_file"' ERR + +readonly test_frameworks=( + "libXCTestBundleInject.dylib" + "libXCTestSwiftSupport.dylib" + "IDEBundleInjection.framework" + "XCTAutomationSupport.framework" + "Testing.framework" + "XCTest.framework" + "XCTestCore.framework" + "XCTestSupport.framework" + "XCUIAutomation.framework" + "XCUnit.framework" +) + +readonly rsync="$BAZEL_INTEGRATION_DIR/rsync" + +if [[ "$ACTION" != indexbuild ]]; then + # Copy product + if [[ -n ${BAZEL_OUTPUTS_PRODUCT:-} ]]; then + cd "${BAZEL_OUTPUTS_PRODUCT%/*}" + + if [[ -f "$BAZEL_OUTPUTS_PRODUCT_BASENAME" ]]; then + # Product is a binary, so symlink instead of rsync, to allow for Bazel-set + # rpaths to work + ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME" + else + # Product is a bundle + "$rsync" \ + --copy-links \ + --recursive \ + --times \ + --delete \ + ${exclude_list:+--exclude-from="$exclude_list"} \ + --perms \ + --chmod=u+w \ + --out-format="%n%L" \ + "$BAZEL_OUTPUTS_PRODUCT_BASENAME" \ + "$TARGET_BUILD_DIR" + + if [[ -n "${TEST_HOST:-}" ]]; then + # We need to re-sign test frameworks that Xcode placed into the test + # host un-signed + readonly test_host_app="${TEST_HOST%/*}" + + # Only engage signing workflow if the test host is signed + if [[ -f "$test_host_app/embedded.mobileprovision" ]]; then + codesigning_authority=$(codesign -dvv "$TEST_HOST" 2>&1 >/dev/null | /usr/bin/sed -n -E 's/^Authority=(.*)/\1/p'| head -n 1) + + for framework in "${test_frameworks[@]}"; do + framework="$test_host_app/Frameworks/$framework" + if [[ -e "$framework" ]]; then + codesign -f \ + --preserve-metadata=identifier,entitlements,flags \ + --timestamp=none \ + --generate-entitlement-der \ + -s "$codesigning_authority" \ + "$framework" + fi + done + fi + fi + + # Incremental installation can fail if an embedded bundle is recompiled but + # the Info.plist is not updated. This causes the delta bundle that Xcode + # actually installs to not have a bundle ID for the embedded bundle. We + # avoid this potential issue by always including the Info.plist in the delta + # bundle by touching them. + # Source: https://github.com/bazelbuild/tulsi/commit/27354027fada7aa3ec3139fd686f85cc5039c564 + # TODO: Pass the exact list of files to touch to this script + readonly plugins_dir="$TARGET_BUILD_DIR/${PLUGINS_FOLDER_PATH:-}" + if [[ -d "$plugins_dir" ]]; then + find "$plugins_dir" -depth 2 -name "Info.plist" -exec touch {} \; + fi + + # Xcode Previews has a hard time finding frameworks (`@rpath`) when using + # framework schemes, so let's symlink them into + # `$TARGET_BUILD_DIR` (since we modify `@rpath` to always include + # `@loader_path/SwiftUIPreviewsFrameworks`) + if [[ "${ENABLE_PREVIEWS:-}" == "YES" && \ + -n "${PREVIEW_FRAMEWORK_PATHS:-}" ]]; then + mkdir -p "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + cd "$TARGET_BUILD_DIR/$WRAPPER_NAME/SwiftUIPreviewsFrameworks" + + # shellcheck disable=SC2016 + xargs -n1 sh -c 'ln -shfF "$1" $(basename "$1")' _ \ + <<< "$PREVIEW_FRAMEWORK_PATHS" + fi + fi + fi +fi + +# TODO: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/402 +# Copy diagnostics, and on a change +# `echo "private let touch = \"$(date +%s)\"" > $DERIVED_FILE_DIR/$forced_swift_compile_file"` +# See git blame for this comment for an example diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh b/m323.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh new file mode 100755 index 0000000..dcec422 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/create_lldbinit.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -euo pipefail + +readonly execution_root="$PROJECT_DIR" +readonly build_external="$execution_root/external" + +{ + +# Set `CWD` to `$execution_root` so relative paths in binaries work +# +# This is needed because we use the `oso_prefix_is_pwd` feature, which makes the +# paths to archives relative to the exec root. +echo "platform settings -w \"$execution_root\"" + +# "Undo" `-debug-prefix-map` for breakpoints +# +# This needs to cause the files to match exactly what Xcode set for breakpoints, +# which is why we don't use `$execution_root` here. Xcode will set the path +# based on the way you opened a file. If you open a file via the Project +# navigator, or indexing (e.g. Jump to Definition), it will use the paths +# specified below. + +# `bazel-out` when set from Project navigator or swiftsourcefile +echo "settings set target.source-map ./bazel-out/ \"$BAZEL_OUT\"" + +# `external` when set from Project navigator +echo "settings append target.source-map ./external/ \"$BAZEL_EXTERNAL\"" +# `external` when set from swiftsourcefile +echo "settings append target.source-map ./external/ \"$build_external\"" + +if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + readonly output_base="${execution_root%/*/*}" + + readonly workspace_name="${execution_root##*/}" + readonly index_execution_root="${output_base%/*}/indexbuild_output_base/execroot/$workspace_name" + + readonly index_bazel_out="$index_execution_root/bazel-out" + readonly index_external="$index_execution_root/external" + + mkdir -p "$index_bazel_out" + mkdir -p "$index_external" + + # `bazel-out` when set from indexing opened file + echo "settings append target.source-map ./bazel-out/ \"$index_bazel_out\"" + # `external` when set from indexing opened file + echo "settings append target.source-map ./external/ \"$index_external\"" +fi + +# Project files and locally resolved external repositories +# +# lldb seems to match breakpoints based on the second argument, using a simple +# prefix check that doesn't take into account the trailing slash. This means +# that we have to order the source-map settings so that the longest paths are +# first, otherwise an earlier setting can prevent a later setting from matching. +if [[ -n "${RESOLVED_REPOSITORIES:-}" ]]; then + # `external` for local repositories when set from Project navigator, + # and the project root + while IFS='' read -r x; do repos+=("$x"); done < <(xargs -n1 <<< "$RESOLVED_REPOSITORIES") + for (( i=0; i<${#repos[@]}; i+=2 )); do + prefix="${repos[$i]}" + path="${repos[$i+1]}" + echo "settings append target.source-map \"$prefix/\" \"$path\"" + done +fi + +# Import swift_debug_settings.py +# +# This Python module sets a stop hook, that when hit, sets the Swift debug +# settings (i.e. `target.swift-*``) for the module of the current frame. This +# fixes debugging when using `-serialize-debugging-options`. +echo "command script import \"$OBJROOT/$CONFIGURATION/swift_debug_settings.py\"" + +} > "$BAZEL_LLDB_INIT" diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist b/m323.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist new file mode 100644 index 0000000..a2d6c45 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/framework.exclude.rsynclist @@ -0,0 +1,2 @@ +/*.framework/Modules/*** +/*.framework/SwiftUIPreviewsFrameworks/*** diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh b/m323.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh new file mode 100755 index 0000000..a8506e4 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/generate_bazel_dependencies.sh @@ -0,0 +1,217 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +# Calculate Bazel `--output_groups` + +if [ "$ACTION" == "indexbuild" ]; then + echo >&2 "error: \`BazelDependencies\` should not run during Index Build." \ +"Please file a bug report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" + exit 1 +else + if [[ "${ENABLE_PREVIEWS:-}" == "YES" ]]; then + # Compile params, products (i.e. bundles) and index store data, and link + # params + readonly output_group_prefixes="bc,bp,bl" + else + # Products (i.e. bundles) and index store data + readonly output_group_prefixes="bp" + fi + + # In Xcode 14 the "Index" directory was renamed to "Index.noindex". + # `$INDEX_DATA_STORE_DIR` is set to `$OBJROOT/INDEX_DIR/DataStore`, so we can + # use it to determine the name of the directory regardless of Xcode version. + readonly index_dir="${INDEX_DATA_STORE_DIR%/*}" + readonly index_dir_name="${index_dir##*/}" + + # Xcode doesn't adjust `$OBJROOT` in scheme action scripts when building for + # previews. So we need to look in the non-preview build directory for this file. + readonly non_preview_objroot="${OBJROOT/\/Intermediates.noindex\/Previews\/*//Intermediates.noindex}" + readonly base_objroot="${non_preview_objroot/\/$index_dir_name\/Build\/Intermediates.noindex//Build/Intermediates.noindex}" + readonly build_marker_file="$non_preview_objroot/build_marker" + + # We need to read from `$output_groups_file` as soon as possible, as concurrent + # writes to it can happen during indexing, which breaks the off-by-one-by-design + # nature of it + IFS=$'\n' read -r -d '' -a labels_and_output_groups < \ + <( "$CALCULATE_OUTPUT_GROUPS_SCRIPT" \ + "$XCODE_VERSION_ACTUAL" \ + "$non_preview_objroot" \ + "$base_objroot" \ + "$build_marker_file" \ + $output_group_prefixes \ + && printf '\0' ) + + readonly outputgroup_regex='[^\ ]+ @{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + raw_labels=() + raw_target_ids=() + output_groups=("index_import" "target_ids_list") + indexstores_filelists=() + for (( i=0; i<${#labels_and_output_groups[@]}; i+=2 )); do + raw_labels+=("${labels_and_output_groups[i]}") + + output_group="${labels_and_output_groups[i+1]}" + raw_target_ids+=("${output_group#* }") + output_groups+=("$output_group") + + output_type="${output_group%% *}" + + if [[ "$output_type" == 'xi' || "$output_type" == 'bi' ]]; then + if [[ $output_group =~ $outputgroup_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-${output_type}.filelist" + + indexstores_filelists+=("$filelist") + fi + fi + done + readonly indexstores_filelists + + if [ "${#output_groups[@]}" -eq 1 ]; then + echo "BazelDependencies invoked without any output groups set." \ + "Exiting early." + exit + else + labels=() + while IFS= read -r -d '' label; do + labels+=("$label") + done < <(printf "%s\0" "${raw_labels[@]}" | sort -uz) + + target_ids=() + while IFS= read -r -d '' target_id; do + target_ids+=("$target_id") + done < <(printf "%s\0" "${raw_target_ids[@]}" | sort -uz) + fi +fi + +# Build + +build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,sourceinfo} files for indexing + # - .a and .swiftmodule files for lldb + # - primary compilation input files (.c, .C, .cc, .cl, .cpp, .cu, .cxx, .c++, + # .m, .mm, .swift) for Xcode build input checking + # - files needed for Clang importer (headers, modulemaps, yaml files, etc.) + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +apply_sanitizers=1 +if [ "$ACTION" == "indexbuild" ]; then + readonly config="${BAZEL_CONFIG}_indexbuild" + + # Index Build doesn't need sanitizers + apply_sanitizers=0 +elif [ "${ENABLE_PREVIEWS:-}" == "YES" ]; then + readonly config="${BAZEL_CONFIG}_swiftuipreviews" +elif [ "${CLANG_COVERAGE_MAPPING:-}" == YES ] && [ "${BAZEL_SUPPRESS_COVERAGE_BUILD:-}" != YES ]; then + # Code coverage build + # + # CLANG_COVERAGE_MAPPING is set to YES when the active scheme's test action has code coverage enabled. It is configured + # irrespective of the value of ENABLE_CODE_COVERAGE, and of whether the current build action is for testing or not. + # + # We would rather use ENABLE_CODE_COVERAGE here, but the value of that setting is often YES even when code coverage is not + # enabled in the active scheme. + readonly config="${BAZEL_CONFIG}_coverage" + + echo "warning: Code coverage is enabled. In order to maintain compatibility with Xcode, the instrumented build is not hermetic. Remote cache performance will be affected." >&2 +else + readonly config="_${BAZEL_CONFIG}_build" +fi + +# Respect the "Continue building after errors" setting +continue_building_value="$(defaults read com.apple.dt.Xcode IDEBuildingContinueBuildingAfterErrors 2>/dev/null || echo 0)" +if [ "$continue_building_value" == "1" ]; then + build_pre_config_flags+=("--keep_going") +else + build_pre_config_flags+=("--nokeep_going") +fi + +# Runtime Sanitizers +if [[ $apply_sanitizers -eq 1 ]]; then + if [ "${ENABLE_ADDRESS_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=address + --linkopt=-fsanitize=address + --@@rules_swift+//swift:copt=-sanitize=address + --copt=-Wno-macro-redefined + --copt=-D_FORTIFY_SOURCE=0 + ) + fi + if [ "${ENABLE_THREAD_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=thread + --linkopt=-fsanitize=thread + --@@rules_swift+//swift:copt=-sanitize=thread + ) + fi + if [ "${ENABLE_UNDEFINED_BEHAVIOR_SANITIZER:-}" == "YES" ]; then + build_pre_config_flags+=( + --copt=-fno-omit-frame-pointer + --copt=-fno-sanitize-recover=all + --copt=-fsanitize=undefined + --linkopt=-fsanitize=undefined + ) + fi +fi +readonly build_pre_config_flags + +# `bazel_build.sh` sets `output_path` +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Async actions +# +# For these commands to run in the background, both stdout and stderr need to be +# redirected, otherwise Xcode will block the run script. + +readonly log_dir="$OBJROOT/rules_xcodeproj_logs" +mkdir -p "$log_dir" + +# Report errors from previous async actions +shopt -s nullglob +for log in "$log_dir"/*.async.log; do + if [[ -s "$log" ]]; then + command=$(basename "${log%.async.log}") + echo "warning: Previous run of \"$command\" had output:" >&2 + sed "s|^|warning: |" "$log" >&2 + echo "warning: If you believe this is a bug, please file a report here:" \ +"https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/new?template=bug.md" \ + >&2 + fi +done + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" \ + >"$log_dir/import_indexstores.async.log" 2>&1 & + fi +fi diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh b/m323.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh new file mode 100755 index 0000000..aa6f267 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/generate_index_build_bazel_dependencies.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +set -euo pipefail + +cd "$SRCROOT" + +readonly config="${BAZEL_CONFIG}_indexbuild" + +# Compiled outputs (i.e. swiftmodules) and generated inputs +output_groups=( + # Compile params + "bc $BAZEL_TARGET_ID" + # Indexstores and their filelist. Requesting indexstore directories triggers + # transitive Swift compilation (producing swiftmodules, indexstores, and + # generated headers) without linking, avoiding large product binaries. We use + # `--remote_download_regex` below to download the files we care + # about. + "bi $BAZEL_TARGET_ID" +) + +indexstores_filelists=() +if [[ "$IMPORT_INDEX_BUILD_INDEXSTORES" == "YES" ]]; then + output_groups+=( + "index_import" + ) + + readonly targetid_regex='@{0,2}(.*)//(.*):(.*) ([^\ ]+)$' + + if [[ "$BAZEL_TARGET_ID" =~ $targetid_regex ]]; then + repo="${BASH_REMATCH[1]}" + if [[ "$repo" == "@" ]]; then + repo="" + fi + + package="${BASH_REMATCH[2]}" + target="${BASH_REMATCH[3]}" + configuration="${BASH_REMATCH[4]}" + filelist="$configuration/bin/${repo:+"external/$repo/"}$package/$target-bi.filelist" + + indexstores_filelists+=("$filelist") + fi + + readonly indexstores_regex='.*\.indexstore/.*|' +else + readonly indexstores_regex='' +fi + +readonly build_pre_config_flags=( + # Include the following: + # + # - .indexstore directories to allow importing indexes + # - .swift{doc,module,sourceinfo} files for indexing + # - compilation input files (.cfg, .c, .C .cc, .cl, .cpp, .cu, .cxx, .c++, + # .def, .h, .H, .hh, .hpp, .hxx, .h++, .hmap, .ilc, .inc, .ipp, .tcc, .tlh, + # .tpp, .m, .modulemap, .mm, .pch, .swift, .yaml) for index compilation + # + # This is brittle. If different file extensions are used for compilation + # inputs, they will need to be added to this list. Ideally we can stop doing + # this once Bazel adds support for a Remote Output Service. + "--remote_download_regex=${indexstores_regex}.*\.(cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$" +) + +source "$BAZEL_INTEGRATION_DIR/bazel_build.sh" + +# Import indexes +if [ -n "${indexstores_filelists:-}" ]; then + if [[ "${BAZEL_SEPARATE_INDEXBUILD_OUTPUT_BASE:-}" == "YES" ]]; then + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$INDEXING_PROJECT_DIR__NO" \ + "${indexstores_filelists[@]/#/$output_path/}" + else + "$BAZEL_INTEGRATION_DIR/import_indexstores" \ + "$PROJECT_DIR" \ + "${indexstores_filelists[@]/#/$BAZEL_OUT/}" + fi +fi diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/import_indexstores b/m323.xcodeproj/rules_xcodeproj/bazel/import_indexstores new file mode 100755 index 0000000..a2bfe93 Binary files /dev/null and b/m323.xcodeproj/rules_xcodeproj/bazel/import_indexstores differ diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/ld b/m323.xcodeproj/rules_xcodeproj/bazel/ld new file mode 100755 index 0000000..2156250 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/ld @@ -0,0 +1,30 @@ +#!/bin/bash + +set -euo pipefail + +passthrough_args=("${@:1}") + +while test $# -gt 0 +do + case $1 in + *_dependency_info.dat) + ld_version=$(ld -v 2>&1 | grep ^@) + printf "\0%s\0" "$ld_version" > "$1" + break + ;; + + -isysroot) + shift + # PATH/DEVELOPER_DIR isn't set when this is called, so we need to calculate + # the developer dir from the sysroot to invoke clang (used below) + developer_dir="${1/\/Platforms\/*/}" + ;; + + *.preview-thunk.dylib) + # Pass through for SwiftUI Preview thunk compilation + # TODO: Make this work with custom toolchains + exec "$developer_dir/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "${passthrough_args[@]}" + ;; + esac + shift +done diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/libtool b/m323.xcodeproj/rules_xcodeproj/bazel/libtool new file mode 100755 index 0000000..ec4d7df --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/libtool @@ -0,0 +1,21 @@ +#!/bin/bash + +set -euo pipefail + +original_args=("$@") + +while test $# -gt 0 +do + case $1 in + -V) + # Xcode 15+ needs to know the version of libtool + exec libtool "${original_args[@]}" + ;; + *_dependency_info.dat) + printf "\0 \0" > "$1" + break + ;; + esac + + shift +done diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py b/m323.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py new file mode 100755 index 0000000..ff05b5a --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/process_bazel_build_log.py @@ -0,0 +1,124 @@ +#!/usr/bin/python3 + +import os +import re +import subprocess +import sys +from typing import List +import signal + + +STRIP_COLOR_RE = re.compile(r"\x1b\[[0-9;]{1,}[A-Za-z]") +RELATIVE_DIAGNOSTICS_RE = re.compile( + r""" + ^ + (?P.+?:\d+(?::\d+)?:\s) # Capture location (e.g. "foo/bar:12:3: ") + (?:fatal\s)? # Dropping "fatal " + (?P(?:error|warning):\s) # Capture severity + (?P.*) # Capture the rest of the message + """, + re.VERBOSE, +) + +def _uppercase_first_letter(s: str) -> str: + return s[:1].upper() + s[1:] + +def _main(command: List[str]) -> None: + + def _signal_handler(signum, frame): + """Print signal information and ignore the signal.""" + signal_name = signal.Signals(signum).name + print(f"\nReceived signal {signal_name} ({signum})\n", file=sys.stderr) + return + + # Set up signal handler for SIGINT + signal.signal(signal.SIGINT, _signal_handler) + + srcroot = os.getenv("SRCROOT") + if not srcroot: + sys.exit("SRCROOT environment variable must be set") + + execution_root = os.getenv("PROJECT_DIR") + if not execution_root: + sys.exit("PROJECT_DIR environment variable must be set") + + bazel_out_directory = os.getenv("BAZEL_OUT") + if not bazel_out_directory: + sys.exit("BAZEL_OUT environment variable must be set") + bazel_out_prefix = bazel_out_directory[:-len("/bazel-out")] + if not bazel_out_prefix.startswith("/"): + bazel_out_prefix = f"{srcroot}/{bazel_out_prefix}" + + external_directory = os.getenv("BAZEL_EXTERNAL") + if not external_directory: + sys.exit("BAZEL_EXTERNAL environment variable must be set") + external_prefix = bazel_out_directory[:-len("/external")] + if not external_prefix.startswith("/"): + external_prefix = f"{srcroot}/{external_prefix}" + + should_strip_color = os.getenv("COLOR_DIAGNOSTICS", default="YES") != "YES" + + has_relative_diagnostic = False + + def _replacement(match: re.Match) -> str: + message = f"""\ +{match.group("loc")}{match.group("sev")}{_uppercase_first_letter(match.group("msg"))}\ +""" + + if message.startswith(execution_root): + # VFS overlays can make paths absolute, so make them relative again + message = message[(len(execution_root) + 1):] + + if message.startswith("/"): + # If still an absolute path, don't add a prefix + return message + + if message.startswith("bazel-out/"): + prefix = bazel_out_prefix + elif message.startswith("external/"): + prefix = external_prefix + else: + prefix = srcroot + + return f"{prefix}/{message}" + + process = subprocess.Popen( + command, bufsize=1, stderr=subprocess.PIPE, universal_newlines=True + ) + assert process.stderr + + def _process_log_line(line: str): + input_line = line.rstrip() + + if should_strip_color: + input_line = STRIP_COLOR_RE.sub("", input_line) + + if not input_line: + return + + output_line = RELATIVE_DIAGNOSTICS_RE.sub(_replacement, input_line) + # Record if we have performed a relative diagnostic substitution. + if output_line != input_line: + nonlocal has_relative_diagnostic + has_relative_diagnostic = True + + print(output_line, flush=True) + + while process.poll() is None: + _process_log_line(process.stderr.readline()) + + for line in process.stderr: + _process_log_line(line) + + # If the Bazel invocation failed and there was no formatted error found, + # print a nicer error message instead of a cryptic in Xcode: + # 'Command PhaseScriptExecution failed with a nonzero exit code' + if process.returncode != 0 and not has_relative_diagnostic: + print("error: The bazel build failed, please check the report navigator, " + "which may have more context about the failure.") + + sys.exit(process.returncode) + + +if __name__ == "__main__": + _main(sys.argv[1:]) diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/rsync b/m323.xcodeproj/rules_xcodeproj/bazel/rsync new file mode 100755 index 0000000..f617c07 Binary files /dev/null and b/m323.xcodeproj/rules_xcodeproj/bazel/rsync differ diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/swiftc b/m323.xcodeproj/rules_xcodeproj/bazel/swiftc new file mode 100755 index 0000000..9fb0d47 Binary files /dev/null and b/m323.xcodeproj/rules_xcodeproj/bazel/swiftc differ diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist b/m323.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist new file mode 100644 index 0000000..6f37a4d --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/watchos2_app.exclude.rsynclist @@ -0,0 +1,27 @@ +/*.app/Contents/Frameworks/libclang_rt.asan*.dylib +/*.app/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.app/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Contents/Frameworks/libXCTestBundleInject.dylib +/*.app/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Contents/Frameworks/Testing.framework, +/*.app/Contents/Frameworks/XCTAutomationSupport.framework +/*.app/Contents/Frameworks/XCTest.framework +/*.app/Contents/Frameworks/XCTestCore.framework +/*.app/Contents/Frameworks/XCTestSupport.framework +/*.app/Contents/Frameworks/XCUIAutomation.framework +/*.app/Contents/Frameworks/XCUnit.framework +/*.app/Frameworks/libclang_rt.asan*.dylib +/*.app/Frameworks/libclang_rt.tsan*.dylib +/*.app/Frameworks/libclang_rt.ubsan*.dylib +/*.app/Frameworks/libXCTestBundleInject.dylib +/*.app/Frameworks/libXCTestSwiftSupport.dylib +/*.app/Frameworks/Testing.framework, +/*.app/Frameworks/XCTAutomationSupport.framework +/*.app/Frameworks/XCTest.framework +/*.app/Frameworks/XCTestCore.framework +/*.app/Frameworks/XCTestSupport.framework +/*.app/Frameworks/XCUIAutomation.framework +/*.app/Frameworks/XCUnit.framework +/*.app/PlugIns/*** +/*.app/_WatchKitStub/*** +/*.app/PlugIns/*.xctest diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc b/m323.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc new file mode 100644 index 0000000..a611ea8 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/xcodeproj.bazelrc @@ -0,0 +1,139 @@ +### `--config=rules_xcodeproj` +# +# Used directly when doing a normal build, but it is also the base config of all +# the `rules_xcodeproj_*` configs. Adjust this config if you want something to +# apply to all builds (which should be most settings). + +common:rules_xcodeproj --verbose_failures + +# Increase the default file digest cache size to 500k entries, as 50k (the +# default) is too small for large projects. +common:rules_xcodeproj --cache_computed_file_digests=500000 + +# We default to `dbg` since debugging is broken otherwise +common:rules_xcodeproj --compilation_mode=dbg + +# Xcode builds shouldn't mess with the workspace's symlinks +common:rules_xcodeproj --experimental_convenience_symlinks=ignore + +# Projects with large C/C++ target command-lines can fail to generate due +# without using params files. While the targets themselves might use params +# files, currently `Action.args` won't unless +# `--experimental_use_cpp_compile_action_args_params_file` is set. +# https://github.com/bazelbuild/bazel/issues/20746 would allow us to remove the +# need for this flag. +common:rules_xcodeproj --experimental_use_cpp_compile_action_args_params_file + +# Not using `--define=apple.experimental.tree_artifact_outputs=1` is slow (we +# have to unzip an archive on each build). If this doesn't work for your +# project, you can set `--define=apple.experimental.tree_artifact_outputs=0` +# on `common:rules_xcodeproj` in your `.bazelrc` or `xcodeproj.bazelrc` file. +common:rules_xcodeproj --define=apple.experimental.tree_artifact_outputs=1 + +# Fix Test Issue navigation +common:rules_xcodeproj --features=apple.swizzle_absolute_xcttestsourcelocation + +# `oso_prefix_is_pwd` removes absolute paths in debug info, which increases +# cache hit rates. We "undo" this in `bazel.lldbinit`, so debugging still works. +common:rules_xcodeproj --features=oso_prefix_is_pwd + +# `relative_ast_path` uses relative paths when passing `--add_ast_path` to the +# linker, which increases cache hit rates. We "undo" this in `bazel.lldbinit`, +# so debugging still works. +common:rules_xcodeproj --features=relative_ast_path + +# `swift.cacheable_swiftmodules` passes `-no-serialize-debugging-options` to +# `swiftc`, which fixes lldb crashes and increases cache hit rates. We "undo" +# this in `swift_debug_settings.py`, so debugging still works. +common:rules_xcodeproj --features=swift.cacheable_swiftmodules + +# `swift.index-while-building` passes `-index-store-path` to `swiftc`, which +# generates index store data. We enable this globally, because we import indexes +# in Index Build as well. And even if we didn't, we would still want it enabled +# to get cache hits between normal and Index Build builds. +common:rules_xcodeproj --features=swift.index_while_building +common:rules_xcodeproj --features=swift.use_global_index_store + +# Removes potentially large unneeded event from the BEP +common:rules_xcodeproj --nolegacy_important_outputs + +# `--show_result=0` prevents showing the spec.json and intermediate `.xcodeproj` +# in the logs when generating, and all of the many outputs when building +common:rules_xcodeproj --show_result=0 + +# Disable sandboxing. Sandboxing on macOS is still very slow. +common:rules_xcodeproj --noworker_sandboxing +common:rules_xcodeproj --spawn_strategy=remote,worker,local + +# Needed to download aspect output groups +build:rules_xcodeproj --remote_download_outputs=toplevel + +### `--config=rules_xcodeproj_generator` +# +# Used when generating a project. + +common:rules_xcodeproj_generator --config=rules_xcodeproj + +### `--config=rules_xcodeproj_indexbuild` +# +# Used when doing an Index Build. + +common:rules_xcodeproj_indexbuild --config=rules_xcodeproj + +# Disable BES for Index Builds, as it runs a lot, and isn't user invoked +common:rules_xcodeproj_indexbuild --bes_backend= --bes_results_url= + +### `--config=rules_xcodeproj_coverage` +# +# Used when doing building for code coverage. + +common:rules_xcodeproj_coverage --config=rules_xcodeproj + +# Enable features that allow for building for instrumentation. +# +# Of particular note are the (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +# features, which remap the execroot during the build as the absolute, canonical path +# to the source root. +# +# This approach breaks remote caching when building for testing and codeCoverageEnabled +# is set to YES, but does not affect other builds (for running, or for testing without +# coverage). +common:rules_xcodeproj_coverage --features=coverage +common:rules_xcodeproj_coverage --features=llvm_coverage_map_format +common:rules_xcodeproj_coverage --features=_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=swift.coverage +common:rules_xcodeproj_coverage --features=swift._coverage_prefix_map_absolute_sources_non_hermetic + +# Disable features that interfere with (swift./)_coverage_prefix_map_absolute_sources_non_hermetic +common:rules_xcodeproj_coverage --features=-coverage_prefix_map +common:rules_xcodeproj_coverage --features=-file_prefix_map +common:rules_xcodeproj_coverage --features=-swift.coverage_prefix_map +common:rules_xcodeproj_coverage --features=-swift.file_prefix_map + +### `--config=rules_xcodeproj_swiftuipreviews` +# +# Used when doing a Xcode Previews build. + +common:rules_xcodeproj_swiftuipreviews --config=rules_xcodeproj + +# Allow frameworks to find framework dependencies when running a preview +# See `$PROJECT_FILE_PATH/rules_xcodeproj/bazel/copy_outputs.sh` for more info +common:rules_xcodeproj_swiftuipreviews --linkopt="-Wl,-rpath,@loader_path/SwiftUIPreviewsFrameworks" + +# `swiftc` flags needed for SwiftUI Previews +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-implicit-dynamic +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-private-imports +common:rules_xcodeproj_swiftuipreviews --@@rules_swift+//swift:copt=-Xfrontend --@@rules_swift+//swift:copt=-enable-dynamic-replacement-chaining + +### `--config=_rules_xcodeproj_build` +# +# Private implementation detail. Don't adjust this config, adjust +# `rules_xcodeproj` instead. This config exists solely to allow project-level +# configs to work correctly. + +common:_rules_xcodeproj_build --config=rules_xcodeproj + +### Project specific configs + +# Import `xcodeproj.bazelrc` if it exists +try-import %workspace%/xcodeproj.bazelrc diff --git a/m323.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist b/m323.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist new file mode 100644 index 0000000..5ce1dc5 --- /dev/null +++ b/m323.xcodeproj/rules_xcodeproj/bazel/xctest.exclude.rsynclist @@ -0,0 +1,24 @@ +/*.xctest/Contents/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Contents/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Contents/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Contents/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Contents/Frameworks/Testing.framework, +/*.xctest/Contents/Frameworks/XCTAutomationSupport.framework +/*.xctest/Contents/Frameworks/XCTest.framework +/*.xctest/Contents/Frameworks/XCTestCore.framework +/*.xctest/Contents/Frameworks/XCTestSupport.framework +/*.xctest/Contents/Frameworks/XCUIAutomation.framework +/*.xctest/Contents/Frameworks/XCUnit.framework +/*.xctest/Frameworks/libclang_rt.asan*.dylib +/*.xctest/Frameworks/libclang_rt.tsan*.dylib +/*.xctest/Frameworks/libclang_rt.ubsan*.dylib +/*.xctest/Frameworks/libXCTestBundleInject.dylib +/*.xctest/Frameworks/libXCTestSwiftSupport.dylib +/*.xctest/Frameworks/Testing.framework, +/*.xctest/Frameworks/XCTAutomationSupport.framework +/*.xctest/Frameworks/XCTest.framework +/*.xctest/Frameworks/XCTestCore.framework +/*.xctest/Frameworks/XCTestSupport.framework +/*.xctest/Frameworks/XCUIAutomation.framework +/*.xctest/Frameworks/XCUnit.framework diff --git a/m323.xcodeproj/rules_xcodeproj/generated.xcfilelist b/m323.xcodeproj/rules_xcodeproj/generated.xcfilelist new file mode 100755 index 0000000..e69de29 diff --git a/m323.xcodeproj/xcshareddata/xcschemes/01_MapUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/01_MapUebungen.xcscheme new file mode 100644 index 0000000..bfa0d45 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/01_MapUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/02_FilterUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/02_FilterUebungen.xcscheme new file mode 100644 index 0000000..b322e6c --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/02_FilterUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/03_MapUndFilterUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/03_MapUndFilterUebungen.xcscheme new file mode 100644 index 0000000..90deb3f --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/03_MapUndFilterUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/04_FoldLeftUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/04_FoldLeftUebungen.xcscheme new file mode 100644 index 0000000..7e7a83f --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/04_FoldLeftUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/05_FlatMapUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/05_FlatMapUebungen.xcscheme new file mode 100644 index 0000000..3762a24 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/05_FlatMapUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/06_ForComprehensionsUebungen.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/06_ForComprehensionsUebungen.xcscheme new file mode 100644 index 0000000..f2ebd87 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/06_ForComprehensionsUebungen.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/Aufgabe3.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/Aufgabe3.xcscheme new file mode 100644 index 0000000..5968713 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/Aufgabe3.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/LeetCode.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/LeetCode.xcscheme new file mode 100644 index 0000000..1d057f5 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/LeetCode.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/WeDontLikeCharA.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/WeDontLikeCharA.xcscheme new file mode 100644 index 0000000..75a7ac5 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/WeDontLikeCharA.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/m323.xcodeproj/xcshareddata/xcschemes/m323.xcscheme b/m323.xcodeproj/xcshareddata/xcschemes/m323.xcscheme new file mode 100644 index 0000000..0e0f3f1 --- /dev/null +++ b/m323.xcodeproj/xcshareddata/xcschemes/m323.xcscheme @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +