Basically it was a release that not really contained any shiny new features nor bug fixes. It was a release that addressed things we did wrong in our test cases. Tests especially matter whenever you want to install a module, so you could say that this version was just released to allow an installation of Bailador without running into errors.
Right after the previous release Gabor came along with a bug report saying Bailador raises an error during installation. The error itself happened in the test case 20-cli.t which can be considered as our first try to do some integration testing. Personally I think this is one of the test cases that didn't see much love, is not a pleasure to read, maybe because it is quite full of code and diags which are commented out. So let me point out a few things it does:
bin/bailador
without any parameters to check for its usage.bin/baildor new --name=App-Name
that should create your app with some skeleton files.prove6 -l App-Name/t
.Well, with the code itself? Nothing! Maybe it is also worth pointing out the fact that Bailador's travis-ci was green, so our test worked for us. The differences of the premises for the failing test comparing the bug report to our test scenario was the command zef install Bailador
. Whereas our test case at travis did a zef install --deps-only .
. After a while I realized that zef itself is quite smart because if you install some::module with zef install some::module
it is most likely that some::module
has some::dependencies
and even::more::dependencies
. What if some::module can not be installed? Right. The dependencies don't get installed on your system. But this means that when zef runs the test for some::module
they need to have access to the dependencies. Zef manages this through setting the PERL6LIB
environment variable. So that was missing in your test code! After changing this behaviour most of the tests passed except for one, because I was not able to get the prove6
test case up and running.
In the meantime pharv joined our slack channel and sent a PR to use docker in our travis-ci setup. This reduced the test time from 27min to 7min. Yay! The image that we use is rakudo-star
and the commands we're running in the .travis.yml are now:
docker run -d -e 'AUTHOR_TESTING=1' --volume=$(pwd):/srv --name bailador-test bailador/bailador /bin/sleep infinity
docker exec -it bailador-test zef --verbose install .
docker exec -it bailador-test prove6 -v xt
docker stop bailador-test
docker rm bailador-test
Maybe it is a bit unconventional not to include the source within the Dockerfile ( COPY . /srv
). Instead I am using a volume when I start the container. The benefit is that I use basically the same commands to test Bailador on my local box:
$ cat .zshrc
...
function bailador-test() {
cd /home/martin/.workspace/p6/Bailador
docker rm bailador-test-container
docker rmi bailador-test
docker build -t bailador-test .
docker run -d -e 'AUTHOR_TESTING=1' --volume=$(pwd):/srv --name bailador-test-container bailador-test /bin/sleep infinity
docker exec -it bailador-test-container zef --verbose install .
docker exec -it bailador-test-container prove6 -v xt
docker stop bailador-test-container
}
and whenever something is failing I still have the same container up and running. I can fix the files with my editor on my local box and the changes are reflected in the docker container as well and I can redo whatever step was failing.
]]>In the time while I was thinking about what I should write about Bailador a new Github Issue was created. So I changed my mind...
Actually I just wanted to let you all know that I've released version 0.0.8 of Bailador today. I wanted to show you the Changelog and maybe I wanted to explain a few bits. I could've talked about Github Issue #169, because it appeared to be more work as I thought at first glance. I realized that some parts of the code in Bailador::App and Bailador::Route could be better and during refactoring I stumbled over https://rt.perl.org/Public/Bug/Display.html?id=131707. After all I am hoping that I have left the code in a better state and the behaviour of Bailador is now more reasonable and consistent.
Now I am writing something else.
I rather want to confess that there are probably still some more bugs in code, that there are probably more things that you want to do with Bailador which are still not possible. But I also want to ask you to participate. Help us with our code, send Pull Requests to improve bailador.net, let us know what you want to do, ask us if you don't know something, let us make your wishes come true and maybe join us on slack.
]]>