I've pulled down all the latest changes from
GitHub - apple/swift-corelibs-foundation: The Foundation Project, providing core utilities, internationalization, and OS independence and currently using the
latest toolchain (Swift Development Snapshot 2017-05-16).
However various errors arise when trying to build.

I get numerous errors that are similar to this:
swift-corelibs-foundation/Foundation/Data.swift:63:41: '>>' is unavailable
'>>' was obsoleted in Swift 4

And this error also occurs:
swift-corelibs-foundation/Foundation/NSArray.swift:375:157: Contextual
closure type '(UnsafeMutableRawPointer, Int) -> Void' expects 2 arguments,
but 1 was used in closure body

I was wondering if anyone knew a way around these errors? Or is there's
something I'm doing wrong.

Thanks.

Hello David,

Are you seeing these errors in macOS/Xcode? If so, I think `-swift-version 3` needs to be passed to the swift compiler. Submitted this PR for Mac build issues among others: 'Fix' macOS build errors, TestXDG folder cleanup by e78l · Pull Request #988 · apple/swift-corelibs-foundation · GitHub

Matt,
I think you’re running into similar issues, but Ted already made a PR for builds done with build-script - I believe that’s why the Linux build works (https://github.com/apple/swift-corelibs-foundation/pull/956\). Perhaps you can confirm in verbose mode `ninja -v`, in the swift-corelibs-foundation directory, that `-swift-version 3` is being passed in?

Regards,
Will Stanton

···

On May 18, 2017, at 7:07 AM, David Dunn via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

I've pulled down all the latest changes from GitHub - apple/swift-corelibs-foundation: The Foundation Project, providing core utilities, internationalization, and OS independence and currently using the latest toolchain (Swift Development Snapshot 2017-05-16).
However various errors arise when trying to build.

I get numerous errors that are similar to this:
swift-corelibs-foundation/Foundation/Data.swift:63:41: '>>' is unavailable
'>>' was obsoleted in Swift 4

And this error also occurs:
swift-corelibs-foundation/Foundation/NSArray.swift:375:157: Contextual closure type '(UnsafeMutableRawPointer, Int) -> Void' expects 2 arguments, but 1 was used in closure body

I was wondering if anyone knew a way around these errors? Or is there's something I'm doing wrong.

Thanks.

Hello David,

Are you seeing these errors in macOS/Xcode? If so, I think `-swift-version 3` needs to be passed to the swift compiler. Submitted this PR for Mac build issues among others: 'Fix' macOS build errors, TestXDG folder cleanup by e78l · Pull Request #988 · apple/swift-corelibs-foundation · GitHub

Matt,
I think you’re running into similar issues, but Ted already made a PR for builds done with build-script - I believe that’s why the Linux build works (https://github.com/apple/swift-corelibs-foundation/pull/956\). Perhaps you can confirm in verbose mode `ninja -v`, in the swift-corelibs-foundation directory, that `-swift-version 3` is being passed in?

Your pull request fixed the build for me. I'm also on macOS. Thanks,

Matt

···

On May 18, 2017, at 11:50 AM, Will Stanton <willstanton1@yahoo.com> wrote:

Regards,
Will Stanton

On May 18, 2017, at 7:07 AM, David Dunn via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

I've pulled down all the latest changes from GitHub - apple/swift-corelibs-foundation: The Foundation Project, providing core utilities, internationalization, and OS independence and currently using the latest toolchain (Swift Development Snapshot 2017-05-16).
However various errors arise when trying to build.

I get numerous errors that are similar to this:
swift-corelibs-foundation/Foundation/Data.swift:63:41: '>>' is unavailable
'>>' was obsoleted in Swift 4

And this error also occurs:
swift-corelibs-foundation/Foundation/NSArray.swift:375:157: Contextual closure type '(UnsafeMutableRawPointer, Int) -> Void' expects 2 arguments, but 1 was used in closure body

I was wondering if anyone knew a way around these errors? Or is there's something I'm doing wrong.

Thanks.