Commit Graph

11 Commits

Author SHA1 Message Date
Mishal Shah
e7cd5ab17f Update master to build with Xcode 11.4 2020-03-24 11:30:45 -07:00
Xiaodi Wu
1d7ec4c129 [NFC][Foundation] Remove or replace unnecessary uses of 'fileprivate' 2020-02-23 13:45:13 -05:00
George
3391b746d9 [stdlib] Improve error messages when snake case conversion is used.
`convertFromSnakeCase` and `convertToSnakeCase` are not inverses of each other for keys like "pictureURL" (which roundtrips to "pictureUrl").
This does not fix the underlying issue, but improves the error message if this situation is detected.
2019-05-19 10:00:08 -07:00
Keita Nonaka
2771eb520c fix warnings 2019-04-18 13:11:57 -04:00
Jordan Rose
b0f5815d2b Merge pull request #20951 from pitiphong-p/encoders-nested-key-edge-case-bug
Reuse the container when requesting for a new nested container with the old key in JSONEncoder and PlistEncoder
2019-02-04 13:19:42 -08:00
Mike Ash
faceaaa0ab [stdlib][Foundation] Avoid coexistence conflicts with JSONEncoder/Decoder and _stdlib_AtomicInt.
JSONEcoder/Decoder get another underscore in their ObjC name, as the one with a single underscore conflicts with older Swifts that had _JSONEcoder/Decoder as internal rather than fileprivate.

_JSONEncoder/Decoder get another underscore in their Swift name to avoid conflicting with the ObjC name from the ones in older overlays.
2019-01-17 17:12:01 -05:00
Mike Ash
fa5888fb3f [Stdlib][Overlays] Rename various classes to avoid conflicting ObjC names.
Old Swift and new Swift runtimes and overlays need to coexist in the same process. This means there must not be any classes which have the same ObjC runtime name in old and new, because the ObjC runtime doesn't like name collisions.

When possible without breaking source compatibility, classes were renamed in Swift, which results in a different ObjC name.

Public classes were renamed only on the ObjC side using the @_objcRuntimeName attribute.

This is similar to the work done in pull request #19295. That only renamed @objc classes. This renames all of the others, since even pure Swift classes still get an ObjC name.

rdar://problem/46646438
2019-01-15 12:21:20 -05:00
Pitiphong Phongpattranont
a75d98f68c Refactor the looking for existing container code and change the error message on the condition 2018-12-08 13:39:40 +07:00
Pitiphong Phongpattranont
9a3038d3f0 Precondition for the mismatch container type when requesing for the nested container with the same key 2018-12-08 13:39:38 +07:00
Pitiphong Phongpattranont
32ef8773a2 Look up and reuse the container when asking for the nested container with the same key in JSONEncoder 2018-12-08 13:39:38 +07:00
Saleem Abdulrasool
41d9c2cc59 stdlib: restructure for OS family layout of SDK overlay
The SDK directory is now confusing as the Windows target also has a SDK
overlay.  In order to make this more uniform, move the SDK directory to
Darwin which covers the fact that this covers the XNU family of OSes.
The Windows directory contains the SDK overlay for the Windows target.
2018-12-06 11:32:05 -08:00