Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-16 Thread Edward Connell via swift-users
Specifying the clang import location is what is triggering the LLDBFrontend crash. I think you are saying that I should not need to specify the clang include import location to the compiler. I've attached the unmodified SwiftProtobuf example program found in the docs at

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-16 Thread Edward Connell via swift-users
> On 13 Oct 2017, at 22:09, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > I was able to boil down a repro that has nothing to do with my project, > woo hoo! > Put a break at the print statement and run. When it hits the break point > LLDBFrontend cr

Re: [swift-users] SwiftProtobuf unable to link on Ubuntu

2017-10-16 Thread Edward Connell via swift-users
Hi Alex, Yes of course using the Swift PM is what I needed to do. What was I thinking! ;p It worked, however SwiftProtobuf 1.0.0 does not build cleanly with Swift 4.0 due to the rework of the Strings API. I hope someone will clean that up soon. I appreciate your feedback and time, Ed On Mon,

Re: [swift-users] SwiftProtobuf unable to link on Ubuntu

2017-10-14 Thread Edward Connell via swift-users
at 1:00 PM, Geordie J <geo...@gmail.com> wrote: > Hi > > Am 14.10.2017 um 21:55 schrieb Edward Connell via swift-users < > swift-users@swift.org>: > > Has anyone used the SwiftProtobuf module on Linux? > https://github.com/apple/swift-protobuf > > I am able to succe

[swift-users] SwiftProtobuf unable to link on Ubuntu

2017-10-14 Thread Edward Connell via swift-users
Has anyone used the SwiftProtobuf module on Linux? https://github.com/apple/swift-protobuf I am able to successfully generate swift classes from my proto file. However when building, the code compiles but I get a ton of undefined link references. I included -Xswiftc

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-13 Thread Edward Connell via swift-users
import Foundation public class SomeClass { } public struct SomeStruct { public weak var someClass: SomeClass? } do { let data = SomeStruct() print("break here") } catch { print(String(describing: error)) } On Fri, Oct 13, 2017 at 10:21 AM, Edward Connell via swift-users <

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-13 Thread Edward Connell via swift-users
e visible difference is the "inout" > > Not sure what the problem is. It worked fine in the past. > > If you can think of an experiment I can try to create a simple repro case, > please let me know. > > Thanks, Ed > > On Fri, Oct 6, 2017 at 4:34 PM, Michael Gottes

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-07 Thread Edward Connell via swift-users
hing there? > > Michael > > On Oct 6, 2017, at 11:53 AM, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > While trying to debug a Netlib function, LLDB is crashing > > I'm not sure what this assert means. > > *LLDBFrontend: > /ho

Re: [swift-users] Using libdispatch with Trunk Development snapshot

2017-10-07 Thread Edward Connell via swift-users
$ find ~/swift -name "*dispatch*" /home/ed/swift/usr/lib/swift/linux/libdispatch.la /home/ed/swift/usr/lib/swift/linux/libdispatch.so /home/ed/swift/usr/lib/swift/dispatch /home/ed/swift/usr/lib/swift/dispatch/dispatch.h On Sat, Oct 7, 2017 at 9:51 AM, Lane Schwartz wrote:

Re: [swift-users] Using libdispatch with Trunk Development snapshot

2017-10-07 Thread Edward Connell via swift-users
No I installed it yesterday so 10/5 was the current one On Sat, Oct 7, 2017 at 9:36 AM, Lane Schwartz wrote: > Do you mean 10/6? I don't see a 10/5 build. > > On Sat, Oct 7, 2017 at 11:26 AM, Edward Connell > wrote: > >> I had the same problem with the

Re: [swift-users] Using libdispatch with Trunk Development snapshot

2017-10-07 Thread Edward Connell via swift-users
I had the same problem with the 9/30 build, but the 10/5 build worked for me. On Sat, Oct 7, 2017 at 9:21 AM, Alex Blewitt via swift-users < swift-users@swift.org> wrote: > This sounds like a bug. There were some changes recently to migrate the > build towards CMake and it may be that they have

[swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-06 Thread Edward Connell via swift-users
While trying to debug a Netlib function, LLDB is crashing I'm not sure what this assert means. *LLDBFrontend: /home/buildnode/jenkins/workspace/oss-swift-4.0-package-linux-ubuntu-16_04/swift/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp:613: (anonymous namespace)::SourceAccess

Re: [swift-users] Netlib

2017-10-04 Thread Edward Connell via swift-users
:38 AM, Vladimir.S <sva...@gmail.com> wrote: > On 03.10.2017 19:02, Edward Connell via swift-users wrote: > >> Hi All, >> Sorry something strange happened with the first post, so I am reposting >> this. >> >> I've recently wrapped up an ML framework

[swift-users] Netlib

2017-10-03 Thread Edward Connell via swift-users
Hi All, Sorry something strange happened with the first post, so I am reposting this. I've recently wrapped up an ML framework research project that I've been working on for some time. It addresses a lot of difficult design problems, and works around a lot of compiler bugs and Linux library

[swift-users] Netlib now on GitHub

2017-10-03 Thread Edward Connell via swift-users
Hi All, I've recently wrapped up an ML framework research project that I've been working on for some time. It addresses a lot of difficult design problems, and works around a lot of compiler bugs and Linux library deficiencies. It's written almost entirely in Swift 4.0 with some C and Cuda

Re: [swift-users] Using #function causes big memory leak

2017-08-28 Thread Edward Connell via swift-users
I reported it 5/16 in bug reporter. Possibly that was the wrong DB? https://bugreport.apple.com/web/?problemID=26535526 On Mon, Aug 28, 2017 at 8:45 AM, Joe Groff <jgr...@apple.com> wrote: > > > On Aug 27, 2017, at 10:57 AM, Edward Connell via swift-users < > swift-u

Re: [swift-users] Using #function causes big memory leak

2017-08-28 Thread Edward Connell via swift-users
en completed. You can see how the > memory stacks! > > Now. As to why and IF Swift is INTENDED to do this, or if indeed you’re > doing something unintended too I cannot say. > > If any of the above is incorrect, please chime in. > > Peter Nicholls > First time post. > >

[swift-users] Using #function causes big memory leak

2017-08-27 Thread Edward Connell via swift-users
I reported this about a year ago, but it has never been fixed and it seems like it should be fixed for the Swift 4.0 release. Here is a simple repro case. If you watch the memory monitor as it runs, you see memory consumption climb to 2.7GB when using #function, and no memory increase when using

[swift-users] LLDB Frontend crash

2017-07-04 Thread Edward Connell via swift-users
I have been blocked for several weeks with this LLDB crashing bug, but it has not been assigned to anyone. I'm providing repro steps with the LLDB CLI in order to remove any possibility that it is caused by my IDE. I have had this independently confirmed by one of the CLion engineers. I logged

[swift-users] Is "lazy let" on the schedule anywhere?

2017-06-26 Thread Edward Connell via swift-users
It sure would be nice if the compiler supported lazy lets for structs. Any idea when or if this will be supported? Seems like a nice performance win, lazy var is a pain because you can't access arguments passed into a function without mutation complaints. Thanks, Ed

[swift-users] lldb failure with Swift 4.0 on Ubuntu 16.04

2017-06-10 Thread Edward Connell via swift-users
I installed the June 7th Ubuntu 16.04 release and performed a clean build with no problems. However when I try to debug I get the following error, and then LLDB terminates. *LLDBFrontend: /home/buildnode/disk2/workspace/oss-swift-package-linux-ubuntu-16_04/swift/lib/SIL/TypeLowering.cpp:1693:

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-24 Thread Edward Connell via swift-users
0.5 >> >> let b = Float(UInt8.max) + 1.0 >> >> self = a / b >> >> } >> >> } >> >> >> You will get a very fast and good quality prng using xoroshiro, >> converting to unit range floating point and then

[swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Edward Connell via swift-users
Any ideas when Foundation on Linux will support arc4random_uniform? This is kind of an important function. There doesn't seem to be any decent substitute without requiring the installation of libbsd-dev, which turns out to be messy. Currently I am doing this, but glibc random with mod does not

[swift-users] Swift 4.0 forEach problem

2017-05-19 Thread Edward Connell via swift-users
In swift 3.1.1 I was able to have the function below, which "gets" an optional member collection of objects and calls their setModel member function. Simple and clean using the forEach method. public func setModel(model: Model) { get()?.forEach { $0.setModel(*model*: model) } } However it

[swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

2017-05-19 Thread Edward Connell via swift-users
When running the compiler using the "-swift-version 4" flag, the compiler complains about creating a dynamic type. Errors are flagged from within concrete base classes and also within protocol extensions. *error: cannot invoke 'type' with an argument list of type '(of: Self)'* *

Re: [swift-users] swift 4.0 complains/warns about swapping array elements

2017-05-19 Thread Edward Connell via swift-users
Great! Yes, changing the diagnostic message will save people from having to ask this question. Thanks, Ed On Fri, May 19, 2017 at 10:30 AM, Devin Coughlin <dcough...@apple.com> wrote: > Hi Ed, > > On May 19, 2017, at 10:10 AM, Edward Connell via swift-users < > swift-u

Re: [swift-users] How to use a protocol to infer a generic type with constraints

2017-05-02 Thread Edward Connell via swift-users
Does anyone have an idea when this is going to be fixed? Or when support will be implemented? My app heavily uses collections of heterogenous plug-ins, so it's a real pain in the neck to work around. On Tue, May 2, 2017 at 2:08 AM, Satoshi Nakagawa via swift-users < swift-users@swift.org> wrote:

Re: [swift-users] LLDB fails when I update to Swift 3.1 (error in auto-import)

2017-04-16 Thread Edward Connell via swift-users
/home/ed/swift/usr/lib/swift/dispatch/dispatch.h:42:* >> *#include * >> * ^* >> >> *error: /usr/include/x86_64-linux-gnu/sys/cdefs.h:23:11: error: could not >> build module 'SwiftGlibc'* >> *# include * >> * ^* >> >>

[swift-users] LLDB fails when I update to Swift 3.1 (error in auto-import)

2017-04-14 Thread Edward Connell via swift-users
Groan... I just tried to update to Swift 3.1 on ubuntu 16.04. Everything builds fine, but when I try to debug I get the dreaded: error in auto-import: failed to get module 'XYZ' from AST context Everything built and debugged just fine with the previous Swift release. I assume LLDB is unhappy

Re: [swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Edward Connell via swift-users
Putting a struct with your common vars in it seems like it wouldn't work, because now it is a member and the vars aren't exposed on your object directly, so the outer struct wouldn't conform to the protocols. My original problem with inheritance is that you can't correctly adopt a protocol on a

[swift-users] It seems like we really need an #include preprocessor directive?

2017-03-11 Thread Edward Connell via swift-users
Observations about difining an object - Structs can't inherit and classes shouldn't inherit, final concrete types should be flat - Protocols need to be adopted by the final concrete type, otherwise constraint specializations aren't correctly applied This creates a really ugly code

[swift-users] Protocol conformance failure

2017-03-09 Thread Edward Connell via swift-users
The error says ItemProtocol does not conform to ItemProtocol. That doesn't make sense. It seems this should work fine. // It's all clean until the last line protocol ItemProtocol : class { var message: String { get } } // heterogenious types class A : ItemProtocol { var message = "A" } class B

Re: [swift-users] What is the intended response to Array change notification for dependents?

2017-03-07 Thread Edward Connell via swift-users
My project is on Linux, so pure Swift. So you don't think this is an issue of intentional library design, but a recognized problem that hasn't been addressed yet? Thanks, Ed On Tue, Mar 7, 2017 at 8:13 AM, Jens Alfke wrote: > > On Mar 7, 2017, at 8:08 AM, Edward Connell

Re: [swift-users] What is the intended response to Array change notification for dependents?

2017-03-07 Thread Edward Connell via swift-users
iPhone > On Mar 7, 2017, at 7:59 AM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Mar 6, 2017, at 11:36 PM, Rien via swift-users <swift-users@swift.org> >> wrote: >> >> On 07 Mar 2017, at 03:56, Edward Connell via swift-users >> <swi

[swift-users] What is the intended response to Array change notification for dependents?

2017-03-06 Thread Edward Connell via swift-users
I would like to have an Array implementation where I get more information than just "the whole thing changed". As a value type I get it, but lets say it's a list of 500 image info structs and it's bound to UI. You change one item, now the whole array changes and you have to rebuild the entire

Re: [swift-users] Is this really a race condition?

2017-03-02 Thread Edward Connell via swift-users
in Xcode and > it works. Anyone knows why this works in Xcode or in macOS? I thought it > should show the same warnings as Linux. > > Zhaoxin > > On Fri, Mar 3, 2017 at 2:51 AM, Edward Connell via swift-users < > swift-users@swift.org> wrote: > >> Hi Guillaume, >

Re: [swift-users] Is this really a race condition?

2017-03-02 Thread Edward Connell via swift-users
s...@tffenterprises.com> wrote: > >> >> > On Mar 1, 2017, at 3:21 PM, Edward Connell via swift-users < >> swift-users@swift.org> wrote: >> > >> > The thread sanitizer on Linux is reporting that I have race conditions >> in libswiftcore. I elimin

[swift-users] Is this really a race condition?

2017-03-01 Thread Edward Connell via swift-users
The thread sanitizer on Linux is reporting that I have race conditions in libswiftcore. I eliminated enough code down to this trivial example. Is there really a race condition here or are these bogus errors? let count = 1000 var items = [[UInt8]?](repeating: nil, count: count)

Re: [swift-users] isKnownUniquelyReferenced really a mutating function?

2017-01-25 Thread Edward Connell via swift-users
is an implementation artifact. On Wed, Jan 25, 2017 at 10:31 AM, Joe Groff <jgr...@apple.com> wrote: > > > On Jan 25, 2017, at 10:20 AM, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > > > I have a data structure that calls isKnownUniquelyRef

[swift-users] How to include swift test resource files?

2016-11-10 Thread Edward Connell via swift-users
Swift test builds and runs the package Tests. My tests require data files such as images to run. With an Xcode project we can Copy Bundle Resources in the Build Phases to include the necessary files. How do we do this with swift test, or swift build? I thought about a hack to manually copy the

[swift-users] How do you dynamically load a module on Linux?

2016-10-31 Thread Edward Connell via swift-users
On OSX my application loads a bundle from the PlugIns directory. It loads and executes perfectly. Now I'm painfully trying to port my code to Linux, where we don't seem to have frameworks or bundles per se. I assumed a bundle is just a dynamic lib or module. My build creates a PlugIns directory

Re: [swift-users] Swift Package Manager questions

2016-10-17 Thread Edward Connell via swift-users
arguments to swift build, escape each argument > with the prefix eg: > *`-Xswiftc -target x86_64-apple-macosx10.12` **should be:** `**-Xswiftc > -target **-Xswiftc **x86_64-apple-macosx10.12`* > > > On Mon, Oct 17, 2016 at 5:23 AM, Edward Connell via swift-users < > sw