[swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Madhu Samuel via swift-corelibs-dev
Hi All,

I am new to this forum.

I am trying to build the xctest project. I followed the instructions at
https://github.com/apple/swift-corelibs-xctest

I am able to successfully build via the build scripts. But, if I build
XCTest using xcode using the SwiftXCTest scheme I am getting a few errors.

1. swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64: error:
cannot convert value of type 'UnsafeMutablePointer' (aka
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
let unmanaged = Unmanaged.fromOpaque(privateData)

2. swift-corelibs-foundation/Foundation/NSTimer.swift:14:47: error: cannot
convert value of type 'UnsafeMutablePointer' (aka
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
let t = Unmanaged.fromOpaque(info!).takeUnretainedValue()

etc.

My dev environment,
OS: Mac OSX El Capitan 10.11.4 (15E65).
Xcode Version: Version 7.3.1 (7D1014)
XCode Toolchain: Swift Development Snapshot 2016-05-09 (a)

Any help is appreciated.

Regards,
Madhu
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Brian Gesiak via swift-corelibs-dev
Madhu,
Thanks for the report!
The main difference between the build scripts (which use xcodebuild) and using 
Xcode itself is the version of Swift that is used. The build scripts build a 
Swift 3.0 compiler, then use that to build XCTest. When using Xcode directly, 
you need to select a recent Swift toolchain yourself.
Which Swift toolchain are you using to compile XCTest in Xcode?
Our tests only make sure apple/swift master works. If the latest Swift 
toolchain from http://swift.org doesn't work, you may have to built your own 
toolchain. You can do so using the `utils/build-toolchain` script in the Swift 
repository.
Once you figure out your Swift toolchain version, let us know! You should be 
able to find out in the preferences pane in Xcode.
- Brian Gesiak





On Sun, May 29, 2016 at 1:24 AM -0700, "Madhu Samuel via swift-corelibs-dev" 
 wrote:










Hi All,
I am new to this forum. 
I am trying to build the xctest project. I followed the instructions at 
https://github.com/apple/swift-corelibs-xctest
I am able to successfully build via the build scripts. But, if I build XCTest 
using xcode using the SwiftXCTest scheme I am getting a few errors. 
1. swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64: error: 
cannot convert value of type 'UnsafeMutablePointer' (aka 
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'           
 let unmanaged = Unmanaged.fromOpaque(privateData)
2. swift-corelibs-foundation/Foundation/NSTimer.swift:14:47: error: cannot 
convert value of type 'UnsafeMutablePointer' (aka 
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'    let t 
= Unmanaged.fromOpaque(info!).takeUnretainedValue()
etc.
My dev environment, OS: Mac OSX El Capitan 10.11.4 (15E65).Xcode Version: 
Version 7.3.1 (7D1014)XCode Toolchain: Swift Development Snapshot 2016-05-09 (a)
Any help is appreciated.
Regards,Madhu







___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Brian Gesiak via swift-corelibs-dev
Madhu,
Oy, my bad -- I only just noticed you put the toolchain version at the bottom 
of your original email.
It's possible the May 9th toolchain is already too old to build XCTest. I'll 
double-check myself. In the meantime, you may want to try building your own 
toolchain and using that.
- Brian Gesiak






On Sun, May 29, 2016 at 7:23 AM -0700, "Brian Gesiak"  
wrote:










Madhu,
Thanks for the report!
The main difference between the build scripts (which use xcodebuild) and using 
Xcode itself is the version of Swift that is used. The build scripts build a 
Swift 3.0 compiler, then use that to build XCTest. When using Xcode directly, 
you need to select a recent Swift toolchain yourself.
Which Swift toolchain are you using to compile XCTest in Xcode?
Our tests only make sure apple/swift master works. If the latest Swift 
toolchain from http://swift.org doesn't work, you may have to built your own 
toolchain. You can do so using the `utils/build-toolchain` script in the Swift 
repository.
Once you figure out your Swift toolchain version, let us know! You should be 
able to find out in the preferences pane in Xcode.
- Brian Gesiak





On Sun, May 29, 2016 at 1:24 AM -0700, "Madhu Samuel via swift-corelibs-dev" 
 wrote:










Hi All,
I am new to this forum. 
I am trying to build the xctest project. I followed the instructions at 
https://github.com/apple/swift-corelibs-xctest
I am able to successfully build via the build scripts. But, if I build XCTest 
using xcode using the SwiftXCTest scheme I am getting a few errors. 
1. swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64: error: 
cannot convert value of type 'UnsafeMutablePointer' (aka 
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'           
 let unmanaged = Unmanaged.fromOpaque(privateData)
2. swift-corelibs-foundation/Foundation/NSTimer.swift:14:47: error: cannot 
convert value of type 'UnsafeMutablePointer' (aka 
'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'    let t 
= Unmanaged.fromOpaque(info!).takeUnretainedValue()
etc.
My dev environment, OS: Mac OSX El Capitan 10.11.4 (15E65).Xcode Version: 
Version 7.3.1 (7D1014)XCode Toolchain: Swift Development Snapshot 2016-05-09 (a)
Any help is appreciated.
Regards,Madhu












___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Brian Croom via swift-corelibs-dev
That's right, breaking changes have been made to Swift since the latest
toolchain snapshot was released, and Corelibs Foundation has been updated
accordingly.

Until the next snapshot, an alternative to building your own toolchain
would be to check out an older commit of Foundation which still builds with
the compiler in the snapshot toolchain, since XCTest doesn't depend on any
of the more recent Foundation changes. I've had success using this commit:
https://github.com/apple/swift-corelibs-foundation/commit/04d4f92870652160388f1c69de3fd7bb0656860c


--Brian

söndag 29 maj 2016 skrev Brian Gesiak via swift-corelibs-dev <
swift-corelibs-dev@swift.org>:

> Madhu,
>
> Oy, my bad -- I only just noticed you put the toolchain version at the
> bottom of your original email.
>
> It's possible the May 9th toolchain is already too old to build XCTest.
> I'll double-check myself. In the meantime, you may want to try building
> your own toolchain and using that.
>
> - Brian Gesiak
>
>
>
>
>
> On Sun, May 29, 2016 at 7:23 AM -0700, "Brian Gesiak"  > wrote:
>
> Madhu,
>>
>> Thanks for the report!
>>
>> The main difference between the build scripts (which use xcodebuild) and
>> using Xcode itself is the version of Swift that is used. The build scripts
>> build a Swift 3.0 compiler, then use that to build XCTest. When using Xcode
>> directly, you need to select a recent Swift toolchain yourself.
>>
>> Which Swift toolchain are you using to compile XCTest in Xcode?
>>
>> Our tests only make sure apple/swift master works. If the latest Swift
>> toolchain from http://swift.org doesn't work, you may have to built your
>> own toolchain. You can do so using the `utils/build-toolchain` script in
>> the Swift repository.
>>
>> Once you figure out your Swift toolchain version, let us know! You should
>> be able to find out in the preferences pane in Xcode.
>>
>> - Brian Gesiak
>>
>>
>>
>>
>>
>> On Sun, May 29, 2016 at 1:24 AM -0700, "Madhu Samuel via
>> swift-corelibs-dev" > > wrote:
>>
>> Hi All,
>>>
>>> I am new to this forum.
>>>
>>> I am trying to build the xctest project. I followed the instructions at
>>> https://github.com/apple/swift-corelibs-xctest
>>>
>>> I am able to successfully build via the build scripts. But, if I build
>>> XCTest using xcode using the SwiftXCTest scheme I am getting a few errors.
>>>
>>> 1. swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64:
>>> error: cannot convert value of type 'UnsafeMutablePointer' (aka
>>> 'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
>>> let unmanaged =
>>> Unmanaged.fromOpaque(privateData)
>>>
>>> 2. swift-corelibs-foundation/Foundation/NSTimer.swift:14:47: error:
>>> cannot convert value of type 'UnsafeMutablePointer' (aka
>>> 'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
>>> let t = Unmanaged.fromOpaque(info!).takeUnretainedValue()
>>>
>>> etc.
>>>
>>> My dev environment,
>>> OS: Mac OSX El Capitan 10.11.4 (15E65).
>>> Xcode Version: Version 7.3.1 (7D1014)
>>> XCode Toolchain: Swift Development Snapshot 2016-05-09 (a)
>>>
>>> Any help is appreciated.
>>>
>>> Regards,
>>> Madhu
>>>
>>>
>>>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Madhu Samuel via swift-corelibs-dev
Wow, that was a quick response. Thanks Brian Gesiak and Brian Croom.

My first quick attempt using build-toolchain script to build my own tool
chain failed. Anyway I will give it another try and let you know the status.

On Mon, May 30, 2016 at 1:52 AM, Brian Croom 
wrote:

> That's right, breaking changes have been made to Swift since the latest
> toolchain snapshot was released, and Corelibs Foundation has been updated
> accordingly.
>
> Until the next snapshot, an alternative to building your own toolchain
> would be to check out an older commit of Foundation which still builds with
> the compiler in the snapshot toolchain, since XCTest doesn't depend on
> any of the more recent Foundation changes. I've had success using this
> commit:
> https://github.com/apple/swift-corelibs-foundation/commit/04d4f92870652160388f1c69de3fd7bb0656860c
>
>
> --Brian
>
>
> söndag 29 maj 2016 skrev Brian Gesiak via swift-corelibs-dev <
> swift-corelibs-dev@swift.org>:
>
>> Madhu,
>>
>> Oy, my bad -- I only just noticed you put the toolchain version at the
>> bottom of your original email.
>>
>> It's possible the May 9th toolchain is already too old to build XCTest.
>> I'll double-check myself. In the meantime, you may want to try building
>> your own toolchain and using that.
>>
>> - Brian Gesiak
>>
>>
>>
>>
>>
>> On Sun, May 29, 2016 at 7:23 AM -0700, "Brian Gesiak" <
>> modoca...@gmail.com> wrote:
>>
>> Madhu,
>>>
>>> Thanks for the report!
>>>
>>> The main difference between the build scripts (which use xcodebuild) and
>>> using Xcode itself is the version of Swift that is used. The build scripts
>>> build a Swift 3.0 compiler, then use that to build XCTest. When using Xcode
>>> directly, you need to select a recent Swift toolchain yourself.
>>>
>>> Which Swift toolchain are you using to compile XCTest in Xcode?
>>>
>>> Our tests only make sure apple/swift master works. If the latest Swift
>>> toolchain from http://swift.org doesn't work, you may have to built
>>> your own toolchain. You can do so using the `utils/build-toolchain` script
>>> in the Swift repository.
>>>
>>> Once you figure out your Swift toolchain version, let us know! You
>>> should be able to find out in the preferences pane in Xcode.
>>>
>>> - Brian Gesiak
>>>
>>>
>>>
>>>
>>>
>>> On Sun, May 29, 2016 at 1:24 AM -0700, "Madhu Samuel via
>>> swift-corelibs-dev"  wrote:
>>>
>>> Hi All,

 I am new to this forum.

 I am trying to build the xctest project. I followed the instructions at
 https://github.com/apple/swift-corelibs-xctest

 I am able to successfully build via the build scripts. But, if I build
 XCTest using xcode using the SwiftXCTest scheme I am getting a few errors.

 1. swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64:
 error: cannot convert value of type 'UnsafeMutablePointer' (aka
 'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
 let unmanaged =
 Unmanaged.fromOpaque(privateData)

 2. swift-corelibs-foundation/Foundation/NSTimer.swift:14:47: error:
 cannot convert value of type 'UnsafeMutablePointer' (aka
 'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
 let t = Unmanaged.fromOpaque(info!).takeUnretainedValue()

 etc.

 My dev environment,
 OS: Mac OSX El Capitan 10.11.4 (15E65).
 Xcode Version: Version 7.3.1 (7D1014)
 XCode Toolchain: Swift Development Snapshot 2016-05-09 (a)

 Any help is appreciated.

 Regards,
 Madhu



___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] [XCTest] Cannot build using XCode

2016-05-29 Thread Madhu Samuel via swift-corelibs-dev
Wow, that was a quick response. Thanks Brian Gesiak and Brian Croom. 

My first quick attempt using build-toolchain script to build my own tool chain 
failed. Anyway I will give it another try and let you know the status.
 

smime.p7s
Description: S/MIME cryptographic signature
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


[swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-29 Thread Brian Gesiak via swift-corelibs-dev
Hello all!

I'm working on https://bugs.swift.org/browse/SR-710, which involves porting
SourceKit to Linux. SourceKit contains a handful of references to
libdispatch symbols.

I have two questions:

1. Could someone share a set of instructions to build
swift-corelibs-libdispatch on Linux? I'm using Ubuntu 15.10 and have
installed [the dependencies listed here](
https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20151207/000122.html).
I have tried using both `swift/utils/build-script --libdispatch` as well as
the instructions in the swift-corelibs-libdispatch `INSTALL` file. Both
fail with the [same errors](
https://gist.github.com/modocache/8389d5d64e39ca5a4281500f84e9ce11). Any
tips?

2. I don't know much about C++, but from what I understand the C++ stdlib
provides tools for asynchronous programming. I list SourceKit's uses of
libdispatch in a comment on https://bugs.swift.org/browse/SR-1639. For
those familiar with both C++ and libdispatch: do you think it's a good idea
to migrate to C++, at least for now?

Any advice would be appreciated. Thanks!!

- Brian Gesiak
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev