diff --git a/lib/Zef/Install.rakumod b/lib/Zef/Install.rakumod index 6dbd3bc7..0dcff3f1 100644 --- a/lib/Zef/Install.rakumod +++ b/lib/Zef/Install.rakumod @@ -51,7 +51,7 @@ class Zef::Install does Installer does Pluggable { =head2 method install - method install(Candidate $candi, CompUnit::Repository :$cur!, Bool :$force, Bool :$precompile, Supplier :$logger, Int :$timeout --> Bool:D) + method install(Candidate $candi, CompUnit::Repository :$cur!, Bool :$force, Bool :$precompile = True, Supplier :$logger, Int :$timeout --> Bool:D) Installs the distribution C<$candi.dist> to C<$cur> (see synopsis). Set C<$force> to C to allow installing a distribution that is already installed. If C<$precompile> is C then it will not precompile during installation. @@ -84,7 +84,7 @@ class Zef::Install does Installer does Pluggable { #| Install the distribution in $candi.dist to the $cur CompUnit::Repository. #| Use :force to install over an existing distribution using the same name/auth/ver/api - method install(Candidate $candi, CompUnit::Repository :$cur!, Bool :$force, Bool :$precompile, Supplier :$logger, Int :$timeout --> Bool:D) { + method install(Candidate $candi, CompUnit::Repository :$cur!, Bool :$force, Bool :$precompile = True, Supplier :$logger, Int :$timeout --> Bool:D) { my $dist = $candi.dist; my $installer = self!install-matcher($dist).first(*.so); die "No installing backend available" unless ?$installer; @@ -97,7 +97,7 @@ class Zef::Install does Installer does Pluggable { $stderr.Supply.grep(*.defined).act: -> $err { $logger.emit({ level => ERROR, stage => INSTALL, phase => LIVE, candi => $candi, message => $err }) } } - my $todo = start { $installer.install($dist, :$cur, :$force, :$stdout, :$stderr) }; + my $todo = start { $installer.install($dist, :$cur, :$force, :$precompile, :$stdout, :$stderr) }; my $time-up = ($timeout ?? Promise.in($timeout) !! Promise.new); await Promise.anyof: $todo, $time-up; $logger.emit({ level => DEBUG, stage => INSTALL, phase => LIVE, candi => $candi, message => "Installing {$dist.path} timed out" }) diff --git a/lib/Zef/Service/InstallRakuDistribution.rakumod b/lib/Zef/Service/InstallRakuDistribution.rakumod index 899003e4..bc0e0ac3 100644 --- a/lib/Zef/Service/InstallRakuDistribution.rakumod +++ b/lib/Zef/Service/InstallRakuDistribution.rakumod @@ -59,7 +59,7 @@ class Zef::Service::InstallRakuDistribution does Installer { =head2 method install - method install(Distribution $dist, CompUnit::Repository :$cur, Bool :$force, Bool :$precompile, Supplier $stdout, Supplier :$stderr --> Bool:D) + method install(Distribution $dist, CompUnit::Repository :$cur, Bool :$force, Bool :$precompile = True, Supplier $stdout, Supplier :$stderr --> Bool:D) Install the distribution C<$dist> to the CompUnit::Repository C<$cur>. If C<$force> is C then it will allow reinstalling an already installed distribution. If C<$precompile> is C @@ -79,7 +79,7 @@ class Zef::Service::InstallRakuDistribution does Installer { #| Install the distribution in $candi.dist to the $cur CompUnit::Repository. #| Use :force to install over an existing distribution using the same name/auth/ver/api - method install(Distribution $dist, CompUnit::Repository :$cur, Bool :$force, Bool :$precompile, Supplier :$stdout, Supplier :$stderr --> Bool:D) { + method install(Distribution $dist, CompUnit::Repository :$cur, Bool :$force, Bool :$precompile = True, Supplier :$stdout, Supplier :$stderr --> Bool:D) { $cur.install($dist, :$precompile, :$force); return True; }