Commit Graph

67 Commits

Author SHA1 Message Date
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
Manav Gabhawala 7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Jordan Rose 70bda7c5db [docs] LibraryEvolution: This is about binary compatibility.
...and can't guarantee semantic compatibility. Make this clear in the
introduction, as noted by David Owens.
2016-02-18 15:33:59 -08:00
Jordan Rose 11ff7157ff [docs] LibraryEvolution: Dmitri's feedback for @always_emit_into_client.
The main change is that @always_emit_into_client is now not considered a
versioned attribute: either you use it up front and the entity is not part
of your ABI, or you don't and it is. Everything else falls out from that.
2016-02-16 12:10:59 -08:00
practicalswift 6b8d231575 [gardening] Fix recently introduced typo: "an function" → "a function" 2016-02-16 09:53:07 +01:00
Jordan Rose b39cebd6fc [docs] LibraryEvolution: @always_emit_into_client
Describe a new attribute, @always_emit_into_client, which covers the
behavior of helpers for inlineable functions: any client that makes use
of the body of an inlineable function should use that implementation,
including any helper functions, local functions, or closures referenced
therein. This is also a tool a library developer can use.

This is a nice change because it formalizes several things that were
previously special-cased; however, there are still some open questions.

It's not totally clear whether we want separate @inlineable and
@always_emit_into_client annotations; we could attempt to get away with
just the latter. However, as noted in the diff, there are some entities
that can't really be completely eliminated from the ABI, so marking them
@always_emit_into_client would be disingenuous.
2016-02-15 19:17:16 -08:00
Jordan Rose a5ce1391bd [docs] LibraryEvolution: Address smaller feedback points.
...from JoeG, Dmitri, and David Owens.

- Add an explicit section on default arguments.
- Replace the phrase "permitted but discouraged" with a new and stronger
  term "binary-compatible source-breaking change". This may need more
  work but it is an improvement.
- Mark that we could make converting get-only 'var' to 'let' safe.
- Adding a required convenience init is safe with certain restrictions.
- Add some more related proposals.
- Add a todo list for more substantive changes and ongoing discussion.
- Assorted clarifications and typo fixes.
2016-02-12 18:30:03 -08:00
practicalswift 383b6b746e [gardening] Fix recently introduced typo: "overrideable" → "overridable" 2016-02-09 22:46:12 +01:00
Jordan Rose b0f94ed4b7 [docs] LibraryEvolution: Make code snippets more concrete, take 2.
Missed a spot.
2016-02-08 17:21:15 -08:00
Jordan Rose 3737ce7beb [docs] LibraryEvolution: Make code snippets more concrete.
...by giving all the types silly magic-themed names, rather than just
'Base' or 'SomeProto'. That makes a (mostly) consistent theme throughout
the document, and hopefully makes it easier to have a mental model
about what various changes mean.
2016-02-08 17:20:28 -08:00
Jordan Rose d58b14db70 [docs] LibraryEvolution: Remove the "draft" warning.
Not that it won't continue to change, but it's moving from "we're
working things out" to "basically the plan of record". Time to ask for
feedback!
2016-02-08 16:59:10 -08:00
Jordan Rose 2c1e329233 [docs] LibraryEvolution: Add some known problematic scenarios.
These are pretty sketchy, but they do cause issues.
2016-02-08 16:27:54 -08:00
Jordan Rose 0db4f95527 [docs] LibraryEvolution: Allow adding associated types.
We're going to try to do this.
2016-02-08 16:27:54 -08:00
Jordan Rose 0be8afe114 [docs] LibraryEvolution: Assorted edits.
Filling out some sections, wordsmithing others, moving things around.
2016-02-07 10:12:50 -08:00
Jordan Rose dc04ebf9b1 [docs] LibraryEvolution: Backdating rules don't apply to SPI.
...if we had such a feature, anyway.
2016-02-07 10:12:50 -08:00
Jordan Rose a53ebe7681 [docs] LibraryEvolution: Initializers need to enforce DI.
...so they usually can't be inlineable. Explain which ones can and which
ones can't.
2016-02-07 10:12:50 -08:00
Jordan Rose 005b6eba79 [docs] LibraryEvolution: Add a section on backdating. 2016-02-07 10:12:49 -08:00
practicalswift 7127018255 [gardening] Fix recently introduced typo: "overrideable" → "overridable" 2016-02-06 10:41:13 +01:00
Jordan Rose 6e4599ca01 [docs] LibraryEvolution: Discuss nominal members explicitly.
I realized "members are mostly the same as their top-level equivalents" is worth
calling out explicitly, especially for subscripts and initializers without top-level
equivalents. There's still a hole here for members of protocol extensions, which can
have pretty drastic effects on conforming types.
2016-02-05 20:48:15 -08:00
Jordan Rose d0ccc987af [docs] LibraryEvolution: Add a discussion of deployments.
I could explain that here, but it's all in the new section. :-)
2016-02-05 18:19:33 -08:00
Jordan Rose 33756a53b2 [docs] LibraryEvolution: s/proposal/document/
"Proposal" refers to something going through the Swift Evolution Process,
which this won't as such. (Although it does have many pieces affected by
proposals, as described at the end of the document.)
2016-02-05 16:35:13 -08:00
Jordan Rose a062186d5e [docs] LibraryEvolution: Fill out the section on fixed-contents classes.
Basically, elaborate on why it's not important right now. Also, drop the
section on limiting the addition of new vtable-dispatched methods. That's
not something we're really interested in.
2016-02-05 16:35:13 -08:00
Jordan Rose cb87705fe4 [docs] LibraryEvolution: Point out a Central Tenet of Swift:
The Default Behavior Should Be Safe

Also, remove the line about "providing tools to check changes", because
it no longer fits in the prologue flow and isn't core to the model.
The section on it is good enough.
2016-02-05 11:54:35 -08:00
Jordan Rose 65155cba0d [docs] LibraryEvolution: Member typealiases affect ABI.
Thanks, Dmitri!
2016-02-04 13:41:24 -08:00
Dmitri Gribenko c62dde514b Merge pull request #1198 from practicalswift/typo-fixes-20160204
[gardening] Fix recently introduced typos: "overrideable" → "overridable", "additioned" → "addition"
2016-02-04 09:16:04 -08:00
practicalswift 59737e4781 [gardening] Fix recently introduced typo: "additioned" → "addition" 2016-02-04 12:56:52 +01:00
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