Skip to content

Commit

Permalink
Merge branch 'release-3.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniogamiz committed Aug 26, 2019
2 parents 6b3312f + bebbb3c commit 478ebd5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@
"test-depends": [
"Test::META:ver<0.0.16>"
],
"version": "3.0.0"
"version": "3.0.1"
}
13 changes: 13 additions & 0 deletions docs/Type/Perl6/Documentable/Primary.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,17 @@ must follow the format:
=end code
=end pod

=begin pod :kind("type") :subkind("class") :category("exception")
=TITLE class X::Documentable::TypeNotFound
=SUBTITLE Missing type in type-graph file
X::Documentable::TypeNotFound is Exception {}
Attempt to create the typegraph representation of a missing type. To fix it, add that type
to the type-graph file you are using.
=end pod
8 changes: 5 additions & 3 deletions lib/Perl6/Documentable/CLI.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,15 @@ package Perl6::Documentable::CLI {
#| Check which pod files have changed and regenerate its HTML files.
multi MAIN (
"update",
Str :$topdir = "doc", #= Directory where the pod collection is stored
Str :$conf = "config.json" #= Configuration file
Str :$topdir = "doc", #= Directory where the pod collection is stored
Str :$conf = "config.json", #= Configuration file
Bool :v(:verbose($v)) = False, #= Prints progress information

) {
DEBUG("Checking for changes...");
my $now = now;

my $cache = Pod::To::Cached.new(:path(".cache-{$topdir}"), :verbose, :source($topdir));
my $cache = Pod::To::Cached.new(:path(".cache-{$topdir}"), :verbose($v), :source($topdir));
my @files = $cache.list-files(<Valid>);

if (! @files) {
Expand Down
10 changes: 9 additions & 1 deletion lib/Perl6/Documentable/DocPage/Primary.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ use URI::Escape;
use Pod::Utilities::Build;
use Perl6::Documentable;

class X::Documentable::TypeNotFound is Exception {
has $.type;
method message() {
"$.type entry not found in type-graph.txt file."
}
}

class Perl6::Documentable::DocPage::Primary::Language
does Perl6::Documentable::DocPage {

Expand Down Expand Up @@ -125,7 +132,8 @@ class Perl6::Documentable::DocPage::Primary::Type
#| Completes a type pod with inherited routines
method compose-type($registry, $doc) {

{return;} unless $registry.tg.types{$doc.name};
die X::Documentable::TypeNotFound.new(:type("$doc.name"))
unless $registry.tg.types{$doc.name};

$doc.pod.contents.append: self.typegraph-fragment($doc.name);

Expand Down

0 comments on commit 478ebd5

Please sign in to comment.