From 070a06bcefc3bc441ec43a2fd11a400444306894 Mon Sep 17 00:00:00 2001 From: Bassam Khouri Date: Fri, 16 Oct 2026 02:16:37 -0400 Subject: [PATCH] Soundness: add additional tool arguments input to API breakage check Add the `api_breakage_check_additional_tool_arguments` input to the Soundness workflow. Its value is appended to the `swift package diagnose-api-breaking-changes` invocation, with or without `--breakage-allowlist-path`. This lets callers pass any flag the tool supports (for example, `--products`) without needing a dedicated workflow input for each one. The input defaults to an empty string, so existing callers see no change in behavior. Relates to: swiftlang/swift-package-manager#9394 --- .github/workflows/soundness.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/soundness.yml b/.github/workflows/soundness.yml index d96c7a34..4b2407dd 100644 --- a/.github/workflows/soundness.yml +++ b/.github/workflows/soundness.yml @@ -19,6 +19,10 @@ on: type: string description: "Container image for the API breakage check job. Defaults to latest Swift Ubuntu image." default: "swift:6.3-noble" + api_breakage_check_additional_arguments: + type: string + description: "Additional arguments to pass directory to the `swift package diagnose-api-breaking-changes` invocation." + default: "" docs_check_enabled: type: boolean description: "Boolean to enable the docs check job. Defaults to true." @@ -155,6 +159,7 @@ jobs: env: API_BREAKAGE_CHECK_BASELINE: ${{ inputs.api_breakage_check_baseline }} API_BREAKAGE_CHECK_ALLOWLIST_PATH: ${{ inputs.api_breakage_check_allowlist_path }} + API_BREAKAGE_CHECK_ADDITIONAL_ARGUMENTS: ${{ inputs.api_breakage_check_additional_arguments }} # zizmor: ignore[template-injection] run: | ${{ inputs.linux_pre_build_command }} @@ -166,9 +171,9 @@ jobs: fi echo "Using baseline: $BASELINE_REF" if [[ -z "${API_BREAKAGE_CHECK_ALLOWLIST_PATH}" ]]; then - swift package diagnose-api-breaking-changes "$BASELINE_REF" + swift package diagnose-api-breaking-changes "$BASELINE_REF" ${API_BREAKAGE_CHECK_ADDITIONAL_ARGUMENTS} else - swift package diagnose-api-breaking-changes "$BASELINE_REF" --breakage-allowlist-path "${API_BREAKAGE_CHECK_ALLOWLIST_PATH}" + swift package diagnose-api-breaking-changes "$BASELINE_REF" --breakage-allowlist-path "${API_BREAKAGE_CHECK_ALLOWLIST_PATH}" ${API_BREAKAGE_CHECK_ADDITIONAL_ARGUMENTS} fi docs-check: