Skip to content

Conversation

@stmontgomery
Copy link
Contributor

This replaces usages of the -enable-experimental-feature AvailabilityMacro=X Swift frontend flag in swift-testing's CMake rules with -define-availability X.

Motivation:

The former flags are used in Package.swift as a workaround because SwiftPM does not allow using unsafe flags in package dependencies. But this workaround is not necessary when building with CMake—we can use the -define-availability flag directly without restriction.

Using this workaround when building via CMake with Library Evolution enabled causes every specified availability macro flag to be printed in the textual .swiftinterface file for the module. This information is not needed by clients of the Testing module, so the primary motivation of this change is to remove those unnecessary flags from that interface file.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs labels Jul 10, 2024
@stmontgomery stmontgomery self-assigned this Jul 10, 2024
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit ad95db1 into swiftlang:main Jul 10, 2024
@stmontgomery stmontgomery deleted the cmake-define-availability branch July 10, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants