Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Allan Shortlidge
ad1acd7f4a Frontend: Allow -enable-experimental-feature to specify upcoming features.
During the lifecycle of a feature, it may start as an experimental feature and
then graduate to become an upcoming feature. To preserve compatibility with
projects that adopted the feature when it was experimental,
`-enable-experimental-feature` ought to be able to enable upcoming features,
too.

Since projects may use `-enable-experimental-feature` for compatibility with an
older toolchain that does not have the feature as an upcoming feature, there is
no warning when the flag is used to enable an upcoming feature.

Note that if the semantics of a feature change when it graduates from
experimental to upcoming, then the feature must be renamed so that projects
using the experimental feature have an opportunity opt-in to the new semantics
of the upcoming feature.

Resolves rdar://134276783.
2024-08-20 07:49:33 -07:00
Alexis Laferrière
cbe5c3828e [Sema] Lift flag requirement for access level on imports 2023-10-10 09:09:22 -07:00
Alexis Laferrière
322ada60c8 [Sema] Intro flag to default imports to internal, the Swift 6 mode
The feature InternalImportsByDefault makes imports default to internal instead
of public. Applying the Swift 6 behavior of SE-0409 in Swift 5.

Let's use only that flag to track the Swift 6 behavior as well instead
of separately checking for the language version.
2023-10-10 09:09:21 -07:00
Alexis Laferrière
a0b848ea96 [Sema] Report imports marked as public that are not used in API 2023-09-28 13:00:04 -07:00
Alexis Laferrière
02e2874a5a [ModuleInterface] Test that we accept all access-level modifiers in swiftinterfaces 2023-09-14 12:47:20 -07:00
Alexis Laferrière
33db18654e [Sema] Always accept access-level on imports in swiftinterface
While use of access-level in imports is still gated by a flag for normal
source code, accept it in swiftinterfaces without the flag. This will
make it easier for older compilers to read newer swiftinterfaces created
by a future compiler where that restriction is lifted.

rdar://115455383
2023-09-14 10:47:37 -07:00
Alexis Laferrière
ea2465dea6 [Sema] Report uses of package import without a package name 2023-09-05 17:33:49 -07:00
Nate Cook
46bf41c26a Require asserts for access level test 2023-02-28 00:03:21 -06:00
Alexis Laferrière
08895657cb [Parser] Intro parser support and flag for access level on imports 2023-02-25 09:47:19 -08:00