Commit Graph

19 Commits

Author SHA1 Message Date
Doug Gregor
24a361b7a9 [SDK Overlays] Drop redundant "Error" from AppKit and CoreData CocoaError codes.
Fixes the rest of rdar://problem/27778189.
2016-08-17 10:49:00 -07:00
Michael Gottesman
06a70d3942 [cmake] Add cmake support for only applying tsan to the swift stdlib/runtime. 2016-08-03 17:53:57 -07:00
Joe Groff
4a34dd1526 Update CoreData overlay for id-as-Any. 2016-07-25 06:01:21 -07:00
Philippe Hausler
e0ca8fbd80 [Foundation] Keep NS Updates due to changes in SE-0086
Second pass at updates for SE-0086 feedback

<rdar://problem/26892977> Make sure NSOrderedSet keeps its NS
<rdar://problem/26880016> NSBundleResourceRequest should keep its NS
<rdar://problem/26892958> Make sure NSAttributedString keeps its NS
<rdar://problem/26653694> NSCoder.decodeTopLevelObjectForKey does not follow naming guidelines
<rdar://problem/27355801> Foundation should have a structural type for TextCheckingResult
<rdar://problem/26770611> NSExpression naming is a bit awkward in swift
<rdar://problem/26653451> NSCoder encodeDataObject is misleading
<rdar://problem/26653653> NSCoder decodeObjectOfClass is redundant
2016-07-15 09:56:21 -07:00
Doug Gregor
00bb9d1037 [SE-0112] Associate various error-code enums with their error domains in the SDK. 2016-07-13 11:15:01 -07:00
Doug Gregor
c78aa11278 [Foundation] Drop 'NS' from NSCocoaError. 2016-07-12 10:53:52 -07:00
Doug Gregor
4fd78234c4 [SE-0112] Retain the underlying NSError in NSCocoaError.
NSCocoaError was capturing only the code of a Cocoa error, making it
basically useless. Instead, capture the entire NSError, the code of
which is tracked by an nested, RawRepresentable type Code. Provide
typed accessors for the common keys in the Cocoa error domain, e.g.,
NSFilePathErrorKey, NSStringEncodingErrorKey, NSUnderlyingErrorKey,
and NSURLErrorKey, to make this type easier to use.

This is specifically an implementation of part (4) of the proposed
solution to SE-0112, which makes NSCocoaError more usable. It also
adds localizedDescription to ErrorProtocol.

However, it also introduces the infrastructure needed for importing
error enumeration types more smoothly, e.g., ErrorCodeProtocol
(underscored for now), the ~= operator for matching error codes, and
so on. In essence, NSCocoaError is the pattern that the importer will
follow.
2016-07-12 10:53:52 -07:00
Jordan Rose
47a247c41b [SDK] Backwards-deployment support for Core Data's generics. (#3154)
rdar://problem/26825103
2016-06-23 12:47:22 -07:00
Brian Gesiak
328de9e280 [SR-1738] add_swift_library takes SHARED/STATIC arg
As a first step to allowing the build script to build *only*
static library versions of the stdlib, change `add_swift_library`
such that callers must pass in `SHARED`, `STATIC`, or `OBJECT_LIBRARY`.

Ideally, only these flags would be used to determine whether to
build shared, static, or object libraries, but that is not currently
the case -- `add_swift_library` also checks whether the library
`IS_STDLIB` before performing certain additional actions. This will be
cleaned up in a future commit.
2016-06-16 13:15:58 -04:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Jordan Rose
1a5f23e424 stdlib: Adjust names of hand-imported NSCocoaError/NSURLError cases. 2016-02-24 17:46:11 -08:00
Jordan Rose
6e1bf0d10d Rename @exported to @_exported for now.
At some point I want to propose a revised model for exports, but for now
just mark that support for '@exported' is still experimental and subject
to change. (Thanks, Max.)
2015-11-05 11:59:00 -08:00
Dmitri Hrybenko
6402fda0c5 stdlib: remove a bunch of dynamic initializers from the library and overlays
Swift SVN r31403
2015-08-22 04:51:39 +00:00
Jordan Rose
99768eb346 Revert "Switch overlays from using @exported to -import-underlying-module."
This reverts r29441 because it breaks the Linux build. I'll talk to Dmitri
about this tomorrow.

See rdar://problem/21254367

Swift SVN r29444
2015-06-17 05:02:21 +00:00
Jordan Rose
c8bfc87c4e Switch overlays from using @exported to -import-underlying-module.
Some day we'll close the hole for @exported in the previous commit.

Swift SVN r29441
2015-06-17 04:48:06 +00:00
Jordan Rose
ff7c3f0c6a Make overlay dependencies explicit.
-import-underlying-module deliberately avoids autolinking against that module,
since normally it's used when building the Swift half of a single binary.
For the overlays, however, that's not what we want, so add the underlying
framework explicitly.

Swift SVN r29439
2015-06-17 04:47:58 +00:00
Doug Gregor
94aafe1f33 De-underscore _MachError, _POSIXError, _NSCocoaError, _NSURLError.
Turns rdar://problem/20536610 into API, per scattered but positive API
review feedback.

Swift SVN r28756
2015-05-19 05:53:36 +00:00
Doug Gregor
bddf134a87 Factor _NSCocoaError into a struct whose values are split across frameworks.
The Cocoa error domain is comprised on error codes from Foundation,
CoreData, and AppKit. Rather than try to collect all of the error
codes into a single enum in Foundation, use a struct that conforms to
ErrorType. Part of rdar://problem/20536610.

Swift SVN r28755
2015-05-19 05:53:34 +00:00