Skip to content

Introduced -Xswiftc -Xfrontend flag to GA workflow.#104

Merged
glbrntt merged 5 commits intoapple:mainfrom
rafaelcepeda:explicit_sendable
Jun 20, 2025
Merged

Introduced -Xswiftc -Xfrontend flag to GA workflow.#104
glbrntt merged 5 commits intoapple:mainfrom
rafaelcepeda:explicit_sendable

Conversation

@rafaelcepeda
Copy link
Copy Markdown
Contributor

Introduced -Xswiftc -Xfrontend flag to GA workflow. There were no Sendability warnings to fix after this change.

@rafaelcepeda rafaelcepeda added the 🔨 semver/patch No public API change. label Jun 18, 2025
Comment thread .github/workflows/main.yml Outdated
Comment on lines +15 to +18
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable --explicit-target-dependency-import-check error"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable --explicit-target-dependency-import-check error"
linux_nightly_next_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable --explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable --explicit-target-dependency-import-check error"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to work; SwiftPM generates some public types in the test targets which don't have Sendable annotations.

The CI passes at the moment because these changes haven't been picked up yet. From the logs:

  docker run -v /home/runner/work/swift-http-structured-headers/swift-http-structured-headers:"$workspace" \
    -w "$workspace" \
    -e CI="$CI" \
    -e GITHUB_ACTIONS="$GITHUB_ACTIONS" \
    -e SWIFT_VERSION="6.0" \
    -e setup_command_expression="$setup_command_expression" \
    -e workspace="$workspace" \
    swift:6.0-jammy \
    bash -c "$setup_command_expression swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the flags to macOS CI only then.

Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
xcode_16_1_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
xcode_16_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
xcode_16_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
xcode_26_beta_1_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it's worth adding this one: the beta will change at some point and we'll have to keep updating the args.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I've removed it.

@rafaelcepeda rafaelcepeda requested a review from glbrntt June 20, 2025 10:49
@glbrntt glbrntt merged commit f702259 into apple:main Jun 20, 2025
108 of 112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants