Subject: | PruneCruft has ambiguous 'except' handling leading to files being included from build-dir |
If PruneCruft has an except rule like so
[PruneCruft]
except= \.foo$
once Dist-Name-* is populated the first time, the structure looks like so:
baz/bar/.foo
Dist-Name-Version/baz/bar/.foo
and subsequent calls to build result in
baz/bar/.foo
Dist-Name-Version/baz/bar/.foo
Dist-Name-Version/Dist-Name-Version/baz/bar/.foo
This makes sense when you understand how it works internally, but its unintuitive.
[PruneCruft]
except= \.foo$
once Dist-Name-* is populated the first time, the structure looks like so:
baz/bar/.foo
Dist-Name-Version/baz/bar/.foo
and subsequent calls to build result in
baz/bar/.foo
Dist-Name-Version/baz/bar/.foo
Dist-Name-Version/Dist-Name-Version/baz/bar/.foo
This makes sense when you understand how it works internally, but its unintuitive.
return 0 if $self->_dont_exclude_file($file); return 1 if index($file->name, $self->zilla->name . '-') == 0; So, the rule to include it overwrites the rule to exclude it. Thats fine, but I'm not thinking about stuff in Dist-Name-Version, the first time I call build it doesn't even exist. return 1 if index($file->name, $self->zilla->name . '-') == 0; return 0 if $self->_dont_exclude_file($file); is more what I expected. This quirk should probably be documented, or perhaps changed. I'm contemplating a PruneCruft::BuildDir which is uninterruptable by prunecruft exclusion rules.