Skip to content

Commit

Permalink
Only break cache for non-META6.json dists
Browse files Browse the repository at this point in the history
See: #2641
  • Loading branch information
ugexe committed Jan 27, 2019
1 parent 74ccb4c commit 67cf829
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/CompUnit/Repository/FileSystem.pm6
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ class CompUnit::Repository::FileSystem does CompUnit::Repository::Locally does C
unless ($distribution.meta<provides> && $distribution.meta<provides>{$spec.short-name}) unless ($distribution.meta<provides> && $distribution.meta<provides>{$spec.short-name})
or ($distribution.meta<files> && $distribution.meta<files>{$spec.short-name}) or ($distribution.meta<files> && $distribution.meta<files>{$spec.short-name})
{ {
# Only break the cache if there is no inclusion authority (i.e. META6.json)
return Empty if $!prefix.child('META6.json').e;

# Break the !distribution cache if we failed to find a match using the cached distribution # Break the !distribution cache if we failed to find a match using the cached distribution
# but still found an existing file that matches the $spec.short-name # but still found an existing file that matches the $spec.short-name
return Empty unless @extensions.map({ $!prefix.add($spec.short-name.subst(:g, "::", $*SPEC.dir-sep) ~ ".$_") }).first(*.f); return Empty unless @extensions.map({ $!prefix.add($spec.short-name.subst(:g, "::", $*SPEC.dir-sep) ~ ".$_") }).first(*.f);
Expand Down

0 comments on commit 67cf829

Please sign in to comment.