Re: [swift-users] Use Package Manager for iOS Development

2016-04-15 Thread Max Howell via swift-users
You can use the Swift 3 `swift build` to generate projects for Swift 2.2 use. SwiftPM generates dylibs, not frameworks (currently), this may make things trickier. But there shouldn’t be anything stopping you trying to make iOS app against them. I suggest generating a dependencies project, dragg

Re: [swift-users] Using an SPM built module in REPL

2016-03-28 Thread Max Howell via swift-users
Possibly a mismatch in the import of the CoreGraphics swift runtime overlay? Please open a bug with package-manager as the component. https://bugs.swift.org > On Mar 26, 2016, at 4:37 AM, Swift Studies via swift-users > wrote: > > I have often wanted to quickly test a module I have built in th

Re: [swift-users] Latest builds broken?

2016-03-21 Thread Max Howell via swift-users
Yes, we’re tracking this here: https://bugs.swift.org/browse/SR-975 The ticket also contains information on how to fix it. > Hi, > > this might be a case of user error but I can’t use the latest builds to do > anything (on OSX). > > Trying to do a swift build results in the following - > > $

Re: [swift-users] Problems building with dependency

2016-03-19 Thread Max Howell via swift-users
> I have a package I am building that I have introduced a dependency for, but > swift build is failing. It looks like a git error: > > gbn-sstudies-mv:SmarkDown sstudies$ swift build > Cloning https://github.com/SwiftStudies/Duration.git > /usr/local/bin/git -C > /Users/sstudies/Documents/Code/

Re: [swift-users] Installing Package manager

2016-03-19 Thread Max Howell via swift-users
The swift in /usr/bin does not know about the swift toolchain you have installed. You need to add the swift from the /usr/bin in your toolchain to the PATH first. Once Xcode 7.3 lands you’ll be able to set TOOLCHAINS=swift as an environment variable and then you won’t need to set the PATH. >

Re: [swift-users] Problems building with dependency

2016-03-18 Thread Max Howell via swift-users
More likely this is from brew or macports. Xcode has shipped a newer version for a long time now. > On Mar 17, 2016, at 10:21 AM, Swift Studies wrote: > > > Ah that's good to know... I assume 1.8.4 is what is installed along with the > XCode command line tools.. What's the best way to upgrade

Re: [swift-users] How to define interdependent modules in a package?

2015-12-22 Thread Max Howell via swift-users
> Compiling this produces an error saying : foo.swift: error: no such module > 'Bar' > When I remove dependency of 'Bar' module from foo.swift (by removing import > statement and call to 'bar'), it compiles fine. > Am I missing something here? Can't I use imports directly? You’re not missing any

Re: [swift-users] Issues linking a C library module using swift build

2015-12-14 Thread Max Howell via swift-users
Might well be that it is a statically compiled library. Would be easy to test. Do you mind opening a ticket for this? https://bugs.swift.org > Hello all, > > > I’m having some strange issues on osx when trying to link a C library module. > I’ve successfully did this before with another library

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Max Howell via swift-users
If you could publish your sources on GitHub or somewhere similar we could probably be more help. > On Dec 11, 2015, at 6:21 PM, Gage Morgan via swift-users > wrote: > > I'm going to. Now, does this mean anything labelled func inside the struct > needs tacked on as well? > > Subject: Re: [swi

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-09 Thread Max Howell via swift-users
Look at the .so file, you put the name without the lib prefix and without the .so suffix. > So if the name of the library is libcairo amd to imstall I had to type "sudo > apt-get install libcairo2-dev, what would I put for "link:?" ___ swift-users mai

Re: [swift-users] Improving a simple C binding

2015-12-09 Thread Max Howell via swift-users
> > Another option would seem to be modelling the daylights out of build > > environments but I think this runs afoul of enumerations. Right now we have > > `os(Linux)` but we'd really need `os(Ubuntu)`, `os(RedHat)` and so forth to > > handle dependencies like these. And if people are working o

Re: [swift-users] CleanroomLogger, a pure Swift logging engine

2015-12-09 Thread Max Howell via swift-users
Very exciting. Glad to see such projects emerge. I hope that you’ll accept patches to make it cross-platform! And to include swift package manager support. > On Dec 9, 2015, at 12:53 PM, Evan Maloney via swift-users > wrote: > > Over on some of the other Swift mailing lists, people have been

Re: [swift-users] Improving a simple C binding

2015-12-09 Thread Max Howell via swift-users
> In the case of `libpq`, even something obvious like `/usr -> /usr/local` > wouldn't work because on Ubuntu it ends up in `/usr/include/postgres`. Yes, I consider this quite a nasty issue that I’d like solve asap. > Since we can't have macros in the module map, I think option (2) -- platform >

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-09 Thread Max Howell via swift-users
> Gage, > > For what it's worth, after running `git init` and `git tag -f 1.0.0` > in `CCairo` to get something importable, I run into this error: > > :; swift build > Cloning Packages/CCairo > :0: error: no such file or directory: > '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/P

Re: [swift-users] Improving a simple C binding

2015-12-09 Thread Max Howell via swift-users
> Behold, a binding for libpq: > > https://github.com/solidsnack/CLibPQ > > And a little app that uses it: > > https://github.com/solidsnack/PGVersion > > CLibPQ is put together in the simplest way: there's a module.modulemap > at the root and that's it. I would like to make some changes to t

Re: [swift-users] Pure Swift, cross platform way to open, read/write files?

2015-12-09 Thread Max Howell via swift-users
I feel I must point the community at: https://github.com/apple/swift-package-manager/tree/master/Sources/POSIX Which is mostly what I think you are calling the lower layer. >>> A lower layer is also needed -- simple Swifty wrappers for the >>> Unix system calls so that Swift implementations can

Re: [swift-users] Undefined symbols preventing build

2015-12-08 Thread Max Howell via swift-users
If you report the bug I can get the relevant people involved in solving this: https://bugs.swift.org Otherwise from what I can see the Swift standard library is not being linked. I can’t say why. It may help if you run `swift build -v` and also which OS X is this? > On Dec 8, 2015, at 12:36 PM

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-08 Thread Max Howell via swift-users
Probably this is a link path issue. Can you open a ticket including your module map and an example source? https://bugs.swift.org Thanks, Max > From: > gagemor...@outlook.com > To: mawa...@apple.com > Subject: RE: [swift-users] Bindin

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-08 Thread Max Howell via swift-users
Chris, adding the C prefix is our recommendation so it is clear at the import statement that the sources in question are using the raw C interface rather than any “Swifty” wrapper. We hope thus that the community will provide modules that add error handling, default arguments, closures, etc. wh

Re: [swift-users] Linux - How to use C libs

2015-12-07 Thread Max Howell via swift-users
Indeed, this *should* work, and if we have to do some tricks to make it do so we’re happy to make the modifications, so please file a bug and we’ll look into it. Thanks. Max > On Dec 7, 2015, at 11:06 AM, Mish Awadah via swift-users > wrote: > > Please file a bug describing the situation and