in reply to Re: Issues with first module build
in thread Issues with first module build

Ken, thanks! I've put the code into code tags. As an experiment, I created a totally new module and it seems to have the same issue issue with the MANIFEST.SKIP.

module-starter --version #module-starter v1.77 module-starter -mb --module test_module_starter

MANIFEST.SKIP.bak

cat MANIFEST.SKIP.bak

I then

cd test_module_starter/ cp MANIFEST.SKIP.bak MANIFEST.SKIP ./Build disttest

Perl Info

perl -V

Chronicler: The Domici War (domiciwar.net)

General Ne'er-do-well (github.com/LeamHall)

Replies are listed 'Best First'.
Re^3: Issues with first module build
by kcott (Archbishop) on Jan 05, 2021 at 18:32 UTC

    I use Module::Starter, via the module-starter script, but I don't use Module::Build (I use ExtUtils::MakeMaker). I became very curious about all of these anomalies, so I decided to try the commands that you've shown for myself.

    I upgraded modules, where necessary, to the latest versions:

    $ perl -E 'use Module::Starter; say $Module::Starter::VERSION' 1.77 $ perl -E 'use Module::Build; say $Module::Build::VERSION' 0.4231

    I pared down my ~/.module-starter/config to an absolute barebones version:

    ken@titan ~/.module-starter $ cat config author: Ken Cotterill email: kcott@cpan.org

    I created a fresh directory, ~/tmp/pm_11126324, for my tests. I then ran the commands you show.

    ken@titan ~/tmp/pm_11126324 $ module-starter --version module-starter v1.77 ken@titan ~/tmp/pm_11126324 $ module-starter -mb --module test_module_starter Added to MANIFEST: Build.PL Added to MANIFEST: Changes Added to MANIFEST: lib/test_module_starter.pm Added to MANIFEST: MANIFEST Added to MANIFEST: README Added to MANIFEST: t/00-load.t Added to MANIFEST: t/manifest.t Added to MANIFEST: t/pod-coverage.t Added to MANIFEST: t/pod.t Added to MANIFEST: xt/boilerplate.t Created starter directories and files ken@titan ~/tmp/pm_11126324 $

    So, I don't see any of the initial lines that you show:

    Created test_module_starter Created test_module_starter/lib Created test_module_starter/lib/test_module_starter.pm Created test_module_starter/t Created test_module_starter/t/manifest.t Created test_module_starter/t/00-load.t Created test_module_starter/t/pod.t Created test_module_starter/t/pod-coverage.t Created test_module_starter/xt Created test_module_starter/xt/boilerplate.t Created test_module_starter/Build.PL Created test_module_starter/Changes Created test_module_starter/README Regenerating MANIFEST Can't find dist packages without a MANIFEST file Run 'Build manifest' to generate one WARNING: Possible missing or corrupt 'MANIFEST' file. Nothing to enter for 'provides' field in metafile. Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'test_module_starter' version '0.01' File 'MANIFEST.SKIP' does not exist: Creating a temporary 'MANIFEST.SK +IP'

    There would appear to be a bug in Module::Build in that it reports "Added to MANIFEST: xt/boilerplate.t" but either that didn't happen or that line was subsequently removed:

    ken@titan ~/tmp/pm_11126324 $ cat test_module_starter/MANIFEST Build.PL Changes lib/test_module_starter.pm MANIFEST This list of files README t/00-load.t t/manifest.t t/pod-coverage.t t/pod.t

    I had a look in "Active bugs for Module-Build" but couldn't see anything related to this. There are multiple screenfuls of active bugs, so I may have missed it; also, that many active bugs does not fill me with confidence about this module in general.

    It may be that you're attempting to create your module in a directory that's filled with files from previous attempts. That could account for all the extra messages that you reported. Try creating a fresh, empty directory and start again from scratch.

    Also look in your ~/.module-starter/config and see what's there that could be causing issues. Do you, perhaps, have a template_dir: line which is causing your directory to be populated with problem files.

    Your cp MANIFEST.SKIP.bak MANIFEST.SKIP command looks wrong to me. Normally, you copy a file to a backup version; not the other way around.

    I looked at the "Module::Build: ACTIONS: test" documentation. It does not appear to recursively work through the t/ directory:

    "Tests can be defined in the standard places: a file called test.pl in the top-level directory, or several files ending with .t in a t/ directory."

    You may be able to use the --test_files argument to do what you want. I haven't tested this.

    Also look at "Module::Build: SEE ALSO". There are a number of links there that might be useful for you (e.g. the Cookbook). I didn't look at any of these.

    Finally, you might consider using ExtUtils::MakeMaker instead of Module::Build. That's what I use for both personal projects and $work: I've never had any of the sort of issues that you're reporting.

    — Ken

      Ken, I tried a different solution; creating the module as a totally different user. That changes the results greatly, so my bet is that in some previous digging into module building I read some page and modified things I've long forgotten about.

      I'll give ExtUtils::MakeMaker a look.

      Chronicler: The Domici War (domiciwar.net)

      General Ne'er-do-well (github.com/LeamHall)

        ....and modified things I've long forgotten about.

        some environment stuff? PATH? PERL5LIB?

        perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re^3: Issues with first module build
