Skip to content

Report an error when attempting to use --filter or --skip in unsupported environments #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

stmontgomery
Copy link
Contributor

This modifies the SwiftPM entry point argument parsing logic to ensure that if a user passes the --filter or --skip flags on an OS version which does not support those features, an error is reported.

Motivation:

Currently, we silently ignore these flags on unsupported OS versions but that can cause problems if the user was only expecting certain tests to run, so this ensures that we either honor the user's request or report a meaningful failure message.

Modifications:

  • Implement the else branch of if #available(...) conditions which guard the implementations of these CLI flags.
  • Adjust tests accordingly.

Checklist:

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

Resolves rdar://119837856

@stmontgomery stmontgomery added bug 🪲 Something isn't working swiftpm-integration 📦 Swift Package Manager integration labels Dec 19, 2023
@stmontgomery stmontgomery self-assigned this Dec 19, 2023
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit ced504d into swiftlang:main Dec 19, 2023
@stmontgomery stmontgomery deleted the entry-point-regex branch December 19, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working swiftpm-integration 📦 Swift Package Manager integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants