From a6df35af678ea83647039b336a9e332f9c612838 Mon Sep 17 00:00:00 2001 From: Nick Logan Date: Thu, 12 Jul 2018 17:39:23 -0400 Subject: [PATCH] Revert "Include source file name in module-not-found error message." --- src/Perl6/World.nqp | 3 +-- src/core/CompUnit/DependencySpecification.pm6 | 1 - src/core/Exception.pm6 | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp index 22e906fd067..d82cf472bda 100644 --- a/src/Perl6/World.nqp +++ b/src/Perl6/World.nqp @@ -1266,8 +1266,7 @@ class Perl6::World is HLL::World { :auth-matcher(%opts // $true), :api-matcher(%opts // $true), :version-matcher(%opts // $true), - :source-line-number($line), - :source-file-name(self.current_file) + :source-line-number($line) ); self.add_object($spec); my $registry := self.find_symbol(['CompUnit', 'RepositoryRegistry'], :setting-only); diff --git a/src/core/CompUnit/DependencySpecification.pm6 b/src/core/CompUnit/DependencySpecification.pm6 index 2ffda670e5b..00fa9c3b40a 100644 --- a/src/core/CompUnit/DependencySpecification.pm6 +++ b/src/core/CompUnit/DependencySpecification.pm6 @@ -1,7 +1,6 @@ class CompUnit::DependencySpecification { has str $.short-name is required; has int $.source-line-number = 0; - has str $.source-file-name = ''; has str $.from = 'Perl6'; has $.version-matcher = True; has $.auth-matcher = True; diff --git a/src/core/Exception.pm6 b/src/core/Exception.pm6 index 1cca59d5d9f..2c64f12ae50 100644 --- a/src/core/Exception.pm6 +++ b/src/core/Exception.pm6 @@ -2966,10 +2966,9 @@ my class X::CompUnit::UnsatisfiedDependency is Exception { method message() { my $name = $.specification.short-name; my $line = $.specification.source-line-number; - my $file = $.specification.source-file-name; is-core($name) ?? "{$name} is a builtin type, not an external module" - !! "Could not find $.specification at $file:$line in:\n" + !! "Could not find $.specification at line $line in:\n" ~ $*REPO.repo-chain.map(*.Str).join("\n").indent(4) ~ ($.specification ~~ / $=.+ '::from' $ / ?? "\n\nIf you meant to use the :from adverb, use"