Commit Graph

454 Commits

Author SHA1 Message Date
Doug Gregor
5e29333d6b [SE-0470] Enable isolated conformances by default
The IsolatedConformances feature moves to a normal, supported feature.
Remove all of the experimental-feature flags on test cases and such.

The InferIsolatedConformances feature moves to an upcoming feature for
Swift 7. This should become an adoptable feature, adding "nonisolated"
where needed.

(cherry picked from commit 3380331e7e)
2025-04-14 16:38:22 -07:00
Allan Shortlidge
64fadaf828 AST: Stop diagnosing potentially unavailable declarations in unavailable contexts.
Potential unavailability of a declaration has always been diagnosed in contexts
that do not have a sufficient platform introduction constraint, even when those
contexts are also unavailable on the target platform. This behavior is overly
strict, since the potential unavailability will never matter, but it's a
longstanding quirk of availability checking. As a result, some source code has
been written to work around this quirk by marking declarations as
simultaneously unavailable and introduced for a given platform:

```
@available(macOS, unavailable, introduced: 15)
func unavailableAndIntroducedInMacOS15() {
  // ... allowed to call functions introduced in macOS 15.
}
```

When availability checking was refactored to be based on a constraint engine in
https://github.com/swiftlang/swift/pull/79260, the compiler started effectively
treating `@available(macOS, unavailable, introduced: 15)` as just
`@available(macOS, unavailable)` because the introduction constraint was
treated as lower priority and therefore superseded by the unavailability
constraint. This caused a regression for the code that was written to work
around the availability checker's strictness.

We could try to match the behavior from previous releases, but it's actually
tricky to match the behavior well enough in the new availability checking
architecture to fully fix source compatibility. Consequently, it seems like the
best fix is actually to address this long standing issue and stop diagnosing
potential unavailability in unavailable contexts. The main risk of this
approach is source compatibility for regions of unavailable code. It's
theoretically possible that restricting available declarations by introduction
version in unavailable contexts is important to prevent ambiguities during
overload resolution in some codebases. If we find that is a problem that is too
prevalent, we may have to take a different approach.

Resolves rdar://147945883.
2025-04-11 11:55:05 -07:00
Doug Gregor
868ec3bfbc Update ChangeLog for strict memory safety 2025-03-28 15:07:16 -07:00
Alastair Houghton
c93af64104 [Changelog] Add SE-0419 link reference.
Add a link reference to SE-0419.
2025-03-26 11:46:03 +00:00
Alastair Houghton
8c6cca5732 [Changelog] Add SE-0419 to the changelog.
This is now implemented, at least for macOS and Linux.
2025-03-25 11:54:25 +00:00
Anthony Latsis
f6e9b68ee6 Merge pull request #79653 from AnthonyLatsis/galeocerdo-cuvier
[NFC] CHANGELOG: Log new existential `any` diagnostic behavior
2025-02-28 18:28:19 +00:00
Anthony Latsis
51ae6e7621 [NFC] CHANGELOG: Log new existential any diagnostic behavior 2025-02-27 04:50:35 +00:00
Doug Gregor
7977e4682c Add a ChangeLog entry for SE-0458 2025-02-26 13:13:05 -08:00
Becca Royal-Gordon
12d0458eb2 Diagnose and forbid invalid Swift names on inits
Initializers should always have Swift names that have the special `DeclBaseName::createConstructor()` base name. Although there is an assertion to this effect in the constructor for ConstructorDecl, ClangImporter did not actually reject custom Swift names for initializers that violated this rule. This meant that asserts compilers would crash if they encountered code with an invalid `swift_name` attribute, while release compilers would silently accept them (while excluding these decls from certain checks since lookups that were supposed to find all initializers didn’t find them).

Modify ClangImporter to diagnose this condition and ignore the custom Swift name.
2025-02-11 12:05:17 -08:00
Pavel Yaskevich
44908acd75 [CSApply] Avoid shortcutting argument conversion when parameter has an external property wrapper
The check to see whether argument matches the parameter exactly
causes two problems: prevents projected value initialized injection;
and, if there are multiple parameters with property wrappers,
would apply incorrect wrapper to other locations because the wrapper
application index wasn't incremented.

