Skip to content

[test] Fail on test requiring features that are not used or had disappeared #77380

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 3 commits into from
Nov 5, 2024

Conversation

drodriguez
Copy link
Contributor

While doing #76740 I iteratively was adding new REQUIRES: as new usages of the features were found, but I did not realize that at the same time other people might be removing some of those usages. The tests in this commit had some REQUIRES: line for a previous -enable-experimental/upcoming-feature, but they not longer use those features, so the REQUIRES: were effectively disabling the tests (at least in the case of KeyPathWithStaticMembers. In other cases they might still had executed).

It is not automatically linted because of its extension.
@drodriguez
Copy link
Contributor Author

@swift-ci please test

When a feature is removed from `Features.def` or when a test removes all
usages of `-enable-experimental/upcoming-feature` keeping the
`REQUIRES:` lines around is probably a mistake. Warn about possibly
missing flags if a `REQUIRES:` is found referencing a feature without
the equivalent `-enable-*-feature` in a `RUN:` line.
While doing swiftlang#76740 I iteratively was adding new `REQUIRES:` as new
usages of the features were found, but I did not realize that at the
same time other people might be removing some of those usages. The tests
in this commit had some `REQUIRES:` line for a previous
`-enable-experimental/upcoming-feature`, but they not longer use those
features, so the `REQUIRES:` were effectively disabling the tests (at
least in the case of `KeyPathWithStaticMembers`. In other cases they
might still had executed).
@drodriguez drodriguez force-pushed the test-swift-features-cont branch from 0d1c04a to 5abb1ea Compare November 5, 2024 04:53
@drodriguez
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Nice! Thank you!

@drodriguez drodriguez merged commit d479d74 into swiftlang:main Nov 5, 2024
5 checks passed
@drodriguez drodriguez deleted the test-swift-features-cont branch November 5, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants