Biicode

Posted by on Mar 29, 2015 in c++, cmake, tools | 3 Comments
Biicode

I have been meaning to try biicode for a while now.

I have heard about it in blog posts, in podcasts, and I have been looking for a tool like that.

I have finally taken the time to try it, and have published my very first block. Go check it out!

Oh, what’s a block? A block is what biicode calls to a piece of code you make available for others to reuse. I am used to spliting the software I write into fully independent pieces anyway, since it helps me reuse them later on. Now all I have to do is publish them to be able to use them in my other projects. For now biicode only supports public blocks, so this means I am also sharing them with anyone who wants to use them. I believe they are planning on following github’s example and charging users for private repositores (or blocks in their case).

My first block is a simple library to load csv files with Magic the Gathering collections exported from the deckbox website.

It is licensed under the Boost Software License, and is available in github and in biicode.

Since I am using boost I have followed their instructions for using boost with biicode, and I have to say I am impressed.

It worked like a charm. My single complaint about it is that I got some warning messages about unresolved dependencies.

When I ran the bii find command I got presented with this:

INFO: Processing changes...
INFO: Finding missing dependencies in server
INFO: Looking for boost/spirit...
WARN: Can't find block candidate for: boost/spirit
INFO: Looking for boost/fusion...
WARN: Can't find block candidate for: boost/fusion
INFO: Analyzing compatibility for found dependencies...

It seems they have not yet fully mapped all the boost includes into the boost biicode block. Or maybe the message is just for header only boost sub libraries? I know I am being nitpicky here, but I hate warning messages (I know I’m not alone).

These unresolved dependencies are also visible in the web page representing my block (just click “Block Dependencies”).

Overall I am very impressed with biicode and highly recommend anyone who is tired of messing with dependencies manually to try it out.

Seeing biicode detect the dependencies from just the includes in my source files, downloading, configuring, compiling them and then handling all of the Cmakefile.txt generation and compiling my sources and linking the result with the dependencies it detected is a great experience (I was half expecting it to fail midway and ask me to do something manually).

I have also tried out CLion (but I will leave that for another post). Both CLion and biicode use CMake as a foundation. They work very well together (and work is being done to make sure they do).

A word of advise: if you are experimenting with biicode and plan on trying CLion on that project, make sure you specify the CLion layout when you initialize your biicode project.

bii init -l clion prj_name

This will not harm your command line interactions with biicode and will ensure CLion will fully understand it.

 

If you use my block, please let me know. Happy biicoding!

 

3 Comments

  1. drodri
    March 30, 2015

    Thanks for sharing! It worked like a charm in Win with MinGW4.8, but didnt in VS12, does deckbox loader works with VS?
    Just another thing, I had to manually add your block to [requirements] because it is published as DEV, and DEV versions are only “find-able” by their developers (the find policies can be also changed, too). When it is reported to work in your desired platforms, you can freeze it and make it findable with $ bii publish –tag=STABLE

    Reply
  2. Manu343726
    March 30, 2015

    I’m glad you like biicode! We are working hard to stop relying on the clipboard when writing C and C++.

    About Boost warnings, it’s a known issue. The problem is that the deps finding system was designed to take care of in-block sources only. But when we started to work on huge libraries as Boost we started to write hook-based blocks instead of hosting the whole library on biicode cloud. You experienced it, this approach works like a charm, but the bii is still not able to figure out where the Boost libs are (Actually ~/.biicode/boost/[BOOST VERSION]) since these don’t really belong to the biicode/boost block.

    Note the boost hooks are OSS. One of the first things I submitted as an issue were that warnings. I feel them annoying too. https://github.com/biicode/boost

    Reply
  3. Rui Pires
    March 30, 2015

    I spend most of my time in either Linux or OS X. I also have to take a deep look at Visual Studio community edition, so I’ll see if it works there.
    I don’t expect any problems, but you never really know until you actually try.
    Thank you for the heads up about the DEV tag. It is reasonably functional, so I will change it to STABLE soon.

    Reply

Leave a Reply