Hello @thii!
We migrated all our project and its dependencies to bazel but we can't reduce the build time in incremental builds for swift targets.
I added the profiling flag to bazel build command and here are the results loaded in chrome, as you can see there are three "Compiling Swift module Apollo" steps in different threads.

And if I use the official Bazel rule there is only one "Compiling Swift module Apollo" step

So I think that the swift module is being compile 3 times, I tried to modify the swift_static_framework.bzl without success, as far as I understand I guess that it is compiling 3 times because of the 3 header maps (public, private, private angled), each one compiles a swift module?
Do you have the same behavior with Line's dependencies?
Here is the target definition:
load("@rules_apple_line//apple:apple_library.bzl", "swift_library")
swift_library(
name = "Apollo",
srcs = glob(["Apollo/Sources/Apollo/*.swift"]),
module_name = "Apollo",
visibility = ["//visibility:public"],
)
And the trace files:
traces.zip
Hello @thii!
We migrated all our project and its dependencies to bazel but we can't reduce the build time in incremental builds for swift targets.
I added the profiling flag to bazel build command and here are the results loaded in chrome, as you can see there are three "Compiling Swift module Apollo" steps in different threads.
And if I use the official Bazel rule there is only one "Compiling Swift module Apollo" step
So I think that the swift module is being compile 3 times, I tried to modify the swift_static_framework.bzl without success, as far as I understand I guess that it is compiling 3 times because of the 3 header maps (public, private, private angled), each one compiles a swift module?
Do you have the same behavior with Line's dependencies?
Here is the target definition:
And the trace files:
traces.zip