Skip to content

Commit 11c1ab4

Browse files
porter-stripecodex
andauthored
Ignore import changes in public API check (#6855)
## Summary Ignores regular import lines when diffing generated public Swift interfaces. For example, #6845 reports the removal of import CoreGraphics as a public API change even though it doesn’t change the API exposed to SDK users. ## Motivation #6845 ## Testing - Ruby syntax check - Verified regular imports are filtered while exported imports remain in the diff ## Changelog N/A Co-authored-by: codex <noreply@openai.com>
1 parent ad6c497 commit 11c1ab4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ci_scripts/api_diff/diff_public_interface.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def write_output(path, content)
8282

8383
master_public_interface_path = "#{framework_name}-master.xcframework/#{simulator_slice}/#{public_interface_dir}/arm64-apple-ios-simulator.swiftinterface"
8484
branch_public_interface_path = "#{framework_name}-new.xcframework/#{simulator_slice}/#{public_interface_dir}/arm64-apple-ios-simulator.swiftinterface"
85-
public_diff_lines = sorted_diff_lines(master_public_interface_path, branch_public_interface_path)
85+
public_diff_lines = sorted_diff_lines(master_public_interface_path, branch_public_interface_path).reject do |line|
86+
line.match?(/^[+-]import\s/)
87+
end
8688

8789
master_private_interface_path = "#{framework_name}-master.xcframework/#{simulator_slice}/#{public_interface_dir}/arm64-apple-ios-simulator.private.swiftinterface"
8890
branch_private_interface_path = "#{framework_name}-new.xcframework/#{simulator_slice}/#{public_interface_dir}/arm64-apple-ios-simulator.private.swiftinterface"

0 commit comments

Comments
 (0)