|
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 14 January 2016. |
|||
|
02:48
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 | Where is the code for -I and -M at? -M cant find a module when using its identity while `use` can | 05:23 | |
|
07:10
domidumont joined
07:17
domidumont joined
|
|||
| nine | -I is in src/core/CompUnit/RepositoryRegistry.pm setup_repositories. I don't think I've come across the code for -M | 07:56 | |
|
09:03
FROGGS joined
09:41
leont joined
12:09
FROGGS joined
|
|||
| ugexe | I found -M here: github.com/rakudo/rakudo/blob/nom/...d.nqp#L386 | 16:15 | |
| do you think it would be as simple as moving it to here? github.com/rakudo/rakudo/blob/nom/...try.pm#L58 | |||
| ah parse-*-specs is not for identity specs, nevermind | 16:32 | ||
| nine | Looking at do_pragma_or_load_module I fear it's a bit more involved | 16:41 | |
| Nevertheless it's something we should figure out soon. We need exactly the same parsing for dependencies in META files. | 16:42 | ||
| ugexe | it looks like by passing the third argument "$longname" do_pragma_or_load_module uses the name as is, whereas without it it tries to parse the identity according to the Grammar. this would mean that the first argument needs to be a hash in the same hash structure as sym<use> generates (and removing the 3rd argument) | 16:43 | |
| fwiw zef parses identity strings in dependencies | 16:44 | ||
| nine | Looking at the code and trying to figure out a valid value that breaks the parser is kinda fun ;) | 16:47 | |
| The hard part is not the parsing. It's the decision of what we're gonna allow. Because right now, you can put any valid Perl 6 expression into a :ver(* > 6) # which is a breaking example btw. | 16:48 | ||
| Though really a working one even if the syntax is valid | |||
| ugexe | something i notice is File::Temp can produce a possible broken Distribution.id/Str with `:auth<Jonathan Scott Duff <duff@pobox.com>>` | 16:49 | |
| due to falling back to the author field | |||
| nine | m: use Test:ver({$_.parts[0] > 5}); | 16:50 | |
| camelia | ( no output ) | ||
| nine | That's one ;) | ||
| Oh, that's definitely a good real world example of a complex auth that will break any naive parser | |||
| Yet something we may want to allow | |||
| ugexe | right, just needs ('') instead of <> when Distribution generates it as a Str | 16:51 | |
| would code like $_.parts[0] be allowed in a depends though? Seems you would want to use hard coded values to represent most common rules (like how * and + will/do act) | 16:54 | ||
| nine | If we ever want to be able to use pre-installed precomp files, we really need to avoid turing complete dependency specifications | 16:55 | |
| We need to do this 100 % declaratively. And this is the hard part to figure out. | 16:56 | ||
| Perl6 doesn't do arbitrary restrictions very well :) | |||
|
17:02
hankache joined
17:15
domidumont joined
|
|||
| tony-o | does anyone know where `supercedes` is on the roadmap? | 17:38 | |
| i'm writing some tests for Test.pm6 | |||
|
17:49
leont joined
18:33
leont joined
18:52
Kassandry joined
19:00
hankache joined
19:26
TimToady joined
19:27
TimToady joined
20:46
domidumont joined
|
|||