Perl 6 - the future is here, just unevenly distributed

IRC log for #inline, 2014-12-13

| Channels | #inline index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 sivoais looks good
00:02 sivoais it was just that one line
00:03 sivoais the other PR is ugly and would probably be best fixed by change Inline::Module a little
00:04 sivoais Dist::Zilla needs to know about any files added so it can tar them up
00:04 ingy good idea. I'll release and let you do that?
00:04 ingy :)
00:04 sivoais ok
00:05 * ether will drive by sometime soon and see how you guys are faring...
00:05 ether it sounds like you're violating a lot of dzil best practices at the moment, but I recognize that getting something up and working is of primary concern right now :)
00:06 ingy I srsly doubt it
00:07 ingy ether: https://github.com/ingydotnet/dist-zilla-plugin-inlinemodule-pm/blob/master/lib/Dist/Zilla/Plugin/InlineModule.pm
00:09 ingy well Inline::Module does a lot of heavy lifting after the build is done
00:09 ingy but the code is exactly the same as EUMM
00:12 ether the plugin is still at version 0.01?
00:13 ether huh ok, that's changed a lot since I last looked at it :)
00:13 * ether saw some PRs going by that did some monkeypatching
00:13 ether perhaps I misunderstood
00:14 ingy sivoais: you still in the pairup?
00:15 sivoais back
00:15 ingy zild releasing Inline::Module
00:18 GitHub28 [inline-module-pm] ingydotnet pushed 1 new commit to master: http://git.io/w9Warw
00:18 GitHub28 inline-module-pm/master 2681c58 Ingy döt Net: CPAN Release 0.20...
00:18 GitHub104 [inline-module-pm] ingydotnet tagged 0.20 at master: http://git.io/-PpiPQ
00:18 sivoais ha, cowsay \o/
00:23 ingy so dzil release not working
00:23 ingy ether: what command does dzil release use to do dist testing?
00:24 sivoais aye, that's probably because the inc/**/Inline.pm files aren't the tarball?
00:24 sivoais look in the tarball
00:25 ingy ok that's messed up
00:26 ingy so `dzil build` makes a tarball and untars it?
00:26 ether the tarball is never untarred
00:27 sivoais dzil build will had all files that have been created and added using a FileInjector role? right?
00:27 ether the testing is here - essentially 'perl Makefile.PL && make && make test' -- https://metacpan.org/source/RJBS/Dist-Zilla-5.027/lib/Dist/Zilla/Plugin/MakeMaker/Runner.pm#L39
00:27 sivoais s,had all files,add all files to the tarball,
00:28 ether the inc/ files are autogenerated, aren't they? at what point in the build does that happen? is it via the after_build sub in the plugin?
00:28 ingy yes
00:28 ether if yes to both, you should be fine - as long as the $cwd is the build dir not the repo dir
00:28 ether if you didn't chdir then it's making the inc/ files in the repo, rather than the build which is a subdirectory
00:29 ether and the tests are run in that subdirectory as well
00:29 ingy after a `dzil build` the distdir is perfect and the tarball is missing everything
00:29 sivoais it's fine for testing (dzil test), but not for dzil build
00:29 sivoais PR 6 has a fix, but don't use it!
00:32 sivoais my solution would be to do the following in Inline::Module::handle_distdir()
00:33 sivoais { push @written_files, $self->write_module() for @all; return @written_files; }
00:33 sivoais and then DZ can be alerted to add them to the tarball
00:43 ether if they're not showing up in the tarball you've got bigger problems
00:43 ether as long as they're written to the dist dir before the end of the after_build phase, you're ok
00:43 jberger this is M::B under the hood?
00:43 sivoais ^^ oh...well, that's bad
00:43 jberger M::B is a little funny about non-perl files and non-standard locations
00:44 sivoais this is just Dist::Zilla, afaict
00:44 jberger dzil uses either EUMM or MB under the hood
00:44 jberger (maybe MBT)
00:45 jberger dzil doesn't have its own tooling system, it just builds one of the standard ones for you
00:45 sivoais no, this is actually before the build. The problem is coming when actually adding the files to the final release tarball
00:46 ether the tarring part of dzil just archives everything in the dist dir
00:46 ether are you sure the inc/ files are being generated in the right place?
00:46 * ether suspected you might be missing a chdir
00:46 ether it does look like you're passing the build_root to handle_distdir() though
00:47 sivoais does it have to chdir to the distdir? or can it directly create them by using build_root ?
00:47 ether I'd add a 'print glob("$hash->{build_root}/*")' to the end of after_build and see what you've got
00:49 sivoais let me try on my local copy
00:52 ingy ether: do I need to chdir to the build_root?
00:53 ether as far as dzil is concerned, you just need to create the files in that directory.
00:53 ether can you call Inline::Module->handle_distdir a little sooner than after_build?
00:54 ingy sure but I need the distdir witha manifest in it
00:54 ingy at least
00:54 ether and, can that method return a list of the files it is creating, or perhaps create them in a temp dir instead?
00:55 ether it reads the MANIFEST directly?
00:55 ingy no just appends to it
00:55 ether how hard would it be to take a list of what would be in MANIFEST, instead?  does it have to read from some other files as well?
00:55 ether I'm sorry that I've forgotten some of the details of what Inline::Module does :)
00:56 ether ok. those were just academic questions really, with an eye to improving the ordering of the dzil build process
00:56 ether but having things in after_build as they are now *should* work
00:57 ingy ether: everything is perfect in the distdir *before* the archive is made
00:58 ingy it's as if the archive uses an old copy on MANIFEST
00:59 ether I don't suppose you've got any tests for the dzil plugin?
00:59 ether looking at the test results woudl be the best way to debug this :)
00:59 ingy jesus
00:59 ether writing a dzil plugin by repeatedly running it in a real dist --> ends in tears
00:59 ether I write my plugins against the tests :)
01:00 sivoais I have steps to reproduce the problem :-)
01:00 ether it's the only way to be sure it's doing what I want it to on purpose, rather than by accident in combination with whatever other plugins are running too
01:01 ingy that's fine, but I just told you that the distdir is good with a good MANIFEST, then the archive tars the contents before I changed them
01:01 ingy so maybe that rings a bell?
01:01 sivoais how does GatherDir work with the distdir ?
01:02 ether sivoais: GatherDir is irrelevant here because the files aren't created until after the gathered files have already been written to disk
01:02 ether essentially, this plugin is taking an already-constructed dist dir and mutating its contents at the last minute just before tarring.
01:02 ether (which isn't ideal, but to fix that would require some refactoring of Inline::Module, it sounds like.)
01:02 ingy the awesome part is that the MANIFEST in the crippled archive is actually right
01:03 ether 16:47 < ether> I'd add a 'print glob("$hash->{build_root}/*")' to the end of after_build and see what you've got
01:03 ether what happened with this? ^^
01:03 ether does the file list look correct?
01:04 ether oh! I see the problem
01:04 ether sivoais: you hit very close to the solution
01:04 ingy ether: I told you. it looks perfect
01:05 ether 1 sec
01:05 ingy 01:09:12         @ingy | ether: everything is perfect in the distdir *before* the archive is made
01:06 ether *nod* - I thought the tar process was just tarring up the dir, but indeed no, it does a more programmatic approach and each file must be explicitly added
01:06 sivoais yeah *points to PR 6* :-D
01:06 ether here: https://metacpan.org/source/RJBS/Dist-Zilla-5.027/lib/Dist/Zilla/Dist/Builder.pm#L472
01:07 ether I would *strongly* recommend having Inline::Module return a list of filenames that it wants added to the dist, rather than monkeypatching
01:08 sivoais PR 6! PR 6! lol, I had this already... but I have to go now
01:08 ether and then the after_build sub just does  $self->add_file(Dist::Zilla::File::OnDisk->new(name=>$_)) foreach @inline_files_to_add
01:19 ingy sivoais: I have to drink now. can you patch that up?
01:20 sivoais I can. back in an hour.
01:33 ingy awesome.
01:34 ingy sivoais: sounds prety easy. just pass back paths added from handle_distdir, and then make the dzil plugin loop on those.
01:34 ingy ether: thanks for looking into that
04:43 GitHub26 [inline-module-pm] zmughal opened pull request #14: `handle_distdir` now returns a list of files added (master...distdir-filenames) http://git.io/7sDP9A
06:12 davido___ joined #inline
16:12 GitHub56 [inline-module-pm] ingydotnet pushed 1 new commit to master: http://git.io/_gMQ7w
16:12 GitHub56 inline-module-pm/master f69d819 Zakariyya Mughal: `handle_distdir` now returns a list of files added...
16:12 GitHub17 [inline-module-pm] ingydotnet closed pull request #14: `handle_distdir` now returns a list of files added (master...distdir-filenames) http://git.io/7sDP9A
16:22 ingy^1 sivoais: seems to work perfect
16:23 sivoais :-D
16:25 GitHub77 [acme-math-xs-pm] ingydotnet pushed 1 new commit to dzil: http://git.io/SxeIcw
16:25 GitHub77 acme-math-xs-pm/dzil 7fe8163 Ingy döt Net: 0.0.2
16:25 GitHub190 [acme-math-xs-pm] ingydotnet tagged v0.0.2 at bedd741: http://git.io/7_fMpg
16:25 GitHub159 [acme-math-xs-pm] ingydotnet deleted v0.0.2 at bedd741: http://git.io/uPLgRg
16:26 GitHub180 [acme-math-xs-pm] ingydotnet tagged v0.0.2 at bedd741: http://git.io/7_fMpg
16:26 GitHub55 [acme-math-xs-pm] ingydotnet tagged dzil-0.0.2 at dzil: http://git.io/oc76kA
16:26 GitHub91 [acme-math-xs-pm] ingydotnet deleted v0.0.2 at bedd741: http://git.io/uPLgRg
16:26 ingy^1 that was `dzil release`
16:28 travis-ci ingydotnet/acme-math-xs-pm#27 (dzil - 7fe8163 : Ingy döt Net): The build passed.
16:28 travis-ci Change view : https://github.com/ingydotnet/acme-math-xs-pm/compare/0bcc84254769...7fe816321836
16:28 travis-ci Build details : http://travis-ci.org/ingydotnet/acme-math-xs-pm/builds/43938819
16:29 travis-ci ingydotnet/acme-math-xs-pm#28 (dzil-0.0.2 - 7fe8163 : Ingy döt Net): The build passed.
16:29 travis-ci Change view : https://github.com/ingydotnet/acme-math-xs-pm/compare/dzil-0.0.2
16:29 travis-ci Build details : http://travis-ci.org/ingydotnet/acme-math-xs-pm/builds/43938891
16:29 GitHub35 [inline-module-pm] ingydotnet pushed 1 new commit to master: http://git.io/9rNolQ
16:29 GitHub35 inline-module-pm/master 706b213 Ingy döt Net: CPAN Release 0.21...
16:29 GitHub120 [inline-module-pm] ingydotnet tagged 0.21 at master: http://git.io/q5Wt3A
16:35 ingy^1 sivoais: everything is merged and released
16:35 ingy^1 was there something more we needed for the dzil plugin?
16:35 ingy^1 I think the manifest work was it, yeah?
16:35 ingy^1 try the new stuff with your modules
16:36 ingy^1 I will be out for 5 hours or so.
16:36 ingy^1 then I need to work on the weekly Inline report #8
16:36 ingy^1 maybe you'll have some working stuff
16:37 ingy^1 davido___: did you ever get the new Inline::CPP and FastSieve modules out?
16:37 ingy^1 ok laters
16:45 jberger left #inline
17:33 davido___ Ingy : Should I set it up as Alt::M::P::FS ?
17:33 davido___ Right now it's just M::P::FS.  ...or I could do Alt::M::P::FS::ILM
19:00 sivoais Inline::Module is working great for <https://github.com/zmughal/embedding-r-in-perl-experiment> now. Even works in the case where I use 'DATA' to compile the code. Love the succinctness.
19:16 * mst relays the existence of that to a perl+R hacker I know
19:22 sivoais mst: I'll need to doc it up and it'll be cpan-ized soon :-)
19:22 * mst pastes that line to him as well :D
19:44 vicash joined #inline
19:44 vicash left #inline
20:56 mohawk sivoais++
22:26 mohawk joined #inline
23:17 GitHub129 [inline-module-pm] ingydotnet opened issue #15: Check for ./inc/ in @INC in Makefile.PL http://git.io/6xVz2Q
23:28 GitHub72 [Inline-CPP] ingydotnet opened issue #25: This new parser stuff should be released ASAP. http://git.io/zv9Zzw
23:30 GitHub18 [inline-c-pm] ingydotnet opened issue #33: Move grammar in share to a repo http://git.io/30I4-A

| Channels | #inline index | Today | | Search | Google Search | Plain-Text | summary