These are chat archives for elliottminns/blackfish

5th
Mar 2016
Pierre Abi-aad
@abiaad
Mar 05 2016 09:44
hello Elliott !
I’m on another Mac trying to compile my app but I have a linking error for libuv :
ld: library not found for -luv for architecture x86_64
I first install libuv with homebrew
Pierre Abi-aad
@abiaad
Mar 05 2016 10:03
my mistake ahah
it’s working ;)
Pierre Abi-aad
@abiaad
Mar 05 2016 10:21
I added orca and orca-mongo
And launched :
swift build -Xcc -I/usr/local/include -Xlinker -L/use/local/lib
and there is a compilation failure on mongo :
#import "/usr/local/include/libmongoc-1.0/mongoc.h" ^ /usr/local/include/libmongoc-1.0/mongoc.h:22:10: error: 'bson.h' file not found
Elliott Minns
@elliottminns
Mar 05 2016 10:53
Have you got mongodb installed?
Pierre Abi-aad
@abiaad
Mar 05 2016 10:54
I launched brew install mongo-c before
Elliott Minns
@elliottminns
Mar 05 2016 10:55
have you done
brew link --overwrite mongo-c
Pierre Abi-aad
@abiaad
Mar 05 2016 10:55
yes
Elliott Minns
@elliottminns
Mar 05 2016 10:55
(On a train at the moment so my connection is rather poor :smile: )
Pierre Abi-aad
@abiaad
Mar 05 2016 10:55
(you are everywhere !)
when I do brew link --overwrite bson
I have an error Error: No such keg: /usr/local/Cellar/bson
Elliott Minns
@elliottminns
Mar 05 2016 10:57
Hmmm
can you paste the result of ls /usr/local/include
Pierre Abi-aad
@abiaad
Mar 05 2016 10:58
lrwxr-xr-x   1 abiaad  admin    43 Mar  5 11:07 libbson-1.0 -> ../Cellar/libbson/1.1.7/include/libbson-1.0
lrwxr-xr-x   1 abiaad  admin    39 Mar  4 23:27 libltdl -> ../Cellar/libtool/2.4.6/include/libltdl
lrwxr-xr-x   1 abiaad  admin    45 Mar  5 11:10 libmongoc-1.0 -> ../Cellar/mongo-c/1.1.6/include/libmongoc-1.0
lrwxr-xr-x   1 abiaad  admin    38 Mar  4 23:27 ltdl.h -> ../Cellar/libtool/2.4.6/include/ltdl.h
drwxrwxr-x  39 abiaad  staff  1326 Jan 20 20:02 node
drwxr-xr-x   4 root    wheel   136 Nov 12 08:39 osxfuse
lrwxr-xr-x   1 abiaad  admin    40 Mar  5 10:43 uv-darwin.h -> ../Cellar/libuv/HEAD/include/uv-darwin.h
lrwxr-xr-x   1 abiaad  admin    39 Mar  5 10:43 uv-errno.h -> ../Cellar/libuv/HEAD/include/uv-errno.h
lrwxr-xr-x   1 abiaad  admin    44 Mar  5 10:43 uv-threadpool.h -> ../Cellar/libuv/HEAD/include/uv-threadpool.h
lrwxr-xr-x   1 abiaad  admin    38 Mar  5 10:43 uv-unix.h -> ../Cellar/libuv/HEAD/include/uv-unix.h
lrwxr-xr-x   1 abiaad  admin    41 Mar  5 10:43 uv-version.h -> ../Cellar/libuv/HEAD/include/uv-version.h
lrwxr-xr-x   1 abiaad  admin    33 Mar  5 10:43 uv.h -> ../Cellar/libuv/HEAD/include/uv.h
Elliott Minns
@elliottminns
Mar 05 2016 11:01
Let me have a look at stuff my end
Hmm, it all looks correct. It's odd that it's not finding libbson
drwxr-xr-x 27 Elliott admin 918B 13 Feb 14:51 libbson-1.0
lrwxr-xr-x 1 Elliott admin 39B 11 Jan 14:16 libltdl -> ../Cellar/libtool/2.4.6/include/libltdl
drwxr-xr-x 102 Elliott admin 3.4K 13 Feb 14:49 libmongoc-1.0
lrwxr-xr-x 1 Elliott admin 38B 11 Jan 14:16 ltdl.h -> ../Cellar/libtool/2.4.6/include/ltdl.h
oops
drwxr-xr-x   27 Elliott  admin   918B 13 Feb 14:51 libbson-1.0
lrwxr-xr-x    1 Elliott  admin    39B 11 Jan 14:16 libltdl -> ../Cellar/libtool/2.4.6/include/libltdl
drwxr-xr-x  102 Elliott  admin   3.4K 13 Feb 14:49 libmongoc-1.0
lrwxr-xr-x    1 Elliott  admin    38B 11 Jan 14:16 ltdl.h -> ../Cellar/libtool/2.4.6/include/ltdl.h
for some reason, mine isn't symlinked
Aha!
I've got it
Pierre Abi-aad
@abiaad
Mar 05 2016 11:03
oh!
Elliott Minns
@elliottminns
Mar 05 2016 11:04
swift build -Xcc -I/usr/local/include/libbson-1.0 -Xlinker -L/use/local/lib
need the libson path
Pierre Abi-aad
@abiaad
Mar 05 2016 11:07
works !
with swift build -Xcc -I/usr/local/include/libbson-1.0 -Xlinker -L/usr/local/lib
;)
omg I’m able to create an app now (hope so ahah)
thx a lot !
Elliott Minns
@elliottminns
Mar 05 2016 11:08
:D
Pierre Abi-aad
@abiaad
Mar 05 2016 11:08
it should be great to package all of this a just use a blackfish start
Elliott Minns
@elliottminns
Mar 05 2016 11:09
Hmm, that's a good idea
I currently have it as a makefile in my project
Pierre Abi-aad
@abiaad
Mar 05 2016 11:10
nice
have to go but let’s talk later about that ! Have a nice trip and day!
and thx again
Elliott Minns
@elliottminns
Mar 05 2016 11:11
No problem! ttyl
Pierre Abi-aad
@abiaad
Mar 05 2016 15:04
one question about developement method. How do you code ? With Xcode ? How do you have code completion / etc … ? Is there a way to configure that ?
Elliott Minns
@elliottminns
Mar 05 2016 16:28
I mix and match it. Is this for blackfish or for an app running blackfish?
Pierre Abi-aad
@abiaad
Mar 05 2016 16:28
app running
Elliott Minns
@elliottminns
Mar 05 2016 16:29
I tend to work in vim usually
Pierre Abi-aad
@abiaad
Mar 05 2016 16:29
You create an xcproj with Blackfish as submodule ?
oh ok
Elliott Minns
@elliottminns
Mar 05 2016 16:29
You can use Xcode if you drag and drop the Xcode projects into another one
Pierre Abi-aad
@abiaad
Mar 05 2016 16:29
yes
I’ll do that
Elliott Minns
@elliottminns
Mar 05 2016 16:30
When the swift package manager supports Xcode it'll be easier
Pierre Abi-aad
@abiaad
Mar 05 2016 16:30
looking for some script to launch compile and running when saving a swift file
yes
Pierre Abi-aad
@abiaad
Mar 05 2016 16:41
a weird thing : I’m editing RequestParser.swift to fix an error
save it, compile it , run and test
but it seems I always have an old version. Like there are some cache
I see old print I removed
I have to remove .build and then compile it again
Elliott Minns
@elliottminns
Mar 05 2016 17:00
If you do swift build --clean=dist that should remove old symbols
Pierre Abi-aad
@abiaad
Mar 05 2016 17:01
hum seems to remove packages and cloning them again
Elliott Minns
@elliottminns
Mar 05 2016 17:02
Ahh yeah, if you do just swift build --clean
It'll remove build artifices
Pierre Abi-aad
@abiaad
Mar 05 2016 17:14
I did a pull request ;)
one thing after this fix
I can retrieve “official” header fileds (cache-control, user-agent etc ..) but cant’ get custom header field. E.g : I added a “apiKey” value. I can see my custom field with value in headers var. But in getHeader(“apiKey”) I get a nil value. I don’t know why yet. Investigating :)
Pierre Abi-aad
@abiaad
Mar 05 2016 17:25
oh never mind it works now
weird