Closed rowanG077 closed 6 days ago
I know that motivated this PR :)
You're basically our chef Nix; do you have the time to see why our nix-build
CI job doesn't seem to run for clash-cores:doctests
even though it runs for, for instance, clash-prelude:doctests
? I'm just testing locally on an Ubuntu machine, invoking nix-build
, but that's what I'm seeing if I deliberately introduce failing tests.
nix-build builds clash-ghc
which means clash-cores is not in the dependency chain. So clash-cores doesn't get build at all, See:
But it is for nix-shell since the dev shell explicitly brings the inputs from clash-testsuite
into scope which includes clash-cores:
Thanks! We'll need to decide whether that is the behaviour we are looking for.
What would be the deciding factor for me is: would building and testing under Nix have a fair chance of finding mistakes that would not be found by the tests we do with Cabal? If yes, let's test more under Nix. Otherwise, it might not be a good ratio between CPU time for the test and the odds of it finding actual issues.
I''m happy with nix build. You can specify the target you want to build explicitly if you want. nix build .#clash-cores
for example will build clash-cores. It's just that we currently only build the default package which is set as clash-ghc.
For the shell I'm less happy. It requires the build of allmost packages inside the repo which takes ages. It makes little sense that if I want to develop the prelude I need to first compile prelude before I get into the shell for example. Ideally I would want it to just build the dependencies. And you can then build any of the packages in clash-compiler inside the shell.
I''m happy with nix build. You can specify the target you want to build explicitly if you want.
nix build .#clash-cores
for example will build clash-cores. It's just that we currently only build the default package which is set as clash-ghc.
It sounds like you're reasoning about local usage, whereas I'm reasoning purely about CI. I'm just wondering: what behaviour do we want in CI? I can't "specify the target" in CI, it just runs what it runs and that's it.
We just ran into this,
clash-cores:doctests
did not work with multiple hidden, which we tripped over innix-shell
.We should add
clash-cores:doctests
to CI (using Cabal).And I wonder why the
nix-build
CI job runs, to name one,clash-prelude:unittests
, but notclash-cores:doctests
.