Age | Commit message (Collapse) | Author |
|
|
|
I really could use those structured logs.
|
|
|
|
This makes scanning logs *much* easier. I figure keep it as simple as possible,
just red, yellow, and green.
I also added two spaces between labels in the log messages. It would be nice to
have a more structured logging system, but for now this works.
|
|
This argument will run the tests for an output after building. It's active in
'ci' so running that will ensure tests are passing. This way testing a
namespace and building a namespace are as close together as possible, so
presumably it will be that much easier to write good tests.
|
|
Also changes the --test option to a 'test' command. This is because running the
tests for a namespace/exe should never be combined with anything else: you
either want to run the tests, or not.
|
|
Wraps docopt rather nicely. It's much nicer than optparse-applicative and runs
tests with the --test argument automatically. Next I just need to implement a
test framework.
|
|
Now bild knows how to determine between modules that require ghcjs and ghc. It
also knows what *not* to build, meaning it won't try to build non-buildable nix
targets, for example (unfortunately this is just hardcoded for now), but it also
won't build scm or py targets that I haven't implemented yet. It just silently
fails, which is fine, because it means I can do `bild **/*` and everything just
works.
Of course, if I want to build scm code then I will have to implement that, but
that's not a priority right now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Move them under the Biz root so that we know they are specific to Biz stuff. Biz
is for proprietary stuff that we own.
I also had to refactor the bild namespace parsing code because it couldn't
handle a namespace with 3 parts. I really need to get that namespace library
written and tested.
|
|
|
|
|
|
|
|
Also had to capitalize some stuff, and move some nix files around and rename
the metadata directive from 'exe' to 'out' because that just makes more sense,
and fix some compiler errors. But now bild treats both nix and hs files as
buildable things. So that's cool.
One interesting example is Biz/Pie.{nix,hs} - I can either create a dev build of
the hs file with ghc, or I can create a fully-encapsulated nix build. Its nice
to have both options because a dev build with ghc takes half the amount of time,
and I can rely on my locally cached hi and ho files. I think this shows the
power of bild, but also can be a somewhat subtle thing.
The issue really is with the separate command calls in nix builds vs dev builds.
I figure there are a few ways to fix this:
1. Try to use bild inside the nix rules. That could be interesting, but could
also lead to some weird behavior or worm holes forming.
2. Extract the command line invocation into a separate file, some kind of
really simple template that gets pulled into both programs.
It is important to consider that in the future I might want to have bild do a
module-by-module nix build of programs, but I'm not sure how that would effect
my choice here.
|
|
This should make it easier to add nix builds, which is the next task. I
need to move some files and nix code around so that I have e.g.
Que/Prod.nix as the actual full 'build.os' expression.
|
|
|
|
|
|
Closes https://github.com/bsima/biz/issues/9
|
|
|