Skip to content

Commit

Permalink
Merge pull request #2660 from ugexe/path-spec-in-error
Browse files Browse the repository at this point in the history
Use path-spec instead of path for module-not-found errors
  • Loading branch information
niner committed Jan 30, 2019
2 parents c2e272e + f770426 commit 82fde76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/CompUnit/Repository.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ role CompUnit::Repository {
self.next-repo
?? self.next-repo.load($file)
!! nqp::die("Could not find $file in:\n"
~ $*REPO.repo-chain.map(*.Str).join("\n").indent(4));
~ $*REPO.repo-chain.map(*.path-spec).join("\n").indent(4));
}

# Returns the CompUnit objects describing all of the compilation
Expand Down
2 changes: 1 addition & 1 deletion src/core/CompUnit/Repository/AbsolutePath.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CompUnit::Repository::AbsolutePath does CompUnit::Repository {
}

return self.next-repo.load($file) if self.next-repo;
die("Could not find $file in:\n" ~ $*REPO.repo-chain.map(*.Str).join("\n").indent(4));
die("Could not find $file in:\n" ~ $*REPO.repo-chain.map(*.path-spec).join("\n").indent(4));
}

method loaded(--> Iterable:D) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Exception.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ my class X::CompUnit::UnsatisfiedDependency is Exception {
is-core($name)
?? "{$name} is a builtin type, not an external module"
!! "Could not find $.specification at line $line in:\n"
~ $*REPO.repo-chain.map(*.Str).join("\n").indent(4)
~ $*REPO.repo-chain.map(*.path-spec).join("\n").indent(4)
~ ($.specification ~~ / $<name>=.+ '::from' $ /
?? "\n\nIf you meant to use the :from adverb, use"
~ " a single colon for it: $<name>:from<...>\n"
Expand Down

0 comments on commit 82fde76

Please sign in to comment.