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 26 March 2017.
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
05:27 domidumont joined 06:14 domidumont joined
llfourn can you get your META6.json from your module like you can get your resources? 08:42
10:51 llfourn joined
nine Not as easily. 12:07
You can use $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name<Test>)).distribution.meta 12:08
12:47 perlpilot joined
llfourn nine: cheers that'll do. 13:31
nine: I think a multi candidate for $*REPO methods that just take simple args. Like $*REPO.need(:short-name<Test>), would be nice. 13:34
nine But need() takes: CompUnit::DependencySpecification $spec, CompUnit::PrecompilationRepository $precomp = self.precomp-repository(), CompUnit::PrecompilationStore :@precomp-stores = Array[CompUnit::PrecompilationStore].new($precomp.store) 13:38
llfourn takes a look at src 13:39
I think you could have a multi that just slurped *%args that weren't taken and did self.need(CompUnit::DependencySpecification.new(|%args),|@_,:@precomp-stores) 13:43
nine Much complexity just to save some typing for a very rarely needed operation 13:48
llfourn I suppose. Though every cli tool I have I would like to spit out the version in the USAGE. The best place to get it is the META6.json. It would be nice not to have to type all that to get it. 13:50
ugexe originally there was supposed to be a %?META 14:04
also note that `$*REPO.need(CompUnit::DependencySpecification.new(:short-name($name))).distribution.meta<version>;` won't work for ::FileSystem 14:11
llfourn ugexe: oh? how come? 14:12
ugexe because it doesn't set .distribution in its CompUnit
the problem there being that ::FileSystem is sort 2 repos in one... because it'll use your META6.json if you -I. but not if you -Ilib 14:13
e.g. ::FileSystem should probably handle META6.json only, and ::AbsolutePath should be changed to handle the alternative 14:14
llfourn ugexe: I seem to get .distribution.meta using -Ilib 14:15
but it doesn't have <version> in the hash...
ugexe try ver
llfourn oh no it gives me: {auth => perl, files => {}, name => CORE, provides => {CompUnit::Repository::Staging 14:16
looks like it gives me the wrong one lol
ugexe oh, right. it invents a META6.json on the fly
llfourn oh no im an idiot
I just copied nine's code without changing it. RIP.
ok it gives me: Type check failed in binding to '$repo-id'; expected Str but got Nil (Nil) 14:17
ugexe yeah me too, it doesnt create one on the fly. it used to
llfourn (but that was because I don't have a module with the same name as my distribution) 14:18
a compunit rather 14:19
if I do it with a compunit name that exists I get: Legacy Distribution object used in code expecting an object consuming the Distribution role
ugexe heh 14:21
whats the full ll-exception? 14:22
I wonder where its calling Distribution.new at...
llfourn it only calls it when I do .meta
ugexe yeah, but it has to create the legacy distribution object somewhere 14:23
that error is a side-effect of when we switched to Distribution as a role instead of a class - its a workaround to maintain backwards compat 14:24
llfourn from SETTING::src/core/control.pm:178 (/Users/llfourn/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:die)
from SETTING::src/core/control.pm:166 (/Users/llfourn/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:die)
from SETTING::src/core/Distribution.pm:13 (/Users/llfourn/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:meta)
ugexe go another few lines?
llfourn oops first line was:
at SETTING::src/core/Exception.pm:63 (/Users/llfourn/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:throw) 14:25
ugexe Want to see *where* Distribution.new was called
er it probably doesn't track that
llfourn from gen/moar/Metamodel.nqp:1733 (/Users/llfourn/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Metamodel.moarvm:)
llfourn figures out where that is to be useful
ugexe I guess I could try it myself too lol
hmm I get the expected `Could not find ZefX at line 0 in: 14:26
thats installed though and not in a lib/... 14:27
yeah I get the error you got when I mv lib/Zef.pm6 lib/ZefX.pm6 14:28
llfourn $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name<Spit::Compile>)).distribution.meta<ver> 14:32
that works when it's installed :)
ugexe yeah it works when things are installed
to a CURI 14:33
just not for other CURs
also for CURI you can just call .version on the CU 14:34
still dont understand where that Legacy Distribution error is getting invoked from tho 14:35
git grep "Distribution\\.new" didnt reveal anything
llfourn ugexe: but it doesn't need to call new just .meta 14:38
which can be called on the type object
ugexe ah, so its setting `:distribution(Distribution)` then you think? 14:39
llfourn yeah something like that 14:40
I'm off for sleeps. Thanks for the help nine++ and ugexe++.
17:49 domidumont joined 19:39 ugexe joined 23:53 nbrown joined