-
Notifications
You must be signed in to change notification settings - Fork 151
Comparing changes
Open a pull request
base repository: bazelbuild/rules_swift
base: 3.0.2
head repository: bazelbuild/rules_swift
compare: 3.1.0
- 6 commits
- 72 files changed
- 5 contributors
Commits on Jun 12, 2025
-
Add
always_include_developer_search_paths
to `mixed_language_librar……y` (#1539) This allows Swift code in the library to depend on XCTest. If this was passed in `kwargs`, it gets passed along to the internal `objc_library` targets: ``` ~/Development/rules_swift master $ bazel build //examples/apple/mixed_language:MixedAnswer ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_headers: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule ERROR: /Users/jschear/Development/rules_swift/examples/apple/mixed_language/BUILD:5:23: //examples/apple/mixed_language:MixedAnswer_clang: no such attribute 'always_include_developer_search_paths' in 'objc_library' rule ``` We _could_ alternatively `.pop` it off of `kwargs` before passing to `objc_library`, but tracking which attributes belong to `swift_library` vs. `obj_library` and which are shared can get a bit complex.
Configuration menu - View commit details
-
Copy full SHA for 580e10c - Browse repository at this point
Copy the full SHA 580e10cView commit details -
Add
clang_deps
attr tomixed_language_library
(#1540)At Square, we're using a headermap for the Swift generated header, so that the objective-C half of a module is able to import it using `#import <Module/Module-Swift.h>`. This headermap target can't be placed in `deps`, as doing so creates a dependency cycle. Here is an example of what the use case looks like: master...jschear:rules_swift:js/demo_swift_header_imports_in_clang_half ``` header_map( name = "swift_headermap", module_name = "MixedAnswer", propagate_include = False, # This relies on us knowing the naming scheme used for internal targets in mixed_language_library, which is not ideal. deps = ["MixedAnswer_swift"], ) mixed_language_library( name = "MixedAnswer", hdrs = ["MixedAnswer.h"], clang_copts = [ "-I$(execpath :swift_headermap)", "-I.", ], clang_deps = [":swift_headermap"], clang_srcs = [ "MixedAnswer.m", "MixedAnswerPrivate.m", "MixedAnswerPrivate.h", ], enable_modules = True, module_name = "MixedAnswer", swift_srcs = [ "MixedAnswer.swift", ], target_compatible_with = ["@platforms//os:macos"], ) ```
Configuration menu - View commit details
-
Copy full SHA for 321bf26 - Browse repository at this point
Copy the full SHA 321bf26View commit details
Commits on Jun 27, 2025
-
Use
ctx.coverage_instrumented
to detect if a target should be instr……umented (#1547) Signed-off-by: Brentley Jones <[email protected]> Co-authored-by: Fabian Meumertzheim <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ccfe585 - Browse repository at this point
Copy the full SHA ccfe585View commit details
Commits on Jul 7, 2025
-
bump buildifier in bazelci and correct new lints (#1548)
also bump rules_cc to 0.1.2
Configuration menu - View commit details
-
Copy full SHA for 37ef09a - Browse repository at this point
Copy the full SHA 37ef09aView commit details -
fix rules_cc for 7.x WORKSPACE/non-bzlmod users (#1549)
only way i could figure to get this to work was to not assist in standing up neither `protobuf_deps()` nor `rules_cc_dependencies()` in `swift_extra_dependencies()` – this works around the ordering issue that breaks transitive dep loading of both rules_python/rules_java and our stardoc configuration
Configuration menu - View commit details
-
Copy full SHA for 7445b2c - Browse repository at this point
Copy the full SHA 7445b2cView commit details
Commits on Jul 9, 2025
-
Fix .swiftsourceinfo readonly bugs in version 3+ (#1550)
Similar to #1533 but when using `--strategy=worker` In rules_swift < 3.x the .swiftsourceinfo files are unconditionally written to the module path. In rules_swift >= 3.x these same files are no longer tracked by Bazel unless explicitly requested. When using non-sandboxed mode, previous builds will contain these files and cause build failures when Swift tries to use them, in order to work around this compatibility issue, we check the module path for the presence of .swiftsourceinfo files and if they are present but not requested, we remove them. Testing: - `bazel clean --expunge` - `git checkout 2.8.2` - `bazel build @com_github_apple_swift_argument_parser//... --strategy=worker,local --worker_sandboxing=false` (pass) - `git checkout master` - `bazel build @com_github_apple_swift_argument_parser//... --strategy=worker,local --worker_sandboxing=false` (failure) - `git checkout <this-branch>` - `bazel build @com_github_apple_swift_argument_parser//... --strategy=worker,local --worker_sandboxing=false` (pass)
Configuration menu - View commit details
-
Copy full SHA for 6d28b81 - Browse repository at this point
Copy the full SHA 6d28b81View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 3.0.2...3.1.0