81a31368

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Ask what a directory is, not what it is called

The discovery walk skipped a directory whose name started with "result",
meaning to skip a nix build output. It also skipped one called "results", and
every package under it went missing from discovery with nothing reported: a
walk that finds no cabal file and a walk that refused to look are the same
answer to a caller.

A nix build output is a symlink into the store, so that is what is asked now.
It covers result, result-1, result-doc and anything else linked in from
elsewhere, and it is the question worth asking anyway: what is on the far side
of a symlink is not this repository's, and following one is how a walk here
reports another repository's packages as this one's.

The two build directories are still skipped by name, because they are real
directories, and so is anything hidden. Those are compared as whole names.

Both predicates are top-level and exported now, where the walk had them in a
where clause with no signature and no test. skippedByName is pure, so the
prefix case is a unit test rather than a walk over a fixture, and there is a
fixture too: a package two levels under a directory called results, which is
the case that was silently dropped.

The test resource needed a line in .gitignore. The global ignore file has
result*, which hides a directory called results the same way this walk did.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 38s 4s 4s 43s 38s
Eval 44s 10s 10s 54s 1s
Build 54s 0s 0s 54s 0s
Suite 38s 14s 16s 54s 40s

Timeline

0s40s50s