cfe44351

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

Skip a build directory by its whole name, not by a prefix of it

The discovery walk skipped any 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.

The two build directories it still skips are compared as whole names now, and
so is anything hidden. "result" is not named at all: it is a symlink to a build
output, which the walk follows like any other directory and which holds no cabal
file to find. Refusing to follow a symlink would have been the same silent loss
in a different guise, because a repository that links a package in has one to
find there.

The predicate is top-level and exported, where the walk had it in a where clause
with no signature and no test. It 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 what was being dropped.

The fixture 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 0s 1s 1s 1s 0s
Eval 1s 9s 9s 10s 0s
Build 9s 0s 0s 9s 0s
Suite 0s 10s 10s 10s 0s

Timeline

0s10s