Skip Menu |

This queue is for tickets about the File-ShareDir CPAN distribution.

Report information
The Basics
Id: 100641
Status: rejected
Priority: 0/
Queue: File-ShareDir

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc: dagolden [...] cpan.org
ether [...] cpan.org
perl [...] pied.nu
gwyn [...] cpan.org
rjbs [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.102
Fixed in: (no value)



Subject: Remove File::ShareDir::Install from build_requires
File::ShareDir::Install is currently (1.102) marked as a build_requires in Makefile.PL.

But it is used only for the deployement of share/sample.txt and share/subdir/sample.txt. Those two files are only used for testing in t/02_main.t. I think that such testing code should be in File::ShareDir::Install, not in File::ShareDir.
So, by refactoring the testing code, it should be possible to not depend at all on File::ShareDir::Install.
This would help to reduce the number of modules bundled by packaging tools such as Carton. This would also remove the dependency cycle that has been resolved by bundling File::ShareDir::Install in inc/.

If I work on this refactoring, does it have a chance of being merged?

-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
NIH is not a valid pattern. Some refactoring might be useful to degrade it to test_requires - but the entire approach is "make my life simpler by increasing your maintenance effort".
Le 2014-12-01 17:52:40, REHSACK a écrit :
Show quoted text
> NIH is not a valid pattern.
>
> Some refactoring might be useful to degrade it to test_requires - but
> the entire approach is "make my life simpler by increasing your
> maintenance effort".

My point is that:
- File::ShareDir tests should ensure non regression: they should ensure that F::SD is always looking for the files at the same place
- File::ShareDir::Install tests should ensure that F::SD::I is installing files where F::SD is expecting them.

In the current situation it seems that F::SD checks it is consistent with where F::SD::I installed them (but it doesn't even checks if this is really the files installed from this distribution, by looking at a version number in the file content for example).
I find awkward that F::SD relies on F::SD::I (which is just compatibility testing) instead of a proper regression testing.

-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
I still think you're trying to solve a chicken-egg problem by reversing it to egg-chicken. There're 2 possible solutions (speaking as maintainer of File::ConfigDir and File::ConfigDir::Install, too): 1) Bundling the modules caveat: The infrastructure helpers are deployed as runtime dependencies into production environments (see App::Cmd::Tester, MooX::Cmd::Tester - works but dirty) 2) Refactor tests and modules to allow *::Install to install into final computed locations. This might get very complicated for the way how File::ShareDir works (because it doesn't use $(sharedstatedir)/"Module" but $(dirname Module)/share) - see https://www.gnu.org/prep/standards/html_node/Directory-Variables.html or alike) Cheers