Fire is step THREE! | github.com/perl6/toolchain-bikeshed | Channel logs: irclog.perlgeek.de/perl6-toolchain/today | useful prior art: metacpan.org/pod/CPAN::Meta::Spec
Set by moderator on 18 July 2016.
ugexe that gist can probably be whittled down to a role that just contains its .content though and applied to a Distribution::Hash 00:59
01:49 ilbot3 joined
moderator Fire is step THREE! | github.com/perl6/toolchain-bikeshed | Channel logs: irclog.perlgeek.de/perl6-toolchain/today | useful prior art: metacpan.org/pod/CPAN::Meta::Spec
ugexe github.com/rakudo/rakudo/blob/nom/...ion.pm#L13 # This is really hurting 03:25
m: role Bar { method meta {1}; method content {1}; }; class Foo does Bar { }; my $foo = Foo.new but Distribution; $foo.meta
camelia rakudo-moar 18455a: OUTPUT«Method 'meta' must be implemented by Foo+{Distribution} because it is required by role Distribution␤ in block <unit> at <tmp> line 1␤␤»
ugexe thats really bad 03:32
have to apply a anonymous role on top of that and explicitly call the 3rd candidate 03:36
CURI.install( (($dist but Distribution) but role :: { method meta { my $call := self.WALK(:name<meta>)[2]; self.$call }; method content(|c) { my $call := self.WALK(:name<content>)[2]; self.$call(|c) } }), :$force) 04:15
06:12 domidumont joined
nine ugexe: with just the lib/Inline/Perl5.pm6 as $content-id, my content method now has to guess if this is a source file or resource. It's never good when software has to guess :/ 06:13
06:17 domidumont joined 06:49 domidumont joined
ugexe it doesn't have to guess, because resources should be listed under the `resources` field in the meta 14:07
and because CURI controls where it gets install location it already has to make that same guess 14:08
nine But .content doesn't get any info about where to look. I cannot know if lib/Inline/Perl5.pm6 is a source or resource 14:09
ugexe .content knows it can call self.meta
nine And then has to iterate over provides to see if any entry matches. And if not do the same for resources
That's what I mean with "guess" 14:10
ugexe thats not a big deal, Distribution doesn't need to be some super quick lookup table
otherwise you can just do this github.com/ugexe/Perl6-CompUnit--R...m6#L13-L14 14:11
nine .content as specified in S22 doesn't have that problem and resolves any ambiguity between source and resource files and is not exactly harder to use 14:13
ugexe resources as is does not follow s22 at all
everything in the resources hash as-is has to be located in resources/ anyway 14:14
there is no lib/Inline/Perl5.pm6 that is a resource because it would be resources/lib/Inline/Perl5.pm6
what I implemented is a hyrid of s22 and ipfs 14:16
i implemented the s22 way originally but it didnt make sense to use it with the way resources was implemented 14:20
if, for some reason, someone doesn't want to list a resource in resources they can simply set %files themselves and prefix `resources/` to the name-path and point that at the real path 14:29
$.meta<files>{'resources
$.meta<files>{'resources/' ~ 'lib/Whatever.pm6'} => 'lib/Whatever.pm6' 14:30
gist.github.com/ugexe/1026b2730abe...st-pl6-L85 # Here is s22 style implementation of content which I only point out to note that i've explored that idea and didnt just brush it off 14:39
14:41 ribasushi joined 16:32 domidumont joined 16:41 FROGGS joined 19:13 FROGGS joined 23:18 stmuk_ joined