Skip to content

Commit b94e084

Browse files
Improve cross module incremental import (#698)
Before: ``` remark: Incremental compilation: Enabling incremental cross-module building remark: Incremental compilation: May skip current input: {compile: A.swift.o <= A.swift} remark: Incremental compilation: Skipping input: {compile: A.swift.o <= A.swift} remark: Incremental compilation: Not skipping job: Merging module A; Missing output 'bazel-out/darwin_arm64-fastbuild/bin/A.swiftsourceinfo' remark: Starting Merging module A remark: Finished Merging module A remark: Skipped Compiling A.swift ``` After: ``` remark: Incremental compilation: Enabling incremental cross-module building remark: Incremental compilation: May skip current input: {compile: A.swift.o <= A.swift} remark: Incremental compilation: Skipping input: {compile: A.swift.o <= A.swift} remark: Incremental compilation: Skipping job: Merging module A; oldest output is current 'bazel-out/darwin_arm64-fastbuild/bin/A.swiftmodule' remark: Skipped Compiling A.swift ```
1 parent c3bf28c commit b94e084

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/worker/output_file_map.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ void OutputFileMap::UpdateForIncremental(const std::string &path) {
122122
auto copied_swiftdoc_path = MakeIncrementalOutputPath(swiftdoc_path);
123123
incremental_inputs[swiftdoc_path] = copied_swiftdoc_path;
124124

125+
auto swiftsourceinfo_path =
126+
ReplaceExtension(path, ".swiftsourceinfo", /*all_extensions=*/true);
127+
auto copied_swiftsourceinfo_path = MakeIncrementalOutputPath(swiftsourceinfo_path);
128+
incremental_inputs[swiftsourceinfo_path] = copied_swiftsourceinfo_path;
129+
125130
json_ = new_output_file_map;
126131
incremental_outputs_ = incremental_outputs;
127132
incremental_inputs_ = incremental_inputs;

0 commit comments

Comments
 (0)