Commit Graph

103 Commits

Author SHA1 Message Date
Kavon Farvardin c94afe1e04 Docs: explain reparenting
rdar://173453917
2026-03-26 17:32:38 -07:00
Kavon Farvardin eb7fe3c8a3 Reparenting: initial functionality 2026-02-03 16:39:19 -08:00
Slava Pestov 4b6d19c98d docs: Remove obsolete restriction from LibraryEvolution.rst 2025-04-21 16:29:58 -04:00
LamTrinh.Dev b6239b8cee [docs] Update links to repositories moved to https://github.com/swiftlang/ 2024-07-22 12:22:43 -07:00
Alejandro Alonso be4cac5c65 Mention indirect in library evolution doc for enums
Update LibraryEvolution.rst
2024-02-14 12:56:07 -08:00
Allan Shortlidge 1a9cbbc749 Docs: Document library evolution restrictions for @inlinable functions.
As documented in the [SE-244 proposal](https://github.com/apple/swift-evolution/blob/main/proposals/0244-opaque-result-types.md#effect-on-api-resilience),
it is illegal to change the concrete return type of an @inlinable function with
an opaque return type. This ought to be documented since it is an extremely
subtle rule that authors of ABI stable libraries should be aware of.
2023-10-27 13:40:25 -07:00
Si Beaumont 3b76fd82a6 [docs] Fix typo in LibraryEvolution.rst
Signed-off-by: Si Beaumont <beaumont@apple.com>
2022-05-26 13:29:34 +01:00
swift-ci e4f0815366 Merge pull request #38814 from varungandhi-apple/vg-aeic-lib-evo 2021-08-31 18:15:26 -07:00
Robert Widmann 4b826b7d17 [Gardening] Document An ABI Breaking Case For Moving Extension Members 2021-08-23 08:37:11 -10:00
Varun Gandhi 4f69c2b5c3 [docs] Describe how _alwaysEmitIntoClient relates to library evolution. 2021-08-20 16:22:51 -07:00
Varun Gandhi aa59101926 [docs] Note library evolution limitations around availability.
In https://github.com/apple/swift/pull/36327, trying to compile
library code where a struct has an unavailable stored property
or an enum with an unavailable case with associated values was made
into a hard error. Update the docs to reflect this limitation
for library authors shipping new versions of dylibs to older OSes.
2021-07-07 14:34:24 -07:00
filip-sakel b02dc12093 Remove unnecessary code examples. 2021-05-31 01:13:01 +03:00
filip-sakel f7aecbbe10 Simplify property-wrapper-attribute argument rules 2021-05-07 02:21:11 +03:00
filip-sakel 92caac34e5 Update examples for wrapper arguments. 2021-04-30 14:06:43 +03:00
filip-sakel be7d761c81 Show that PP arguments change API significance. 2021-04-30 14:03:03 +03:00
filip-sakel e560deda83 Typo fix. 2021-04-30 13:21:35 +03:00
filip-sakel 523bb7c91c Mark adding/removing PP arguments as ABI-breaking. 2021-04-30 13:18:22 +03:00
filip-sakel df048e38a5 Add property-wrapper examples. 2021-04-28 16:00:42 +03:00
filip-sakel 04d2970f05 Update LibraryEvolution.rst for SE-0293. 2021-04-07 01:15:39 +03:00
Slava Pestov c997016bc6 Update some docs to talk about 'main' instead of 'master'
Fixes https://bugs.swift.org/browse/SR-14015 / rdar://problem/72819056
2021-01-11 22:57:51 -05:00
Doug Gregor 0d568a93d4 [SE-0289] Update diagnostics & many other strings to "result builders" 2020-10-20 21:44:09 -07:00
Varun Gandhi 907b89c8f7 [docs] Clarify wording around adding new associatedtypes to protocols. 2020-08-29 11:14:57 -07:00
Robert Widmann 00b46f3653 [Gardening] De-RST TransparentAttr 2020-05-02 05:22:04 -07:00
Erik Eckstein af69128b4f docs: fix doc build error 2020-04-30 09:07:34 +02:00
Harlan Haskins e674ab81b3 [docs] Note that adding associatedtypes with defaults is allowed in library evolution
It is actually valid to add an `associatedtype` requirement, even one
with constraints, to an existing protocol, provided it has availability
and a default value.
2020-04-24 14:56:10 -07:00
Jordan Rose 6c2645a288 [docs] LibraryEvolution: make it a little more friendly
- Move the original intro into a "Background" section
- Link to SE-0193 (@inlinable) and SE-0260 (@frozen)
- Note (suggested by @Gankra) on why it's safe to add stored
  properties to a struct
- Remove some bits that reference the content removed in earlier
  commits
- Other minor copyediting
2019-11-01 14:56:30 -07:00
Jordan Rose 0b6d0be873 [docs] LibraryEvolution: Property wrappers, @dynamicCallable...
...and function builders, even though those haven't formally been
accepted to the language yet. (This description of property wrappers
is also a bit optimistic; at the time of this writing, they haven't
been implemented for top-level variables yet.)
2019-10-29 15:16:07 -07:00
Jordan Rose 96f99d2fb2 [docs] LibraryEvolution: Bring the per-decl restrictions up to date
And replace the term "versioned" with "ABI-public".
2019-10-29 15:16:07 -07:00
Jordan Rose 628d7bf1e9 [docs] LibraryEvolution: Remove discussion of versioning...
...as well as the "Open Issues" section and some future directions.
I'll put this back in a different form soon.
2019-10-29 15:16:07 -07:00
Erik Eckstein 42c11868b6 docs: fix doc build error in LibraryEvolution.rst 2019-05-10 14:19:41 -07:00
Slava Pestov 73aba9b3ee Update LibraryEvolution.rst for new attribute names 2019-05-09 20:41:08 -04:00
Dimitris Apostolou d84048e555 Fix typos 2019-02-11 08:33:47 +02:00
Erik Eckstein bd8d155e33 docs: Fix doc build error in LibraryEvolution.rst 2018-10-31 11:04:41 -07:00
Slava Pestov 28c90ab717 Another round of updates for LibaryEvolution.rst
Adding new protocol requirements is now a "binary compatible
source breaking change" without explicit guarantees about
source compatibility.

Removing a default from an associated type is not binary
compatible because the associated type may itself have been
added resiliently, in which case clients that predate the
associated type will not be able to instantiate a witness
table for the protocol.
2018-10-30 14:51:56 -04:00
Slava Pestov 4959c33c61 Minor updates for LibraryEvolution.rst
- We don't allow local typealiases in inlinable code either.
- Explicitly document the places where adding or removing 'lazy'
  is allowed and not allowed (it's effectively like going between
  stored and computed).
- Adding associated types with defaults is now allowed.
- Adding associated types or Self requirements to a protocol that
  did not already have them is a *binary-compatible source-breaking
  change*.
- For non-@objc enums, adding a raw type is OK -- it's just a
  compiler-synthesized RawRepresentable conformance and is not
  used for layout.
- Adding/removing/re-ordering extension members does _not_
  follow the rules of the type itself.
2018-10-30 00:16:39 -04:00
Jordan Rose 4949fcd830 [docs] LibraryEvolution: Non-controversial updates for Swift 4.2 (#17869)
- Standardize on "inlinable" instead of "inlineable", per SE-0193.
- Standardize on "frozen enums" instead of "closed enums", even though
  SE-0192 wasn't quite conclusive on this.
- Typealiases are treated as versioned entities for the purpose of
  verifying availability.
- Per SE-0193, inlinable functions do not have always-emit-into-client
  behavior.
- Rename the fragility attribute for properties and subscripts to
  '@inlinableAccess' for now, since '@inlinable' has been implemented
  for functions now. (We may still end up choosing to use the same
  name for these declarations too.)
- Private and fileprivate entities cannot be '@inlinable' today.
- We implemented the always-emit-into-client change for default
  arguments. They also have even stricter restrictions than most
  inlinable functions.
- A struct initializer can also assign to 'self' instead of delegating
  with `self.init`.
- Disallow adding new associated types to protocols for now.
- Mention that precedence groups exist.
- Mention that '@usableFromInline' exists.
- '@inlinable' can be backdated, even though all the other fragility
  attributes cannot.
- Tweak TODO around '@NSManaged'.
- Tweak list of planned proposals.

This document still deserves some more drastic restructuring to
separate the near-term features from the long-term features.
2018-07-16 15:40:29 -07:00
Jordan Rose b5f20334ab [docs] LibraryEvolution: Tweak for Swift 4.0. (#11742) 2017-10-12 15:44:42 -07:00
practicalswift 3918d9d251 [gardening] Replace likely word processor artefacts with ASCII equivalents (— → --, … → ...) 2017-01-08 15:23:06 +01:00
Jordan Rose d0a48c8c88 [docs] LibraryEvolution: Merge @alwaysEmitIntoClient into @inlineable. (#6118)
JoeG (and Dmitri before him) pointed out a while back that having
/two/ ways to get something emitted into a client's module was really
more complexity than we really needed, and created a pitfall for
library authors who might choose the wrong one for their needs.
2016-12-12 13:01:07 -08:00
practicalswift 17503b0d85 [gardening] Use American English. 2016-11-06 10:12:04 +01:00
practicalswift cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Jordan Rose 9af74fe3b0 [docs] LibraryEvolution: Feedback from DaveA and co. (#5066)
- Clear up allowed changes for associated types.
- Modifying a fixed_contents struct's properties' accessors isn't inherently
  ABI-breaking, just behavior-changing like any other inlineable thing.
- Clarify what an "empty extension" is.
2016-10-05 08:37:56 -07:00
Jordan Rose 5e1a3c38d3 [docs] Note that LibraryEvolution uses Sphinx-specific features. 2016-08-16 20:42:54 -07:00
Jordan Rose 91daa5c0b2 [docs] LibraryEvolution: Update for 'open' and 'Never'. 2016-08-16 20:09:04 -07:00
Jordan Rose ca14c36936 [docs] Fix syntax highlighting issues to support newer Sphinxes. (#4283)
- Update the Pygments lexer we use for parsing Swift-like code.
- State more explicitly which highlighting should be used in which
  code blocks.
- Disable highlighting altogether in certain cases (such as SIL.rst,
  which has equal amounts grammar and SIL excerpts).

This should fix the warnings-as-error issues coming from Sphinx > 1.3.4.

Based on a patch by Jeremy Fergason!

https://bugs.swift.org/browse/SR-620
2016-08-12 22:59:11 -07:00
Jordan Rose dce2db9a87 [docs] LibraryEvolution: add "let vs. var" as a planned proposal.
Dmitri and I were talking about this today and we think it's
worth proposing as part of the general library evolution effort.
2016-06-30 20:30:16 -07:00
Jordan Rose 2ce6f1eace [docs] LibraryEvolution: Camel-case hypothetical attributes.
...and update one example to follow the Swift 3 API guidelines.
No semantic changes.
2016-06-22 19:35:07 -07:00
Jordan Rose 4562567bb3 [docs] LibraryEvolution: size_in_bits -> maximumFootprint.
As John pointed out to me, a maximum size guarantee is useless without
a maximum alignment guarantee.
2016-06-22 19:35:07 -07:00
Jordan Rose c325b4e3a8 [docs] Update LibraryEvolution for 'fileprivate' (SE-0025).
The rules for 'fileprivate' (the old 'private') and the rules for
the new "scoped" 'private' are the same.
2016-06-20 20:35:00 -07:00
Jordan Rose 41886e32b2 LibraryEvolution: @discardableResult instead of @warn_unused_result.
Long live SE-0047.
2016-06-06 15:54:34 -07:00