[build2] (no subject)

Robin Moussu robin.moussu at gmail.com
Wed Apr 11 23:10:12 UTC 2018


Hello,

TL; DR at the end of this mail

I discovered build2 on reddit.com/r/cpp, thanks to the multiple
presentations that were done there. I wanted to give it a try. While doing
the installation I watched the conferences of Boris Kolpackov and I must
admit I was really impressed. I assume that I'm talking to him for the rest
of this mail, since he seems to be the main developer of build2.

I think I should report some of the issues I encountered when trying build2
for the first time, because I think it's stupid to make potential users
leave due to a bad first experience.

My use-case was: I wanted to create a new project from scratch, initially
without any dependency, in a single main.cpp file. Dependencies and
modularization (multiples .hpp and .cpp) will come later. I am already
experienced with c++. I was expecting and extremely easy set-up.While
watching your conferences on youtube, it looked very easy and
straightforward. However when trying to do it on my computer it was much
harder than expected. Let me explain.

Installing build2 from source was easy. However when I tried to search how
to do an "hello word" in the documentation, it was much harder than
expected.

If you look at https://build2.org/, their is a nice example of bpkg. But
from what I understood of your conferences, I'm not going to use `bpkg`,
but `b` directly. At the bottom of the pag, their is a link to
https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml with
once again a nice use example of bpkg. I like them because if someone need
to use my project (build with the build2 build system), it should be easy
to understand how to build it.

So I manually search the build system manual (https://build2.org/build2/
doc/build2-build-system-manual.xhtml) – and BTW, you should add a link on
all pages to the home of your website to make the navigation much easier.

I didn't found any references to `b create` in the manual, and I think it's
missing. Furthermore, the content of the generated text file are not ideal.
Some minimal examples and default value (maybe commented) should be put in
them. I come back to this point in a minute. Anyway, I tried `b init` (like
`git init`) without success (I think you should add an alias), then tried
`b create`.

Then I tried created `main.cpp` at the root of my new directory, next to
`buildfile`.
```
$ b
info: dir{./} is up to date
```
This was **extremely** disturbing. Hopefully I saw the conferences, and I
remembered that you presented how to do it (
https://www.youtube.com/watch?v=hHRaZy1LZPA – CppCon 2016: Boris Kolpackov
“Using build2, C++ Build Toolchain" at 32:00 to be exact). Then I literally
copy pasted every command to understand why my file was not compiled.

It turned out I didn't wrote:
```buildfile
exe{main}: {cxx hxx}{**}
```
``` root.build
using cxx
hxx{*}: extension = hpp
cxx{*}: extension = cpp
```
As you said multiple time in your conferences, you don't want to write
magic incantations, but to be honest, and even if their isn't a lot of
them, they look like magic incantations if you don't have a proper
tutorial. After 2 hours it start to become evident, be you should document
them.

Then I did some tests, and wanted to move the destination directory of my
binary to `bin`. No big deal, I quickly understood that I had to write
`exe{bin/hello}: {cxx hxx}{**}`. However I forgot to create the `bin`
directory. `b` got a coredump. No big deal, it's still an early project,
and it's a nice opportunity to create a bug-report, take contact with the
team, and maybe write a patch. But first I would like to check with the
latest source of `b` if the issue still exist. So I downloaded the source.
Unfortunately, I can't use my current version of `b`, since it require the
version 0.7 or later. Once again, it's fine, it's not the definitive
version of build2. However, I don't understand why libpkgconf and libbutl
aren't submodules. It would make the installation process from source much
easier imho.


-------------------------------------------------------------------

TL; DR:

I wanted to try build2, but it was more complicated than expected. I would
like that this project succeed, hence this mail, and I kindly suggest the
following items:

- On any page of https://build2.org, add a link to the homepage to make the
navigation easier
- Maybe add a link to
https://build2.org/build2/doc/build2-build-system-manual.xhtml in the
homepage or in the toolchain introduction

- In the preface of
https://build2.org/build2/doc/build2-build-system-manual.xhtml, describe
exactly the commands used in https://www.youtube.com/watch?v=hHRaZy1LZPA at
32:00 (CppCon 2016: Boris Kolpackov “Using build2, C++ Build Toolchain")
- Ideally, `b create` should generate them, so you would just have to write
`mkdir hello && cd hello && b create && edit hello.cpp && b` in the preface.
- Add and alias `init` to `create` for `b` (just like git)

- Add libpkgconf, and libbutl as submodules of build2.

Thanks for your time.
Most of those items are really easy to fix, but should make a much better
experience for new users. I wish you a lot of new users.

Sincerely,
Robin.

-- 
Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20180412/2efbfeda/attachment.html>


More information about the users mailing list