Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Original Message- From: Jason McCarver via RT I'm working on a distribution which has multiple modules using Inline. Something like the following Foo Foo::Bar - uses Inline Foo::Bar::Baz - uses Inline I couldn't figure out how to make Inline::MakeMaker work in this scenario, so I've patched it to do what I think is correct. Hi Jason, To achieve a better understanding of the issue, I created a distro (attached) that matches the description provided. That is, it's a distro named 'Foo' that contains a Foo.pm (pure perl), a Foo/Bar/Bar.pm (which uses Inline) and a Foo/Bar/Baz/Baz.pm (which uses Inline) along with a MANIFEST, test scripts, and Makefiles.PL. It builds and tests fine for me what modifications need to be made to it in order that the Inline::MakeMaker problems alluded to above become evident ? Cheers, Rob Foo.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Wed May 21 07:40:52 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: new Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > Original Message- From: Jason McCarver via RT > I'm working on a distribution which has multiple modules using Inline. > Something like the following > > Foo > Foo::Bar - uses Inline >Foo::Bar::Baz - uses Inline > > I couldn't figure out how to make Inline::MakeMaker work in this scenario, > so I've patched it to do what I think is correct. Hi Jason, To achieve a better understanding of the issue, I created a distro (attached) that matches the description provided. That is, it's a distro named 'Foo' that contains a Foo.pm (pure perl), a Foo/Bar/Bar.pm (which uses Inline) and a Foo/Bar/Baz/Baz.pm (which uses Inline) along with a MANIFEST, test scripts, and Makefiles.PL. It builds and tests fine for me what modifications need to be made to it in order that the Inline::MakeMaker problems alluded to above become evident ? Cheers, Rob Foo.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sat May 24 08:57:51 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > From: sisyph...@optusnet.com.au via RT > To achieve a better understanding of the issue, I created a distro > (attached) that matches the description provided. In the absence of any further feedback, I then altered the Foo distro so that: Foo uses Inline Foo loads Foo::Bar (which uses Inline) Foo also loads Foo::Bar::Baz (which uses Inline) This distro (attached as Foo-2.tar.gz) also builds and tests fine for me. I then changed it slightly so that: Foo uses Inline Foo loads Foo::Bar (which uses Inline) Foo::Bar uses Foo::Bar::Baz (which uses Inline) This distro (attached as Foo-3.tar.gz) also builds and tests fine for me. I don't doubt that the patches provided by the OP fix *something*. But I'm certainly not going to apply them until someone enlightens me as to exactly what it is that those patches fix. Cheers, Rob Foo-2.tar.gz Description: GNU Zip compressed data Foo-3.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
From: sisyph...@optusnet.com.au via RT To achieve a better understanding of the issue, I created a distro (attached) that matches the description provided. In the absence of any further feedback, I then altered the Foo distro so that: Foo uses Inline Foo loads Foo::Bar (which uses Inline) Foo also loads Foo::Bar::Baz (which uses Inline) This distro (attached as Foo-2.tar.gz) also builds and tests fine for me. I then changed it slightly so that: Foo uses Inline Foo loads Foo::Bar (which uses Inline) Foo::Bar uses Foo::Bar::Baz (which uses Inline) This distro (attached as Foo-3.tar.gz) also builds and tests fine for me. I don't doubt that the patches provided by the OP fix *something*. But I'm certainly not going to apply them until someone enlightens me as to exactly what it is that those patches fix. Cheers, Rob Foo-2.tar.gz Description: GNU Zip compressed data Foo-3.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sat May 24 20:21:07 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > Rob, I must apologize ... I am working on a response but I just haven't had/made the time. I hope to rectify that soon! Thanks, Jason On Sat, 24 May 2014 08:57:52 -0400 "sisyph...@optusnet.com.au via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > From: sisyph...@optusnet.com.au via RT > > > To achieve a better understanding of the issue, I created a distro > > (attached) that matches the description provided. > > In the absence of any further feedback, I then altered the Foo distro so > that: > > Foo uses Inline > Foo loads Foo::Bar (which uses Inline) > Foo also loads Foo::Bar::Baz (which uses Inline) > > This distro (attached as Foo-2.tar.gz) also builds and tests fine for me. > > I then changed it slightly so that: > > Foo uses Inline > Foo loads Foo::Bar (which uses Inline) > Foo::Bar uses Foo::Bar::Baz (which uses Inline) > > This distro (attached as Foo-3.tar.gz) also builds and tests fine for me. > > I don't doubt that the patches provided by the OP fix *something*. But I'm > certainly not going to apply them until someone enlightens me as to exactly > what it is that those patches fix. > > Cheers, > Rob >
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sun May 25 15:49:48 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > Rob, I've attached Foo.tar.gz which has an example of how to use Inline::MakeMaker with the new patch. I noticed that in your Foo.tar.gz that you originally built each module had its own Makefile.PL, like each was its own distribution. For what I'm working on I have a single distribution containing multiple modules that use Inline. I have changed the structure of my attached Foo distribution to mimic this. There is just one top level Makefile.PL and still the Foo::Bar and Foo::Bar::Baz modules using Inline. What I wanted (and I originally thought Inline::MakeMaker would do) is to compile all modules in the distribution that use Inline during the course of 'perl Makefile.PL; make'. Then when 'make install' was run that the compiled code would be installed along side the rest of the distribution. From what I could tell this only works for a single module, the one named in the Makefile.PL. My patch addresses this by generating rules to compile all modules in the 'INLINE_MODULES' argument to Inline::MakeMaker. Hopefully this makes sense and that my attachment will help clear up what I'm thinking. Then again, maybe I'm completely off base here as this was my first encounter with Inline and I may be missing something obvious! Thanks for your time (and patience), Jason Foo.tar.gz Description: application/gzip
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 06:03:09 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > I noticed that in your Foo.tar.gz that you originally built each module > had its own Makefile.PL, like each was its own distribution. For what I'm > working on I have a single distribution containing multiple modules that > use Inline. I have changed the structure of my attached Foo distribution > to mimic this. AFAIK, both structures should give the same end result. Turns out that while the structure I was using successfully builds and installs, it doesn't actually install the compiled libraries - so it's inadequate on that score. (This also should be fixed.) Although I prefer to avoid the layout you're wanting to use, it's certainly used by plenty of (ie most) source distros on CPAN. It's therefore valid - and ought to be better accommodated. Better still if we can fix things so that it "simply works" without any need for additional config options. In fact I'm hoping we can fix it without any need for additional documentation, too - but that remains to be seen. In the meantime we have your patches, to which I'll gladly resort if I don't come up with anything better. Thanks for raising this, and for the patches !! Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT I noticed that in your Foo.tar.gz that you originally built each module had its own Makefile.PL, like each was its own distribution. For what I'm working on I have a single distribution containing multiple modules that use Inline. I have changed the structure of my attached Foo distribution to mimic this. AFAIK, both structures should give the same end result. Turns out that while the structure I was using successfully builds and installs, it doesn't actually install the compiled libraries - so it's inadequate on that score. (This also should be fixed.) Although I prefer to avoid the layout you're wanting to use, it's certainly used by plenty of (ie most) source distros on CPAN. It's therefore valid - and ought to be better accommodated. Better still if we can fix things so that it "simply works" without any need for additional config options. In fact I'm hoping we can fix it without any need for additional documentation, too - but that remains to be seen. In the meantime we have your patches, to which I'll gladly resort if I don't come up with anything better. Thanks for raising this, and for the patches !! Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: sisyph...@optusnet.com.au via RT Turns out that while the structure I was using successfully builds and installs, it doesn't actually install the compiled libraries - so it's inadequate on that score. (This also should be fixed.) My mistake. Nothing to be fixed wrt that structure - it works perfectly so long as you set it up correctly (ie as per modules/Math::Simple demo in the Inline source). Attached Foo-4.tar.gz builds, tests, and installs fine - and there's no compilation to be done after 'make install' has been run. Points to watch: 1) that the Makefiles.PL use Inline::MakeMaker (not ExtUtils::MakeMaker); 2) that the pm files contain the correct 'NAME' and 'VERSION' Config options; 3) that the version number is of the form of x.xx. Can now move on to the actual issue that is the subject of this bug report. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 08:20:03 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: sisyph...@optusnet.com.au via RT > Turns out that while the structure I was using successfully builds and > installs, it doesn't actually install the compiled libraries - so it's > inadequate on that score. (This also should be fixed.) My mistake. Nothing to be fixed wrt that structure - it works perfectly so long as you set it up correctly (ie as per modules/Math::Simple demo in the Inline source). Attached Foo-4.tar.gz builds, tests, and installs fine - and there's no compilation to be done after 'make install' has been run. Points to watch: 1) that the Makefiles.PL use Inline::MakeMaker (not ExtUtils::MakeMaker); 2) that the pm files contain the correct 'NAME' and 'VERSION' Config options; 3) that the version number is of the form of x.xx. Can now move on to the actual issue that is the subject of this bug report. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 08:26:50 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Mon, 26 May 2014 06:03:10 -0400 "sisyph...@optusnet.com.au via RT" wrote: > Better still if we can fix things so that it "simply works" without any need > for additional config options. I agree that it would be much better without the additional config options. I may try to look at that too, although I'm new to working on MakeMaker so I'm not exactly sure how one would go about making this work. I'm more than happy to try to help if I'm not getting in the way. > In fact I'm hoping we can fix it without any need for additional > documentation, too - but that remains to be seen. In the meantime we have > your patches, to which I'll gladly resort if I don't come up with anything > better. > Thanks for raising this, and for the patches !! I also agree that not having to add any documentation would be ideal. Thank you for being receptive! > Although I prefer to avoid the layout you're wanting to use, it's certainly > used by plenty of (ie most) source distros on CPAN. So just out of curiosity (and this may not be the proper forum) why do you prefer your layout? I'm pretty new to module authoring so I'm always open to inpu. Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 09:56:36 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Mon, 26 May 2014 08:20:04 -0400 "sisyph...@optusnet.com.au via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > -Original Message- > From: sisyph...@optusnet.com.au via RT > Attached Foo-4.tar.gz builds, tests, and installs fine - and there's no > compilation to be done after 'make install' has been run. I don't see the Foo-4.tar.gz attachement? Neither in my email or via the web. Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT I don't see the Foo-4.tar.gz attachement? Neither in my email or via the web. Don't worry - you're not going blind. (I'm just going mad ;-) I've now attached it as Foo-fixed.tar.gz. It's essentially the Foo distro that you sent, except that the layout has been changed to the one that I would normally use. I've also had to alter the top level Makefile.PL and, of course, insert the 2 extra Makefiles.PL. I don't think I made any other changes. It should build, test, and install successfully - and install as per your expectations. Incidentally, it only takes for Foo.pm to "use Foo::Bar;" and "use Foo::Bar::Baz;" and the version *you* sent would also build and install as desired. (Though in that case, every time I run 'dmake', 'dmake test' and 'dmake install' the C code recompiles - but it results in a correct install in the end.) It's the fact that Foo.pm neither uses Inline, nor uses both of the other modules, that's providing the stumbling block. (Or does Foo.pm still need to load the other 2 modules even if it uses Inline ? ... not sure now; I'd need to check on that.) The distro you sent is tantalisingly close to working just can't quite nail it, and don't yet know whether that's because I'm not being smart enough or because it is simply un-nailable without using your patch (or something similar). I'll look again tonight. Cheers, Rob Foo-fixed.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 20:17:10 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > I don't see the Foo-4.tar.gz attachement? Neither in my email or via the > web. Don't worry - you're not going blind. (I'm just going mad ;-) I've now attached it as Foo-fixed.tar.gz. It's essentially the Foo distro that you sent, except that the layout has been changed to the one that I would normally use. I've also had to alter the top level Makefile.PL and, of course, insert the 2 extra Makefiles.PL. I don't think I made any other changes. It should build, test, and install successfully - and install as per your expectations. Incidentally, it only takes for Foo.pm to "use Foo::Bar;" and "use Foo::Bar::Baz;" and the version *you* sent would also build and install as desired. (Though in that case, every time I run 'dmake', 'dmake test' and 'dmake install' the C code recompiles - but it results in a correct install in the end.) It's the fact that Foo.pm neither uses Inline, nor uses both of the other modules, that's providing the stumbling block. (Or does Foo.pm still need to load the other 2 modules even if it uses Inline ? ... not sure now; I'd need to check on that.) The distro you sent is tantalisingly close to working just can't quite nail it, and don't yet know whether that's because I'm not being smart enough or because it is simply un-nailable without using your patch (or something similar). I'll look again tonight. Cheers, Rob Foo-fixed.tar.gz Description: GNU Zip compressed data
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT So just out of curiosity (and this may not be the proper forum) why do you prefer your layout? That's the layout I've always used, and it has never given me any trouble. (That's pretty much the full extent of my reasoning ;-) I also think the additional Makefiles.PL can only provide additional flexibility, as we're seeing here. According to my (admittedly unreliable) memory, the layout I use dates back a long way, whereas the layout you're using is relatively recent. I don't know why the "newer" layout became popular - I'll have to find out. Perhaps then things might be a little clearer. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon May 26 20:35:23 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > So just out of curiosity (and this may not be the proper forum) why do you > prefer your layout? That's the layout I've always used, and it has never given me any trouble. (That's pretty much the full extent of my reasoning ;-) I also think the additional Makefiles.PL can only provide additional flexibility, as we're seeing here. According to my (admittedly unreliable) memory, the layout I use dates back a long way, whereas the layout you're using is relatively recent. I don't know why the "newer" layout became popular - I'll have to find out. Perhaps then things might be a little clearer. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Tue May 27 10:16:00 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Mon, 26 May 2014 20:17:11 -0400 "sisyph...@optusnet.com.au via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > -Original Message- > From: Jason McCarver via RT > Incidentally, it only takes for Foo.pm to "use Foo::Bar;" and "use > Foo::Bar::Baz;" and the version *you* sent would also build and install as > desired. (Though in that case, every time I run 'dmake', 'dmake test' and > 'dmake install' the C code recompiles - but it results in a correct install > in the end.) Yes that makes sense since the XS gets built/compiled when the module is initially 'use'ed. > The distro you sent is tantalisingly close to working Please forgive the following rambling .. it's more of a stream of conscience and less than fully thought out :) I think the underlying problem here is how does Inline::MakeMaker know which modules need to be 'use'ed as part of the make process. The way it works without the patch is by relying on the fact that Inline::MakeMaker is being used in place of ExtUtils::MakeMaker. I believe I::MM currently makes the following assumptions: - There is one perl module per Makefile.PL (the layout you prefer I believe) - That module needs to be 'use'ed during 'make' For your layout these assumptions are fine. This basically means that the programmer is explicitly telling I::MM which modules to process by using I::MM instead of ExtUtils::MakeMaker But for the layout I'm using that doesn't work so then it's back to how does I::MM know which modules need to be 'use'ed. My attempt at a solution was to force the programmer to explicitly tell I::MM by way of the INLINE_MODULES argument. I do agree it would be better to not have to do that. However I believe that would mean one of the following would need to be done: - shotgun approach and 'use' all modules in the distribution (seems ugly, possibly error-prone) - scan all modules somehow to find the ones that are using 'Inline' and just 'use' them during the 'make' process. Also error-prone. It seems like the second of those might be doable but I'm not sure how ugly that would be :) And of course I could be way off here, still trying to learn as I go with Inline. Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT .. so then it's back to how does I::MM know which modules need to be 'use'ed. My attempt at a solution was to force the programmer to explicitly tell I::MM by way of the INLINE_MODULES argument. I do agree it would be better to not have to do that. However I believe that would mean one of the following would need to be done: - shotgun approach and 'use' all modules in the distribution (seems ugly, possibly error-prone) When I build the Foo.tar.gz source that you provided against Inline-0.55 (having first removed the "INLINE_MODULES => [qw(Foo::Bar Foo::Bar::Baz)]," entry in the Makefile.PL), at the make stage the following commands get run: ### C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch ### The commands we really want to be run there are: ### C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar -e1 2.01 blib\arch C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 blib\arch ### In fact, the "C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch" command is not needed - but it doesn't do any harm. (Foo.pm does not use Inline, not does it use a module that uses Inline, so nothing gets installed as a result of running that command.) Therefore, instead of the generated Makefile terminating with the following (generated by Inline::MakeMaker): ### # Well, not quite. Inline::MakeMaker is adding this: # --- MakeMaker inline section: Foo.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 $(INST_ARCHLIB) pure_all :: Foo.inl # The End is here. ### we want it to terminate with: ### # Well, not quite. Inline::MakeMaker is adding this: # --- MakeMaker inline section: Foo.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 $(INST_ARCHLIB) pure_all :: Foo.inl Bar.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar -e1 2.01 $(INST_ARCHLIB) pure_all :: Bar.inl Baz.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 $(INST_ARCHLIB) pure_all :: Baz.inl # The End is here. ### And I think it would be straightforward to get Inline::MakeMaker to do this. I::MM simply has to recurse through the ./lib folder and create the relevant entry in the Makefile for every pm file it finds (irrespective of whether that pm file actually uses Inline). I think this corresponds to your "shotgun" approach. I don't think it's ugly. For sure it's an unnecessary step for the modules that don't use Inline but (for those modules) it does no harm other than to consume a fraction of a second during the make stage. It becomes (possibly) error prone when someone wants to bundle something like: Foo Foo::Bar Foo::lib::Bar but I'd quite happily wait to cross that bridge if and when we come to it. OTOH, it would require no new config options and no change to any documentation. All we need to do is to have I::MM loop recursively through the ./lib directory (if such a directory exists). What do you think ? I'll probably be without an internet connection from Thursday night until Monday night, but I'll take my laptop with me and test out a proof of concept regarding this proposal over that period. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Wed May 28 05:55:22 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > .. so then it's back to how does I::MM know which modules need to > be 'use'ed. My attempt at a > solution was to force the programmer to explicitly tell I::MM by way of > the INLINE_MODULES argument. I do agree it would be better to not have > to do that. However I believe that would mean one of the following > would need to be done: > - shotgun approach and 'use' all modules in the distribution (seems ugly, > possibly error-prone) When I build the Foo.tar.gz source that you provided against Inline-0.55 (having first removed the "INLINE_MODULES => [qw(Foo::Bar Foo::Bar::Baz)]," entry in the Makefile.PL), at the make stage the following commands get run: ### C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch ### The commands we really want to be run there are: ### C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar -e1 2.01 blib\arch C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 blib\arch ### In fact, the "C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 blib\arch" command is not needed - but it doesn't do any harm. (Foo.pm does not use Inline, not does it use a module that uses Inline, so nothing gets installed as a result of running that command.) Therefore, instead of the generated Makefile terminating with the following (generated by Inline::MakeMaker): ### # Well, not quite. Inline::MakeMaker is adding this: # --- MakeMaker inline section: Foo.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 $(INST_ARCHLIB) pure_all :: Foo.inl # The End is here. ### we want it to terminate with: ### # Well, not quite. Inline::MakeMaker is adding this: # --- MakeMaker inline section: Foo.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo -e1 2.01 $(INST_ARCHLIB) pure_all :: Foo.inl Bar.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar -e1 2.01 $(INST_ARCHLIB) pure_all :: Bar.inl Baz.inl : $(TO_INST_PM) $(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 $(INST_ARCHLIB) pure_all :: Baz.inl # The End is here. ### And I think it would be straightforward to get Inline::MakeMaker to do this. I::MM simply has to recurse through the ./lib folder and create the relevant entry in the Makefile for every pm file it finds (irrespective of whether that pm file actually uses Inline). I think this corresponds to your "shotgun" approach. I don't think it's ugly. For sure it's an unnecessary step for the modules that don't use Inline but (for those modules) it does no harm other than to consume a fraction of a second during the make stage. It becomes (possibly) error prone when someone wants to bundle something like: Foo Foo::Bar Foo::lib::Bar but I'd quite happily wait to cross that bridge if and when we come to it. OTOH, it would require no new config options and no change to any documentation. All we need to do is to have I::MM loop recursively through the ./lib directory (if such a directory exists). What do you think ? I'll probably be without an internet connection from Thursday night until Monday night, but I'll take my laptop with me and test out a proof of concept regarding this proposal over that period. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sat May 31 17:58:18 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Wed, 28 May 2014 05:55:23 -0400 "sisyph...@optusnet.com.au via RT" wrote: > And I think it would be straightforward to get Inline::MakeMaker to do this. > I::MM simply has to recurse through the ./lib folder and create the relevant > entry in the Makefile for every pm file it finds (irrespective of whether > that pm file actually uses Inline). > > I think this corresponds to your "shotgun" approach. > I don't think it's ugly. For sure it's an unnecessary step for the modules > that don't use Inline but (for those modules) it does no harm other than to > consume a fraction of a second during the make stage. Ok, so you talked me into the "shotgun" approach :) After digging a bit I found that ExtUtils::MakeMaker was already locating all modules to be installed and placing that list in $mm->{PM} (where $mm is the returned object from the call to ExtUtils::MakeMaker::WriteMakefile). There is another attribute, $mm->{PMLIBDIRS} that contains a list of directories those modules reside in. I added some code to use those two lists to generate the rules to add to the makefile without having to scan for modules ourselves. Let me know what you think. It worked for my single-Makefile.PL distribution and for your Foo-fixed distribution. This method requires no additional config options nor documentation. Thanks, Jason diff -r 8a9bc8d83cc9 -r 3474e7b1aab0 Inline.pm --- a/Inline.pm Thu May 15 07:03:36 2014 -0500 +++ b/Inline.pm Sat May 31 16:52:08 2014 -0500 @@ -515,12 +515,12 @@ sub load { my $o = shift; if ($o->{CONFIG}{_INSTALL_}) { - my $inline = "$o->{API}{modfname}.inl"; + my $inline = $o->{API}{modinlname}; open INLINE, "> $inline" or croak M24_open_for_output_failed($inline); print INLINE "*** AUTOGENERATED by Inline.pm ***\n\n"; print INLINE "This file satisfies the make dependency for "; - print INLINE "$o->{API}{modfname}.pm\n"; + print INLINE "$o->{API}{module}\n"; close INLINE; return; } @@ -983,6 +983,7 @@ sub install { my @modparts = split(/::/,$o->{API}{module}); $o->{API}{modfname} = $modparts[-1]; $o->{API}{modpname} = File::Spec->catdir(@modparts); +$o->{API}{modinlname} = join('-',@modparts).'.inl'; $o->{API}{suffix} = $o->{INLINE}{ILSM_suffix}; $o->{API}{build_dir} = File::Spec->catdir($o->{INLINE}{DIRECTORY},'build', $o->{API}{modpname}); diff -r 8a9bc8d83cc9 -r 3474e7b1aab0 lib/Inline/MakeMaker.pm --- a/lib/Inline/MakeMaker.pm Thu May 15 07:03:36 2014 -0500 +++ b/lib/Inline/MakeMaker.pm Sat May 31 16:52:08 2014 -0500 @@ -23,7 +23,6 @@ sub WriteMakefile { my %args = @_; my $name = $args{NAME} or croak "Inline::MakeMaker::WriteMakefile requires the NAME parameter\n"; -my $object = (split(/::/, $name))[-1]; my $version = ''; croak < "_Inline $object.inl" } +$args{clean} = { FILES => "_Inline *.inl " } unless defined $args{clean}; + # Add Inline to the dependencies $args{PREREQ_PM}{Inline} = '0.44' unless defined $args{PREREQ_PM}{Inline}; -&ExtUtils::MakeMaker::WriteMakefile(%args); +my $mm = &ExtUtils::MakeMaker::WriteMakefile(%args); -open MAKEFILE, '>> Makefile' - or croak "Inline::MakeMaker::WriteMakefile can't append to Makefile:\n$!"; +my (@objects, @obj_rules); -print MAKEFILE <{PMLIBDIRS} && $mm->{PM}) { +# Sort them longest first so we'll match subdirectories before their parents +my @libdirs = sort { length($b) <=> length($a) } @{$mm->{PMLIBDIRS}}; + +for my $path (keys %{$mm->{PM}}) { +for my $lib (@libdirs) { +if (index($path,$lib) == 0) { +my ($vol, $dirs, $file) = File::Spec->splitpath(substr($path, length($lib)+1)); +my @dirs = File::Spec->splitdir($dirs); +pop @dirs unless length($dirs[$#dirs]); +$file =~ s/\.[^.]+$//; + +push @objects, join('::', @dirs, $file); +push @obj_rules, join('-', @dirs, "$file.inl"); +last; +} + +croak "Failed to find module path for '$path'"; +} +} +} else { +# no modules found in PMLIBDIRS so assume we've just got $name to do +@objects = $name; +@obj_rules = (split(/::/, $name))[-1].'.inl'; +} + +if (@objects) { +open MAKEFILE, '>> Makefile' + or croak "Inline::MakeMaker::WriteMakefile can't append to Makefile:\n$!"; + +print MAKEFILE <
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT After digging a bit I found that ExtUtils::MakeMaker was already locating all modules to be installed and placing that list in $mm->{PM} (where $mm is the returned object from the call to ExtUtils::MakeMaker::WriteMakefile). I didn't know that. (You already know more about Inline than I do.) There is another attribute, $mm->{PMLIBDIRS} that contains a list of directories those modules reside in. I added some code to use those two lists to generate the rules to add to the makefile without having to scan for modules ourselves. Didn't know that, either. Yours is therefore probably a smarter solution than the one I envisaged. Mine is a solution that hacks (solely) I::MM to recurse thru the 'lib' directory and locate all of the *.pm files (using File::Find). However, with your patch, for the distro you provided, I'm getting: ## C:\_32\pscrpt\Foo-broken>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Foo Writing MYMETA.yml and MYMETA.json C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 blib\arch validate Stage Starting Build Preprocess Stage get_maps Stage Finished Build Preprocess Stage Starting Build Parse Stage Finished Build Parse Stage Starting Build Glue 1 Stage Finished Build Glue 1 Stage Starting Build Glue 2 Stage Finished Build Glue 2 Stage Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage Finished "perl Makefile.PL" Stage Starting "make" Stage Finished "make" Stage Starting "make install" Stage Finished "make install" Stage Starting Cleaning Up Stage Finished Cleaning Up Stage Finished Build Compile Stage Can't open for output. at C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 9. BEGIN failed--compilation aborted at C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 15. Compilation failed in require. BEGIN failed--compilation aborted. dmake: Error code 255, while making 'Foo-Bar-Baz.inl' C:\_32\pscrpt\Foo-broken> ## This might just be *my* mistake ... I might have messed something up. (I don't think so but.) I'll have to check again tomorrow night. What version of perl are you running ? Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon Jun 02 08:35:54 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > After digging a bit I found that ExtUtils::MakeMaker was already locating > all modules to be installed and placing that list in $mm->{PM} (where $mm > is the returned object from the call to > ExtUtils::MakeMaker::WriteMakefile). I didn't know that. (You already know more about Inline than I do.) > There is another attribute, $mm->{PMLIBDIRS} that contains a list of > directories those modules reside in. I added some code to use those two > lists to generate the rules to add to the makefile without having to scan > for modules ourselves. Didn't know that, either. Yours is therefore probably a smarter solution than the one I envisaged. Mine is a solution that hacks (solely) I::MM to recurse thru the 'lib' directory and locate all of the *.pm files (using File::Find). However, with your patch, for the distro you provided, I'm getting: ## C:\_32\pscrpt\Foo-broken>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Foo Writing MYMETA.yml and MYMETA.json C:\_32\pscrpt\Foo-broken>dmake cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm cp lib/Foo.pm blib\lib\Foo.pm cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ -MFoo::Bar::Baz -e1 2.01 blib\arch validate Stage Starting Build Preprocess Stage get_maps Stage Finished Build Preprocess Stage Starting Build Parse Stage Finished Build Parse Stage Starting Build Glue 1 Stage Finished Build Glue 1 Stage Starting Build Glue 2 Stage Finished Build Glue 2 Stage Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage Finished "perl Makefile.PL" Stage Starting "make" Stage Finished "make" Stage Starting "make install" Stage Finished "make install" Stage Starting Cleaning Up Stage Finished Cleaning Up Stage Finished Build Compile Stage Can't open for output. at C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 9. BEGIN failed--compilation aborted at C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 15. Compilation failed in require. BEGIN failed--compilation aborted. dmake: Error code 255, while making 'Foo-Bar-Baz.inl' C:\_32\pscrpt\Foo-broken> ## This might just be *my* mistake ... I might have messed something up. (I don't think so but.) I'll have to check again tomorrow night. What version of perl are you running ? Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon Jun 02 21:18:33 2014: Request 95809 was acted upon. Transaction: Correspondence added by trueability@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Mon, 2 Jun 2014 08:35:55 -0400 "sisyph...@optusnet.com.au via RT" wrote: > I didn't know that. (You already know more about Inline than I do.) All I know is just from what I've seen while digging around, trying to get an understanding of how the MakeMaker stuff works :) > > There is another attribute, $mm->{PMLIBDIRS} that contains a list > > of directories those modules reside in. I added some code to use > > those two lists to generate the rules to add to the makefile > > without having to scan for modules ourselves. > > Didn't know that, either. > Yours is therefore probably a smarter solution than the one I > envisaged. Mine is a solution that hacks (solely) I::MM to recurse > thru the 'lib' directory and locate all of the *.pm files (using > File::Find). My hope was that if we could use what EU::MM already located that we would support the same code as EU:MM. It appears to me that one can change the PMLIBDIRS in the Makefile.PL and so assuming 'lib' is the only directory that would contain modules is a bad assumption. Obviously I'd like to stay away from assumptions where I can! > > However, with your patch, for the distro you provided, I'm getting: > > ## > C:\_32\pscrpt\Foo-broken>perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for Foo > Writing MYMETA.yml and MYMETA.json > > C:\_32\pscrpt\Foo-broken>dmake > cp lib/Foo/Bar/Baz.pm blib\lib\Foo\Bar\Baz.pm > cp lib/Foo.pm blib\lib\Foo.pm > cp lib/Foo/Bar.pm blib\lib\Foo\Bar.pm > C:\MinGW\Perl516\bin\perl.exe -Mblib -MInline=NOISY,_INSTALL_ > -MFoo::Bar::Baz -e1 2.01 blib\arch > validate Stage > Starting Build Preprocess Stage > get_maps Stage > Finished Build Preprocess Stage > > Starting Build Parse Stage > Finished Build Parse Stage > > Starting Build Glue 1 Stage > Finished Build Glue 1 Stage > > Starting Build Glue 2 Stage > Finished Build Glue 2 Stage > > Starting Build Glue 3 Stage > Finished Build Glue 3 Stage > > Starting Build Compile Stage > Starting "perl Makefile.PL" Stage > Finished "perl Makefile.PL" Stage > > Starting "make" Stage > Finished "make" Stage > > Starting "make install" Stage > Finished "make install" Stage > > Starting Cleaning Up Stage > Finished Cleaning Up Stage > > Finished Build Compile Stage > > Can't open for output. > > > at C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 9. > BEGIN failed--compilation aborted at > C:\_32\pscrpt\Foo-broken\blib\lib/Foo/Bar/Baz.pm line 15. > Compilation failed in require. > BEGIN failed--compilation aborted. > dmake: Error code 255, while making 'Foo-Bar-Baz.inl' > > C:\_32\pscrpt\Foo-broken> > ## > > This might just be *my* mistake ... I might have messed something up. > (I don't think so but.) > I'll have to check again tomorrow night. > > What version of perl are you running ? Hrm that's strange.. I don't see that but at this point I have enough versions of various distributions that I'm not sure if I'm testing against the same thing you are! I tried to replicate that error but it seems to work for me. I'm running perl 5.18.1 under gentoo linux (custom perl compile, not using the gentoo package). You? So to try to make sure we're on the same page, I've uploaded a couple things (see below for link). I'd like to get the distribution you're testing against and maybe the Inline source you're using that is failing so I can see if I can make it happen too. http://cac.parasite.cc/~slam/Inline In that directory you will find a few things: Foo-fixed.tar.gz - this was one you attached that is working with the patch Foo-mjm.tar.gz - this (I belive) is the one I initially submitted to you, and it is working with the patch for me Inline-mjm.tar.gz - this is the source I'm using that I built the patch from. This is a snapshot of the mercurial repo I'm using Inline-mjm/ - directory of Inline-mjm.tar.gz extracted I've also made available the mercurial repo I'm using: http://cac.parasite.cc:8000 it has two branches" 'default' which is the baseline Inline-0.55 code I started with 'mjm' which is the branch with my changes applied you can clone the repo via: hg clone http://cac.parasite.cc:8000 Inline if you do that and wnat to see my code, you'll need to change to the mjm branch hg update -C mjm If you send me what you're testing with I'll try it out too and hopefully I can reproduce the error so I can fix it! Thanks, Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT http://cac.parasite.cc/~slam/Inline Kept getting a gateway timeout error. I'll install mercurial and check it out that way (when I get a chance). For the Foo distro I'm currently using: http://www.sisyphusion.tk/scratch/Foo-broken.tar.gz For the Inline version I'm using: http://www.sisyphusion.tk/scratch/Inline-0.55-patched.tar.gz (I believe it's just Inline-0.55 with your most recent patch applied.) And with those Foo and Inline versions, I'm getting the "Can't open for output." error mentioned in my previous post. I'm on MS Windows 7 and my make flavour is 'dmake'. I've tested on both 5.16.0 and 5.18.0 - same error. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Tue Jun 03 04:36:36 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > http://cac.parasite.cc/~slam/Inline Kept getting a gateway timeout error. I'll install mercurial and check it out that way (when I get a chance). For the Foo distro I'm currently using: http://www.sisyphusion.tk/scratch/Foo-broken.tar.gz For the Inline version I'm using: http://www.sisyphusion.tk/scratch/Inline-0.55-patched.tar.gz (I believe it's just Inline-0.55 with your most recent patch applied.) And with those Foo and Inline versions, I'm getting the "Can't open for output." error mentioned in my previous post. I'm on MS Windows 7 and my make flavour is 'dmake'. I've tested on both 5.16.0 and 5.18.0 - same error. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Tue Jun 03 08:36:25 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Tue, 3 Jun 2014 04:36:36 -0400 "sisyph...@optusnet.com.au via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > -Original Message- > From: Jason McCarver via RT > > > http://cac.parasite.cc/~slam/Inline > > Kept getting a gateway timeout error. > I'll install mercurial and check it out that way (when I get a > chance). I had to fix a broken DNS record for that server last night, hopefully that was the problem and if so it should work soon (2014-06-03 8:00pm CST, 2014-06-04 1:00am UTC). > > For the Foo distro I'm currently using: > http://www.sisyphusion.tk/scratch/Foo-broken.tar.gz > > For the Inline version I'm using: > http://www.sisyphusion.tk/scratch/Inline-0.55-patched.tar.gz > > (I believe it's just Inline-0.55 with your most recent patch applied.) > > And with those Foo and Inline versions, I'm getting the "Can't open > for output." error mentioned in my previous post. > > I'm on MS Windows 7 and my make flavour is 'dmake'. I've tested on > both 5.16.0 and 5.18.0 - same error. I'll give yours a try tonight and see if I can replicate the problem. I do have a windows 7 machine (I've never installed perl on windows though) so maybe I can try it there too. Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT It looks like a line of the patch was applied to the wrong location in Inline.pm. Sorry 'bout that. Fixing it takes care of the problem. Hopefully we're getting close! :) I think so. One thing I have noticed is that, for the distro we're looking at, if the Foo module loads (uses) Foo::Bar and Foo::Bar::Baz, then the Foo.inl target never gets met. This results in Inline compiling the C code for each of 'make', 'make test' and 'make install'. Just insert a: use Foo::Bar; use Foo::Bar::Baz; in Foo.pm, and rebuild - you should see what I mean. Not sure why Foo.inl never appears under that scenario ... haven't had time to even think about it. It doesn't matter greatly because 'make install' still installs exactly what we want it to install - and no future compilation occurs. Do you want to do anything about that aspect ? I'm not greatly fussed - if you don't want to do anything about it, just let me know and I'll push out a new devel release (0.55_01) that includes the patches to Inline.pm and MakeMaker.pm that you've already provided. (It can always be addressed at a later stage.) But if you do want to do something about that (and presently have the time) then I'll wait for the additional patch before I release 0.55_01. Thanks for the work you've done !! Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Wed Jun 04 05:11:58 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > It looks like a line of the patch was applied to the wrong location in > Inline.pm. Sorry 'bout that. Fixing it takes care of the problem. > Hopefully we're getting close! :) I think so. One thing I have noticed is that, for the distro we're looking at, if the Foo module loads (uses) Foo::Bar and Foo::Bar::Baz, then the Foo.inl target never gets met. This results in Inline compiling the C code for each of 'make', 'make test' and 'make install'. Just insert a: use Foo::Bar; use Foo::Bar::Baz; in Foo.pm, and rebuild - you should see what I mean. Not sure why Foo.inl never appears under that scenario ... haven't had time to even think about it. It doesn't matter greatly because 'make install' still installs exactly what we want it to install - and no future compilation occurs. Do you want to do anything about that aspect ? I'm not greatly fussed - if you don't want to do anything about it, just let me know and I'll push out a new devel release (0.55_01) that includes the patches to Inline.pm and MakeMaker.pm that you've already provided. (It can always be addressed at a later stage.) But if you do want to do something about that (and presently have the time) then I'll wait for the additional patch before I release 0.55_01. Thanks for the work you've done !! Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Thu Jun 05 00:00:57 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > I think I'd like to look into that problem. May be over the weekend before I have a chance though. If you're wanting to release quickly that's fine too. Thank you for being so receptive and offering help!
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Thu Jun 05 03:55:25 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > I think I'd like to look into that problem. May be over the weekend > before I have a chance though. I'm in no great hurry, so I'll wait until we get this sorted. (Sorry that I'm not being more helpful - I have a rather full schedule already for the next couple of weeks.) Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT I think I'd like to look into that problem. May be over the weekend before I have a chance though. I'm in no great hurry, so I'll wait until we get this sorted. (Sorry that I'm not being more helpful - I have a rather full schedule already for the next couple of weeks.) Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Jason McCarver via RT I think I'd like to look into that problem. May be over the weekend before I have a chance though. I think there's another hiccup, too. Using the patched Inline-0.55, the demo module in modules/Math/Simple (in Inline-0.55 source) then fails to build as there's no "# --- MakeMaker inline section" written into the generated Makefile. It would be nice if we can get the behaviour we want for the "lib" layout without breaking that Math::Simple demo ;-) Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sun Jun 08 09:18:53 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Jason McCarver via RT > I think I'd like to look into that problem. May be over the weekend > before I have a chance though. I think there's another hiccup, too. Using the patched Inline-0.55, the demo module in modules/Math/Simple (in Inline-0.55 source) then fails to build as there's no "# --- MakeMaker inline section" written into the generated Makefile. It would be nice if we can get the behaviour we want for the "lib" layout without breaking that Math::Simple demo ;-) Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon Jun 09 22:45:21 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > Ok I'll check into that too :). Now I just have to find some time this week...
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Fri Jun 13 15:17:55 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Fri, 13 Jun 2014 06:29:44 -0400 "Sisyphus via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > How about the attached version of lib/Inline/Makemaker.pm ? > > It seems to do things right for me on Windows. It's funny, that's very close to what I had done a couple days ago but just hadn't had the time to submit to you. I've included your fix to checking the $mm->{PMLIBDIRS} array and attached my version. I believe yours will work too. Mine is slightly different, see which you like better. Neither (I believe) fix the issue of having something like Foo 'use'ing other modules that use Inline and then them being compiled multiple times. But after looking a bit I believe that one is going to be a challenge (at least for me!) to figure out... I'll have to dig into Inline some more. Unless some other bug pops up I'm thinking your or my latest code will probably work! Sorry for the delayed response. Life gets in the way sometimes :) Thanks, Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Sun Jun 15 17:55:25 2014: Request 95809 was acted upon. Transaction: Correspondence added by s...@parasite.cc Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > On Sun, 15 Jun 2014 00:25:16 -0400 "Sisyphus via RT" wrote: > https://rt.cpan.org/Ticket/Display.html?id=95809 > > > Sub satisfy_makefile_dep() would perhaps be better placed in MakeMaker.pm but > I don't see any imperative to move it there - especially since it's doing > stuff that was already being done in Inline.pm (as you noted). I hadn't really thought about that. I guess I could see it in either place, but if it's moved to MakeMaker, then MakeMaker will have to be included in the command run by the generated Makefile which right now only includes Inline. I guess in that sense it made sense for it to remain in the Inline module since it's code that's being using when Inline is in _INSTALL_ mode, not while it's generating the Makefile when perl Makefile.PL is run. Or something. :) > I'll get Inline-0.55_01 out in the next week, and we'll see how it goes. > > Thanks for your work !! Sounds great! I enjoyed working with you on this, thanks for all the help and input... Jason
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
-Original Message- From: Ed J via RT Sent: Monday, June 23, 2014 11:12 AM Forgive my ignorance, including of MakeMaker - would it be possible to make a test for the generality of building a module, by installing it into a temporary directory, probably under /tmp? This would probably require using something like SITE_INSTALL? If that's right, let me know (or correct me), and I'll knock something up. There's now modules/Math-Simple-1.23 and modules/Boo-2.01 that ship with the Inline source. (They're laid out differently - which is the reason that there's *two* modules.) I'm thinking along the lines that the test could be constructed so that we: 1) cd to modules/Math-Simple-1.23; 2) check that 'perl -Mblib Makefile.PL INSTALL_BASE=../../_Inline_test' succeeds; 3) check that '$Config{make} test' succeeds; 4) check that '$Config{make} install' succeeds; 5) check that '$Config{make} realclean' succeeds; and do the same for modules/Boo-2.01. I was thinking that could be done via system commands, but I'm not sure if that's such a good idea given the odd configurations that some smokers seem to come up with. Anyway, then we can rely on 'make clean' to clean up the installed modules (since it already cleans up the _Inline_test directory). Trying to find the temporary directory seems messy to me - though File::Spec probably helps out. Since we already know that _Inline_test is writable, why not install the modules into there and let 'make clean' remove them ? I don't regard such tests as critical (obviously), but they would be a useful addition to the test suite , imo - irrespective of precisely *how* you choose to implement them. Cheers, Rob
Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
Mon Jun 23 11:06:50 2014: Request 95809 was acted upon. Transaction: Correspondence added by sisyph...@optusnet.com.au Queue: Inline Subject: Re: [rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: s...@parasite.cc Status: open Ticket https://rt.cpan.org/Ticket/Display.html?id=95809 > -Original Message- From: Ed J via RT Sent: Monday, June 23, 2014 11:12 AM > Forgive my ignorance, including of MakeMaker - would it be possible to > make a test for the generality of building a module, by installing it into > a temporary directory, probably under /tmp? This would probably require > using something like SITE_INSTALL? If that's right, let me know (or > correct me), and I'll knock something up. There's now modules/Math-Simple-1.23 and modules/Boo-2.01 that ship with the Inline source. (They're laid out differently - which is the reason that there's *two* modules.) I'm thinking along the lines that the test could be constructed so that we: 1) cd to modules/Math-Simple-1.23; 2) check that 'perl -Mblib Makefile.PL INSTALL_BASE=../../_Inline_test' succeeds; 3) check that '$Config{make} test' succeeds; 4) check that '$Config{make} install' succeeds; 5) check that '$Config{make} realclean' succeeds; and do the same for modules/Boo-2.01. I was thinking that could be done via system commands, but I'm not sure if that's such a good idea given the odd configurations that some smokers seem to come up with. Anyway, then we can rely on 'make clean' to clean up the installed modules (since it already cleans up the _Inline_test directory). Trying to find the temporary directory seems messy to me - though File::Spec probably helps out. Since we already know that _Inline_test is writable, why not install the modules into there and let 'make clean' remove them ? I don't regard such tests as critical (obviously), but they would be a useful addition to the test suite , imo - irrespective of precisely *how* you choose to implement them. Cheers, Rob