Commit Graph

78 Commits

Author SHA1 Message Date
practicalswift
c53bd4d3cb [gardening] Fix recently introduced typo: "overrideable" → "overridable" 2016-02-04 12:05:35 +01:00
Jordan Rose
10f2c9ac5a [docs] LibraryEvolution: Add a section on minimum library versions. 2016-02-03 19:08:51 -08:00
Jordan Rose
9af119d9ce [docs] LibraryEvolution: Add information about attributes.
I went through the list of attributes and declaration modifiers and
made sure they were all accounted for. Anything not on the list
should be assumed restricted, as mentioned at the top of the
"Supported Evolution" section.
2016-02-03 17:14:39 -08:00
Jordan Rose
e01d29b170 [docs] LibraryEvolution: Add missing related proposal.
"Overridable methods in extensions"
2016-02-03 17:14:39 -08:00
Jordan Rose
a83089bce3 [docs] LibraryEvolution: List out related proposals.
...most of which don't exist yet. These are things that need to go
through the Swift Evolution Process and ultimately be accepted or
rejected before we have final answers on some parts of the document.
2016-02-02 18:20:29 -08:00
Jordan Rose
b9ef11e703 [docs] LibraryEvolution: Typealiases are compile-time constructs.
...and therefore unversioned.
2016-02-02 17:41:29 -08:00
Jordan Rose
ef62e38726 [docs] LibraryEvolution: Keep a list item together with a note.
The third item was added to this list without looking at the note.
2016-02-02 17:41:29 -08:00
Jordan Rose
7df2f13d00 [docs] LibraryEvolution: Resolve several TODOs by fiat.
The heuristic here is mostly "err on the side of a simpler document".
2016-02-01 15:04:20 -08:00
Jordan Rose
8aebe8d864 [docs] LibraryEvolution: Public members get a default version.
Specifically, public members (and nested types) within a versioned type are
assumed to be present on the outer type since its introduction unless otherwise
specified. (This saves boilerplate for a type's initial API.)
2016-01-26 17:45:30 -08:00
Jordan Rose
3a7e511eeb [docs] LibraryEvolution: To remove an override, the type must match exactly.
Thanks, Slava!
2016-01-26 17:45:29 -08:00
Jordan Rose
4f4ec2c48a [docs] LibraryEvolution: Bring back "fixed-size" as a perf assertion. 2016-01-25 16:43:19 -08:00
Jordan Rose
9df9ee9d72 [docs] LibraryEvolution: Weaken "fixed-layout" structs to "fixed-contents".
This drops the requirement that a fixed-layout struct only contain fixed-size
things (which wasn't specified correctly anyway). Slava and Dmitri both
pointed out that the previous definition had several flaws, including not
really scaling to generics. This reduced version only promises that stored
instance properties won't be added, removed, or modified, which is still
enough to do useful optimizations. And in most cases, we'll be able to
infer the full "fixed-size" property of a type from this attribute anyway.

The name "fixed-contents" was chosen to force us to pick a better name later.

The next commit will bring back the "fixed-size" property as a performance
assertion.
2016-01-25 16:43:19 -08:00
Jordan Rose
812dbbb3c2 [docs] LibraryEvolution: Eliminate the @fixed property attribute.
After talking to Slava, it seems like this really is the same guarantee
as @inlineable on a property. See also the next commit.
2016-01-25 16:43:19 -08:00
Jordan Rose
873e0230e8 [docs] LibraryEvolution: Move "Versioning Internal Decls" to the end.
Now that we've decided to allow using versioned internal types in
fixed-layout structs, this isn't just about inlineable functions anymore.

No content change.
2016-01-25 16:43:19 -08:00
Jordan Rose
da7326b07f [docs] LibraryEvolution: All public entities must be versioned. 2016-01-21 18:26:53 -08:00
Jordan Rose
bd12f0c0f3 [docs] LibraryEvolution: Be more precise about "public".
...as Slava pointed out, many times it means "versioned". I chose to
leave several things as "non-public, non-versioned" even though "non-
versioned" is sufficient (a versioned library may not have unversioned
public API) because "non-public" is something people instinctively
understand.
2016-01-21 18:26:53 -08:00
Jordan Rose
2161cca82f [docs] LibraryEvolution: Fill out "Fixed-Layout Structs". 2016-01-21 18:26:53 -08:00
Jordan Rose
0965907e55 [docs] LibraryEvolution: Drop the term "availability-pinned"
...in favor of "versioned internal declarations". Add some more detail
around these things.
2016-01-21 18:26:53 -08:00
Jordan Rose
c0df537a17 [docs] LibraryEvolution: Non-final methods can be safely removed.
...and final methods cannot. Inspired by @bitjammer's recent commit 0825841.
2016-01-19 19:58:45 -08:00
Jordan Rose
d4edd950b5 [docs] LibraryEvolution: Be consistent about made-up API names. 2016-01-19 18:28:27 -08:00
Jordan Rose
de30c0ceea [docs] LibraryEvolution: define "versioned entity" properly.
Also provide several possible syntaxes for marking an entity as versioned.
None of the syntax in this document is set in stone. (Even these three
options are just examples of three different approaches.)
2016-01-19 18:23:40 -08:00
Jordan Rose
4ef0ac1e3c [docs] Library Evolution: note that operator decls are not ABI. 2016-01-08 14:25:47 -08:00
Jordan Rose
fcb26ae504 [docs] Address some of Slava's feedback on LibraryEvolution.rst.
(but not all of it)

- Add a note about throwing functions becoming non-throwing.
- Clarify that let-properties may not be turned into read-only vars.
- Permit new static stored properties on fixed_layout structs.
- Drop note about "fixed_layout-since-first-available".
- Add note disparaging the utility of @fixed.
- Add note about adding defaulted associated types to protcols.
- Clarify which members can and cannot be added to a class.
- Add some class-specific permitted changes.
- Note that adding/removing 'dynamic' is /not/ permitted.
- Split up protocol and non-protocol extensions.
- Explain why the 'no_payload' performance assertion isn't needed.

Saving the rest of the feedback for the next major content addition.
2016-01-07 17:26:34 -08:00
practicalswift
d6b2786302 Fix typo introduced a couple of hours ago :-) 2016-01-07 21:40:44 +01:00
Jordan Rose
627c48c49f [docs] LibraryEvolution.rst: What kind of changes are ABI-safe?
Update the Library Evolution ("Resilience") doc with a listing for every
top-level declaration kind (...except operators and imports, TODO) that
describes what should be an ABI-compatible change between releases of a
binary library shipped independently of a client app (say, because it's
part of the OS). Restructure the existing discussion of "fragility
attributes" to describe how each of those capabilities is affected when,
say, marking a struct as "fixed-layout".

Still a work in progress, and if something unexpected catches your eye
I'd like to hear about it. Note also that this does /not/ describe how
Swift behaves today; we still make many assumptions about types that
will not be valid in a "resilient" world.
2016-01-07 11:55:15 -08:00
codester
ed399ef52b Fixed Typos
Fixed Typos
2015-12-03 23:41:42 +05:30
Jordan Rose
1a0f7d4034 [docs] Emphasize that LibraryEvolution.rst is still in draft form.
Max pointed out that GitHub's ReST rendering doesn't treat ".. warning::"
specially.
2015-12-02 14:14:29 -08:00
Jordan Rose
a35699b1c8 [docs] Commit a draft of the Library Evolution (Resilience) master doc.
There's still quite a bit of work to go here. In particular, it's not really
ready for review, but John and I think it's pointed in the right direction,
and with Slava and Joe already working in this area it's important that we
have something to anchor to. Hoping to get back to this soon.
2015-12-01 21:12:37 -08:00