X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=gsoc%2Fgsoc-devel-plan-5-23.txt;h=74d46f233bb85b117dec415372a7b1972ca8f221;hb=3cd69ff24eb4967ad0d5a856c379a825cf20d39b;hp=3cea09b6d65f48790a28efdc882637f3c59f3b40;hpb=6be0f53493911383977e9eed7f63d2c622438a1f;p=catagits%2FCatalyst-Devel.git diff --git a/gsoc/gsoc-devel-plan-5-23.txt b/gsoc/gsoc-devel-plan-5-23.txt index 3cea09b..74d46f2 100644 --- a/gsoc/gsoc-devel-plan-5-23.txt +++ b/gsoc/gsoc-devel-plan-5-23.txt @@ -137,6 +137,240 @@ get_file) still works. Rename share/ bits 04:31 < t0m> marcus: Indeed :) 04:31 < t0m> ^^ those two, then first merge. +23:36 <@kd> dhoss: just found a bug in ::Devel ... +23:36 <@kd> we're using #!/usr/bin/env perl now +23:36 <@kd> that means we have to add the use warnings; pragma beneath it +23:37 <@kd> that doesn't appear to be happeining in the scripts +23:37 <@kd> please fix +23:38 <@kd> dhoss: i.e. http://gist.github.com/122081 +============================================================================== + +# DONE +1. Rename everything into final layout: + . tt files all named .tt + . none tt files all named .bin + . directory structure as generated, e.g. share/lib/MyApp.pm.tt, share/root/favicon.ico.bin + +2. get new layout working + + +# DONE +3. get tests for back compat - i.e. the methods no longer used in Helper.pm like 'get_file' + . copy Catalyst::Helper::View::TT into t/lib/TestBackCompat.pm + . write test t/deprecated_methods_backcompat.t which says: + use FindBin qw/$Bin/; + use lib "$Bin/lib"; + use Test::More tests => 1; + + my $helper = TestBackCompat->new( %maybe_some_params_here ); + my $a_section = $helper->get_file('FileName'); + is $a_section, 'FILECONTENTSFROM__DATA__'; + +3. RFC - DONE + +Looking ahead + +MooseX::Getopt + +################################################################################ +17:46 < t0m> dhoss: erm, oh, so the _other_ thing I didn't think of +17:46 < t0m> Is Cat works on windows +17:46 < t0m> I have stuffed loads of "t/foo.t" +17:46 < t0m> into strings. +17:46 < t0m> which will break win +17:47 < t0m> so, all those places where I just "string/append/a/file.name" +17:47 < t0m> you need to use Path::Class qw/file/; file(qw/ string append a + file.name /); +17:47 < t0m> like ^^^ +17:48 < t0m> then it will still work on win32 +17:48 < dhoss> noted +17:48 < t0m> There is already File::Spec->catfile +17:48 < t0m> which does the same thing +17:48 < t0m> but more ugly +17:48 < t0m> either/or +17:48 < purl> either/or is "public load_first_existing_class" or "load_class + passes multiple args to load_first_existing_class" +17:48 < t0m> don't care... +17:49 < t0m> Just "file/name" is BAD +17:49 < t0m> and will hate windows users + +Summary: +17:43 < dhoss> 1. fix pod coverage, 2. remove TestAppForInvocation 3. ??? # DONE +17:43 < t0m> 3. merge # DONE +################################################################################ +--- Log opened Wed Jun 17 18:23:06 2009 +18:23 -!- Irssi: Starting query in perl with t0m +18:23 yo. wanna pick my brain affore I crash? +18:23 I wanna branch, and start hacking local::lib stuff +18:23 but that'll do a 4am on me again +18:24 okay, yes +18:25 i stopped after the last thing we talked about, the Moose-ification of Helper.pm. started that but nothing significant +18:26 no worries. There's at least 2 things you can work on right now obviously +18:26 one being that +18:26 one being hacking the generated +18:26 +code +18:26 one being tests for the generation stuff +18:27 at least 2 :) +18:27 :-D +18:27 lemme check hiveminder +18:28 but yeah, first 2 can be independent branches. +tests can just go in trunk +18:29 so branch again +18:29 and work on scripts +18:29 which are tasks...hold on +18:30 and branch again for moosify helper. if you want. I mean work on what you wanna work on - I'm just saying after stage 1, there is a whole spread of stuff to do now +18:30 #PYMI,#PYM9? +18:30 yea, i'd love to moosify the helper +18:30 Also, probably not enough todos to cover it - there is removing all the hardcoded filenames... +18:31 so many stuff. +18:31 cool, do that then :) +18:31 then we'll actually refactor/rewrite it +18:31 so all those _mk_foo things go away +18:31 okay, sweet, yea i forgot the about the hardcoded shits +18:31 okay, so my famous list: +18:31 that's going to involve some fun Module::Install hacking ;) +18:32 making _mk_blargh go away is? +18:32 just so +18:32 oh, sorry - yeah. _mk_favicon +18:32 just so == yes? (sorry, my crosspondia lang isn't up to snuff) +18:32 etc etc etc +18:33 just so = yes = exactly like you descibed but I misread what you said. +18:33 ahaha :-) +18:33 basically, the code has sub _mk_foo { render('lib/foo..pm.tt', 'lib/foo.pm') } (pseudocode) +18:34 okay, so: 1. #PMYI 2. #PYM9 3. Moosification of halper +18:35 if you could do foreach my $from_fn_-_to_fn ( $self->get_list_of_things_in_sharedir ) { +18:35 ^^ That would suck so much less +18:36 yea i've been looking at something like that +18:38 that's fairly easy, with the way we did the rename +18:38 initially, if you just found everything not /\.tt$/ +18:38 exactly, phrew +18:39 and transplanted them +18:39 that would be a good start +18:39 in fact, you could add that +18:39 not take any code away +18:39 just copy the files twice +18:39 not fail tests +18:39 commit +18:39 copy the files twice? +18:39 take away the _mk_favicon etc methods one by one +18:40 aha, and add that loop +18:40 well, if you run foreach my $binfile ($self->find_all_bin_files) { $self->copybinfile_to_app($binfile) } +18:40 (pseudocode) +18:41 ^^ Adding that to the current generation process won't break anything +18:41 You just generate the favicon.ico (etc) twice +18:41 once in that loop +18:41 once in pre-existing $self->_mk_favicon +18:41 in the same place.. +18:41 so you overwrite it the 2nd time +18:41 okay, so *leave* _mk_blargh and copy it into the for loop, i get it +18:42 well, do the generic thing in the for loop +18:42 in fact - here is a smart move. You know the 'check generated files' test? +18:42 yes +18:42 unlink each file +18:43 after you pass a test as it exists +18:43 then add an extra test doing a File::Find +18:43 and fail if it finds anything +18:43 so check file, unlink, then another test to look for leftovers +18:44 exactly +18:44 then you add something generic to copy bin files +18:44 and, forgive me, but what does that help us make sure we've done? +18:45 Makes sure you're not suddenly generating t/01app.t and t/01/app.t.tt # Oops, you fucked up the 'what file name do I generate test' +18:45 s/test'$/code'/ +18:46 so you don't ever accidentally generate duplicate files with diff names +18:46 or blank files with a weird name +18:46 okay, i think i understand +18:47 or genrally any shit you're not specificially saying 'we test it generates a file named X' +18:47 you test it generates X +18:47 you test it does not generate anything other than X +18:47 right +18:47 oaky +18:47 that's what i figured +18:47 sorry => tangent :) +18:48 it's okay, i'm a one track mind with this stuff :-) +18:48 I can't find pmyi, but pym9 cool +18:49 Try rewriting script_create.pl and see how far you can get - the big issue is going to be help display +18:49 that's pmyi +18:49 yes +18:49 exactly so :) +18:49 Oh, no, hang on +18:49 Rewrite script_server.pl first +18:50 in fact, rewrite everything that isn't _create first +18:50 _create is the hardest +18:50 and needs the most thinking +18:50 by a fucking long shot +18:50 I think _create probably involves MooseX::App::Cmd +18:51 so, rewrite with Moose sex getops +18:51 do the simple ones +18:51 first +18:51 like myapp_server.pl +18:51 like you just said :) +18:51 which will get you up to scratch on the Moo sex +18:51 before you have to hack it +18:52 Also, we can then start the bikeshedding about the right thing to do with moving the real code back into a CPAN dist +18:52 rather than it being in generated scripts +18:52 right, that would be awesome :-) +18:53 myapp_XXXXX.pl should say: use Catalyst::Script::XXXXX; Catalyst::Script::XXXXX->new_with_options->run; +18:53 + shebang line +18:53 right, i saw that in the list +18:53 kk. So make the simple scripts MX::Getopt packages +18:54 with the ->new_with_options->run incantation at the end of the source +18:54 hit until myapp_server.pl works like it used to. +18:54 rip Catalyst::Script::DevServer out +18:55 job done +18:55 okay. i'll give it a crash +--- Log closed Wed Jun 17 19:00:38 2009 +--- Log opened Wed Jun 17 19:00:44 2009 +19:00 http://scsys.co.uk:8001/29932. +19:00 I guess something like that but with less syntax errors works +19:01 expand out till original functionality replicated :) +19:01 Moose<3 +19:01 thanks man +19:04 i'm gonna get some grub. i'll ping you if i have any questions, i appreciate the help :-) +19:06 no worries. I'm at 2am +19:06 so => bed +19:08 hehe sleep up man +--- Log closed Wed Jun 17 19:13:38 2009 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +12:39 < t0m> to check we generate an application which can pass it's own tests + :) +12:40 < dhoss> so write a test to do taht? +12:40 < t0m> yy, that would be cool. Can just be on the bottom of the generated + files one +12:41 < t0m> run Makefile.PL, check exist status 0, check 'Makefile' exists, + run make test, check exit status zero +12:41 < dhoss> i trust something like `$perl Makefile.pl; make test` would do? +12:41 < t0m> *exit status +12:41 < dhoss> or is that windows unfriendly? +12:41 < dhoss> OH SHIT +12:41 < dhoss> thats right +12:41 < t0m> yeah, pretty much +12:41 < dhoss> i have to fix those /'s +12:41 < dhoss> make em windows happy +12:41 < t0m> yy, good one, File::Spec->catfile it up :) +12:42 < dhoss> i'm working on hacking buubot to read my mind +12:42 < dhoss> so i can just tell it to grab shit i say and todo it +12:42 < t0m> other than that, lets leave it till we can actually see a need for + more tests.. +12:42 < dhoss> that's *fine* by me :-) +12:43 < dhoss> so i can branch and moosify, and hack on the create scripts to + make them moosey +12:43 < dhoss> also, what does MX::Getopt need to play nice? +12:43 < t0m> yy. I guess if you hack on the scripts, you want to write tests + that they still perl -c in the generated app +12:43 < t0m> yy. I guess if you hack on the scripts, you want to write tests + that they still perl -c in the generated app +12:43 < t0m> and attack the simple scripts like myapp_server.pl first +12:44 < t0m> And you'll work out what GetOpt struggles with :) +12:44 < dhoss> which one was the pain in the ass one? was that create? +12:44 < t0m> yy +12:44 < dhoss> ok, i got them backwards +12:44 < t0m> create has much more elaborate option parsin +12:44 < t0m> *parsing +12:44 < dhoss> okay. that will be a later beast +12:45 < t0m> so yeah, just branch and jfdi, add tests for things as you touch + them - as you touch scripts add a 'scripts still compile' test +12:46 < t0m> when each script is nicely getopt'd and refactored, it'll be easy + to test a lot more.. +