Resolves: rdar://140282980
2024-11-22 14:02:06 -08:00
Ben Rimmington
7a31f39357 Update CHANGELOG.md (#77093) 2024-10-17 22:31:06 -07:00
Allan Shortlidge
d373036805 SE-0444: Promote MemberImportVisibility to an upcoming feature.
The proposal has been accepted, so `MemberImportVisibility` is no longer
experimental.

Resolves rdar://126284512.
2024-09-26 13:41:14 -07:00
Doug Gregor
9936f64c2a Ignore inactive IfConfigDecls in SourceKit's syntax model
Clients that need syntactic information should use SourceKit-LSP or
swift-syntax.
2024-09-07 21:36:39 -07:00
Konrad `ktoso` Malawski
7381bf0da9 Changelog: add notes about SE-0442
Add a note about the accepted developer experience change from: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0442-allow-taskgroup-childtaskresult-type-to-be-inferred.md
2024-08-07 17:00:38 +09:00
Laszlo Teveli
2a188ed123 Fixed @preconcurrency syntax in CHANGELOG 2024-06-05 16:11:30 +02:00
Slava Pestov
0eaa985998 Update CHANGELOG.md for pack element captures 2024-06-03 09:46:17 -04:00
Doug Gregor
774554aa00 Merge branch 'main' into wip-ktoso-changelog 2024-05-31 16:34:27 -07:00
Doug Gregor
d311b7e712 Merge branch 'main' into swift-6-release-note 2024-05-31 16:31:39 -07:00
John McCall
5227a019bb Add changelog entries for SE-0423 and SE-0431.
I'm making an attempt to order these correctly for the SE number rather
than "chronologically" by the order in which we bothered to add release
notes.
2024-05-30 14:50:53 -04:00
Holly Borla
55fd62b12f [Change Log] Add a change log entry for the Swift 6 language mode. 2024-05-30 10:02:03 -07:00
Konrad `ktoso` Malawski
cfa4199fdc changelog the SE-0424 proposal 2024-05-30 22:19:05 +09:00
Konrad `ktoso` Malawski
81f0439121 changelog document SE-0428 2024-05-30 22:15:26 +09:00
Michael Gottesman
5bbdb28684 Add ChangeLog entries for SE-0414 and SE-0430 2024-05-29 23:57:56 -07:00
Pavel Yaskevich
01bf742c61 [CHANGELOG] NFC: Add an entry for SE-0423 2024-05-29 17:17:18 -07:00
Pavel Yaskevich
382cd4c0b5 [CHANGELOG] NFC: Add an entry for SE-0418 2024-05-29 17:17:14 -07:00
Kavon Farvardin
113e81154a Changelog: reword blurb about SE-0429 2024-05-29 13:26:41 -07:00
Kavon Farvardin
62f058e5ed Docs: add release note for SE-432 2024-05-28 15:51:25 -07:00
Kavon Farvardin
9a18dcf345 Docs: add release note for SE-429 2024-05-28 15:40:41 -07:00
Kavon Farvardin
d70ce1ab43 Docs: add release note for SE-427 2024-05-28 12:17:56 -07:00
Konrad `ktoso` Malawski
dc5e354d69 [Concurrency] Reimplement @TaskLocal as a macro (#73078) 2024-05-01 20:57:20 -07:00
Slava Pestov
582ec11cee Document two minor source-breaking bug fixes in Swift 6.0 2024-03-19 16:15:25 -04:00
Ben Rimmington
a79ee61896 Update CHANGELOG.md (#72119)
* Add Swift 5.10 release date.
* Cherry-pick apple/swift#72110.

---------

Co-authored-by: Manoj Mahapatra <mahaplipsa@gmail.com>
2024-03-06 11:01:41 -08:00
Sima Nerush
f1f35bf2ab Merge pull request #72007 from simanerush/se-0408-changelog
[NFC] Add a release note for SE-0408.
2024-03-02 16:14:21 -08:00
Ben Rimmington
7f9725fd1a Update CHANGELOG.md (#72043)
* Use blockquote alert.
* Add SE-0422 proposal URL.
* Add Swift 5.9.2 release date.
2024-03-02 11:43:24 -08:00
Sima Nerush
404608b493 [NFC] Add a release note for SE-0408. 2024-03-01 22:47:07 -08:00
Doug Gregor
6075de1b62 Add upcoming feature ImplicitOpenExistentials for SE-0352
To maintain source compatibility, SE-0352 does not open existentials
with "self-conforming" type, such as `any Error` or existentials based
on `@objc` protocols. The proposal specified that this behavior would
change in Swift 6. Implement that behavior change, which can be
enabled prior to Swift 6 with the upcoming feature
`ImplicitOpenExistentials` (as documented in SE-0362).

Fixes #70873 / rdar://120902975.
2024-03-01 11:50:39 -08:00
Mishal Shah
af112c1591 Update the Swift version to 6.0 from 5.11 2024-02-19 17:47:16 -08:00
Apollo Zhu
9ccfb574fd Enable SE-0422 Expression macro as caller-side default argument 2024-02-14 19:22:35 -08:00
Konrad `ktoso` Malawski
92d0d299d9 add task executors to changelog (#71487) 2024-02-08 19:12:37 -08:00
Ben Rimmington
4560e191fe Update CHANGELOG.md (#71485)
Add link to SE-0270 proposal.
2024-02-08 18:15:11 -08:00
Jeremy Schonfeld
9d2e1919c1 Update changelog for SE-0270 2024-01-31 09:11:14 -08:00
Ian Anderson
b4a4f059c0 Swap in the PR number for the exit behavior change 2024-01-30 21:53:36 -08:00
Ian Anderson
288f37b2c1 [Concurrency] [shims] Don't declare exit in the concurrency shims
Don't delete the OS declaration of `exit` because the concurrency shims aren't always imported, and so the shim declaration might not always be available.
Don't override the OS declaration of `exit` in the concurrency shims since we can't just delete the OS one. Instead, set up internal shims just for building Concurrency that forward declares `exit`.
2024-01-29 16:25:46 -08:00
Holly Borla
37f635cf0d [Release Notes] Improve the release note for SE-0411. 2024-01-22 21:10:13 -08:00
Holly Borla
fa740bcce6 [Release Notes] Improve the release note for SE-0412. 2024-01-22 20:57:12 -08:00
Holly Borla
fad88f37ac [Release Notes] Swift 5.10 closes all known holes in compile-time strict
concurrency checking.
2024-01-22 20:57:12 -08:00
Sophia Poirier
75fb2a6d05 [SE-0412] changelog note about strict concurrency for global variables 2024-01-13 10:20:51 -08:00
Holly Borla
97ee1011a0 [NFC] Add a release note for SE-0411. 2024-01-10 20:59:36 -08:00
Doug Gregor
268d36d375 Add ChangeLog entry for SE-0413: Typed Throws 2024-01-02 16:38:51 -08:00
Anthony Latsis
31fc8d8fde Record #70065 in the changelog 2023-12-06 09:42:45 +03:00