by kcott (Archbishop) on Jan 05, 2021 at 16:12 UTC

    Thanks for adding the code tags.

    The reason I asked you to use -vet with cat, was to locate characters that were not immediately obvious but could affect the regex.

    Compare

    $ cat rogue_char_test qwerty asdfgh zxcvbn

    with

    $ cat -vet rogue_char_test qwerty $ asdfgh^I$ zxcvbn^N$

    On a different note, your MANIFEST.SKIP.bak file has regexes for MSWin-style files (e.g. *.bat and *.com) but your perl -V indicates a Linux(Debian) installation. Did you perhaps copy files from another OS onto your Linux OS? Were the modules you have on your Linux OS installed on that OS (with package manager, cpan or similar utility, or manual build from source)?

    — Ken

Re^3: Issues with first module build
by stevieb (Canon) on Jan 05, 2021 at 09:04 UTC

    Change into the distribution's root directory, then post here (in code tags) the output of perl t/manifest.t.

    Those path names shouldn't be absolute, and if they're being interpreted as such for some reason, the word boundary of the regex will definitely not match.

      Not a lot of info:

      perl t/manifest.t 1..0 # SKIP Author tests not required for installation

      Addendum: More info

      export RELEASE_TESTING=1; perl t/manifest.t 1..1 not ok 1 # Failed test at /usr/local/share/perl/5.30.0/Test/CheckManifest.pm +line 190. # got: 0 # expected: 1 # The following files are not named in the MANIFEST file: /home/leam/t +mp/test_module_starter/MANIFEST.SKIP, /home/leam/tmp/test_module_star +ter/MANIFEST.SKIP.bak # MANIFEST: /home/leam/tmp/test_module_starter/MANIFEST # Looks like you failed 1 test of 1.

      Chronicler: The Domici War (domiciwar.net)

      General Ne'er-do-well (github.com/LeamHall)

        Looks like you need to add ^MANIFEST\. to the contents of MANIFEST.SKIP.


        🦛

        It looks like distcheck isn't honouring the MANIFEST.SKIP file. Let ./Build test be enough. The t/manifest.t tests check the MANIFEST anyway, and it appears it does so properly.

        Just add MANIFEST.SKIP to MANIFEST as hippo said, or do a ./Build manifest.

        I misread the code when I wrote the below. Now, I'm unsure why MANIFEST.SKIP isn't being used. Nonetheless, my above post stands.

        Module::Build::distcheck() in a round about way has this line: $self->_check_manifest_skip unless $self->invoked_action eq 'distclean';. That means the MANIFEST.SKIP file is not being used when the distcheck command is run.

        Add MANIFEST to the MANIFEST.SKIP as hippo suggested, and just let ./Build test be enough... it verifies whether MANIFEST is up-to-date with the t/manifest.t file anyway.