Skip to content

Foundation API Conformance Update: Miscellaneous #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 18, 2016

Conversation

itaiferber
Copy link
Contributor

Changes

NSBinarySearchOptions

  • FirstEqualfirstEqual
  • LastEquallastEqual
  • InsertionIndexinsertionIndex

Cache

  • CacheNSCache
  • Make NSCache generic for type safety

FileHandle

  • funcvar
  • publicopen
  • StringRunLoopMode

NSExpression

  • AnyObjectAny
  • expressionValueWithObject(_ object: AnyObject?, context: NSMutableDictionary?)expressionValue(with object: AnyObject?, context: NSMutableDictionary?)

Predicate

  • PredicateNSPredicate
  • Add missing public init(format predicateFormat: String, arguments argList: CVaListPointer) { NSUnimplemented() } and public convenience init(format predicateFormat: String, _ args: CVarArg...) { NSUnimplemented() }
  • Update filter/filtered extensions for collection classes

ComparisonPredicate

  • ComparisonPredicateNSComparisonPredicate

CompoundPredicate

  • CompoundPredicateNSCompoundPredicate
  • publicopen

UserDefaults

  • func standardUserDefaults() -> UserDefaultsvar standard: UserDefaults
  • Method name changes

NumberFormatter

  • AnyObjectAny
  • enum name changes
  • Uncomment out NSAttributedString methods

[NS]PersonNameComponents

  • Integrate work from overlay
  • Update bridging to new model

PersonNameComponentsFormatter

  • phoneticisPhonetic

MeasurementFormatter

  • Add missing public func string<UnitType : Unit>(from measurement: Measurement<UnitType>) -> String { NSUnimplemented() }

FileManager

  • Method naming changes
  • StringFileAttributeKey/FileAttributeType structs
  • NSFileManagerItemReplacementOptionsNSFileManager.ItemReplacementOptions
  • AnyObjectAny

@itaiferber
Copy link
Contributor Author

@swift-ci Please test

@itaiferber
Copy link
Contributor Author

@swift-ci Please test

@@ -576,7 +576,7 @@ open class FileManager : NSObject {

If you wish to only receive the URLs and no other attributes, then pass '0' for 'options' and an empty NSArray ('[NSArray array]') for 'keys'. If you wish to have the property caches of the vended URLs pre-populated with a default set of attributes, then pass '0' for 'options' and 'nil' for 'keys'.
*/
open func enumerator(at url: URL, includingPropertiesForKeys keys: [URLResourceKey]?, options mask: DirectoryEnumerationOptions = [], errorHandler handler: (@escaping (URL, Error) -> Bool)? = nil) -> DirectoryEnumerator? {
open func enumerator(at url: URL, includingPropertiesForKeys keys: [URLResourceKey]?, options mask: DirectoryEnumerationOptions = [], errorHandler handler: ((URL, Error) -> Bool)? = nil) -> DirectoryEnumerator? {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrose-apple This is a pretty gnarly error; these should be markable as @escaping. Do you know who would be the best to look at this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been talking about it with @milseman and @slavapestov. Right now it is treated as @escaping, so it's not broken; a function type used as a generic argument is assumed to be used in arbitrary ways inside the body of the type, and that includes Optional. But we probably want to special-case Optional at some point, and then we'll have to be careful to put this back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification! I'll add a comment in there to explain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Good catch, Philippe.)

@itaiferber
Copy link
Contributor Author

Third time's the charm?
@swift-ci Please test

@itaiferber
Copy link
Contributor Author

Okay, expected failure. Working on integration on rad

@itaiferber
Copy link
Contributor Author

Merging along with swiftlang/swift-corelibs-xctest#158

@itaiferber itaiferber merged commit 8cad4be into swiftlang:master Aug 18, 2016
@itaiferber
Copy link
Contributor Author

@swift-ci Please test

@itaiferber
Copy link
Contributor Author

(Tested manually as well so this should work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants