Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Zef/Install.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -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<True> to allow installing a distribution
that is already installed. If C<$precompile> is C<False> then it will not precompile during installation.
Expand Down Expand Up @@ -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;
Expand All @@ -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" })
Expand Down
4 changes: 2 additions & 2 deletions lib/Zef/Service/InstallRakuDistribution.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -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<True>
then it will allow reinstalling an already installed distribution. If C<$precompile> is C<False>
Expand All @@ -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;
}
Expand Down
Loading