You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I solved it but am not happy with the .split(':ver') part
multi sub MAIN(Str :$add-dep, Str :$base-dir = '.', Str :$meta6-file-name = 'META6.json') {
my IO::Path $meta6-file = ($base-dir ~ '/' ~ $meta6-file-name).IO;
my $meta6 = read-meta6($meta6-file) or die RED "Failed to process ⟨$meta6-file⟩.";
sub simple-version(Str $s is copy) {
my ($n, $v) = $s.split(':ver');
with $v {
$v = Version.new($v) if $v;
$s = $n;
} else {
$v = Version.new(*);
}
$s but role :: { method version { $v } }
}
if my $stored-dep = ($meta6<depends>.grep: *.&simple-version eq $add-dep.&simple-version).first {
if $stored-dep.&simple-version.version > $add-dep.&simple-version.version {
note BOLD "Dependency to $add-dep younger then version already in META6.json.";
return
} else {
$meta6<depends> = ($meta6<depends>.grep: *.&simple-version !eq $add-dep.&simple-version).Array;
}
}
# (note BOLD "Dependency to $add-dep already in META6.json."; return) if $add-dep.&simple-version ∈ $meta6<depends>».&simple-version;
$meta6<depends>.push($add-dep);
dd $meta6<depends>;
exit 0;
$meta6-file.spurt($meta6.to-json);
}
depends may be a list, but it may also be a matrix of (build/test/runtime)/(requires/suggests/recommends) in the form of nested hashes. Individual entries may be strings or hashes with a "name" key and optionally additional information.
We are making progress on getting meta-version 1 as specified by S22 into the toolchain.
I am checking if a dep is already in a META6.json and with "Git::Config:ver<0.1.1>" that failed.
Module descriptors may need their own type that know how to sort by version
The text was updated successfully, but these errors were encountered: