in reply to Re^2: testing/release advice [was: Stopping tests]
in thread Stopping tests

Bod,

I looked into the META files issue a bit more.

I couldn't find the old post that your "META" comment reminded me of, exactly. (It may have been Re^3: What to test in a new module, but that was you calling it "META files" when it was actually talking about the META_MERGE parameter to MakeMaker, which defines some of the info that goes into the META.json/yml files. I thought maybe you had mentioned that copy back-and-forth before, but I cannot find it when I search your recent posts with "META". or it could just be that when you made the comment in this discussion, my mind invented a vague memory of some previous comment by you about having to do weird copy of META files. Sorry if my last post had a reply to a figment of my imagination.)

So I actually downloaded your repo, and went through the standard incantation:

perl Makefile.PL gmake disttest gmake dist
... I ran that with RELEASE_TESTING not set and with set RELEASE_TESTING=1 -- both passed° the disttest, and the distro .tar.gz that was created by gmake dist correctly included the META.json/yml files.

I then looked at the Re: What do I use to release a module to CPAN for the first time? post you linked to, and saw that step13 claimed you needed to copy the META.json/yml files to your main directory and manually adding those two files to the MANIFEST before doing the gmake dist : all of my experience and my experiments today say that is unnecessary. If I just follow the incantation above, then look in the .tar.gz, the META.json/yml are properly there -- I did't have to copy those files. Follow the standard incantation yourself, and see if you can see those files were properly created: if they do get created, then you can skip step 13 in your future releases, saving you time and effort. If not, please show the output from your sequence that you follow, and show the contents of the .tar.gz that is created.


°: where it "passed" all the tests except for the md5 hash tests (which I disabled, because they fail on my local PC as well) -- but the release-only tests were properly skipped when RELEASE_TESTING was not set, and properly passed with RELEASE_TESTING=1 ...

Replies are listed 'Best First'.
Re^4: testing/release advice [was: Stopping tests]
by Bod (Parson) on Sep 13, 2023 at 21:46 UTC
    Follow the standard incantation yourself, and see if you can see those files were properly created

    Done!
    And it seems to work fine 😃

    META.json/yml are missing from the working directory but presence in the .tar.gz file. Only MYMETA.json/yml are in the working directory but they appear to have the same contents...

    { "abstract" : "Crop and resize an image to create a square image", "author" : [ "Ian Boddison <bod@cpan.org>" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.58, CPAN::Meta::Con +verter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Image-Square", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Carp" : "1.45", "GD" : "2.13", "perl" : "5.010" } }, "test" : { "requires" : { "Test::More" : "0" } } }, "release_status" : "unstable", "version" : "0.01_4", "x_serialization_backend" : "JSON::PP version 4.06" }

    That's from my local copy before the GitHub META_MERGE PR

      The MYMETA files are created by perl Makefile.PL and are cleaned up by the gmake clean that you do at the end; they don't need to be in the distro itself (which is why gmake dist doesn't include them)
      No-one else mentioned this: don't put "author" or "release" tests in t. An environment variable is not an adequate guard. Put them in xt and run them yourself before making a release (and in a job on your CI so you catch anything that breaks them immediately).