Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

What is ignore.txt

by Bod (Vicar)
on Jun 08, 2023 at 17:47 UTC ( #11152699=perlquestion: print w/replies, xml ) Need Help??

Bod has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to 'properly' build AI::Embedding and publish the next development version to CPAN. So, as kcott suggested, I have turned on RELEASE_TESTING and I am running the tests using prove. My user tests are now passing but I am stuck on the author tests.

Attempting to prove -vb t/manifest.t I get the following error:

not ok 1# The following files are not named in the MANIFEST file: C:\U +sers\user\Perl\AI-Embedding\AI-Embedding\ignore.txt, C:\Users\user\Pe +rl\AI-Embedding\AI-Embedding\t\01-openai.t, C:\Users\user\Perl\AI-Emb +edding\AI-Embedding\xt\boilerplate.t
All these files were created by Module::Starter.

What is ignore.txt used for and does it need to be added to the manifest file?

What is a xt directory for? Can I ignore or delete it?

For slightly later, once I've built the module, should I delete the blib directory before make dist?

Also, because I have AI::Embedding v0.1_1 installed, I had to add use lib 'lib'; to the test files to make the tests use the right version of the module. Will this create difficulties if it is left in when the module gets uploaded to CPAN?

Replies are listed 'Best First'.
Re: What is ignore.txt
by hippo (Bishop) on Jun 08, 2023 at 18:05 UTC
    What is a xt directory for? Can I ignore or delete it?

    xt is for eXtra Tests - tests which are not run as a matter of course can go in here. You may well not have any so you can happily either ignore or delete. It's easy to re-create if you decide you want it later on.

    For slightly later, once I've built the module, should I delete the blib directory before make dist?

    make clean should take care of that for you - no need to do it by hand.

    I had to add use lib 'lib'; to the test files to make the tests use the right version of the module.

    How are you running the tests? make test should use this lib path (actually blib/lib) by default. prove has a -l option which takes care of that for you also.

    PS. to answer the question in the title, ignore.txt is a generic version control ignore list. This is detailed in the POD for Module::Starter.


    🦛

      Thanks you hippo - that's got me much further :)

      ignore.txt is a generic version control ignore list. This is detailed in the POD for Module::Starter

      Well...it only seems to say it creates it by default.

      That doesn't help with the error I'm getting

      # The following files are not named in the MANIFEST file: C:\Users\use +r\Perl\AI-Embedding\AI-Embedding\ignore.txt
      As I'm not using any kind of version control (I don't think I am), should I get rid of the file or do I need to add it to the manifest file?

        I strongly second hippo's recommendation that you version control your code. It seems a bit over the top for a lone shark developer to do that, but if you commit frequently it can save you from brain farts, cats, dogs and small children interacting with your keyboard in unfortunate ways, acts of nature, hard drive failures, ...

        Really, spin up a git repo somewhere in the cloud and git committing. Not tomorrow, or the day after -today is the day to do it! (Says he who has been bitten more than once!)

        Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        You can also add the file to MANIFEST.SKIP, which is the ignore list. Every file or directory in your development directory should be either in MANIFEST (and be shipped) or in MANIFEST.SKIP.

        If you are not using it, just get rid of it. I would never ship any file relating to version control in the dist so would not add it to the MANIFEST. The only files needed in the dist are those which a user requires in order to build, test and install the dist.

        That said, it will be worth your while to look into using version control sooner or later. You've started using git for other tasks so maybe you could think about putting this code into a git repo also?


        🦛

Re: What is ignore.txt
by kcott (Archbishop) on Jun 08, 2023 at 21:27 UTC
Re: What is ignore.txt
by Discipulus (Canon) on Jun 09, 2023 at 10:01 UTC
    Hello Bod,

    from my step-by-step-tutorial-on-perl-module-creation-with-tests-and-git

    > Let's examine the remaining two files. What is ignore.txt? It was created as default ignore list by module-starter and it contains many lines of regexes. If we want module-starter to create MANIFEST.SKIP instead, next time we'll use it specify --ignores='manifest' For the moment we can delete it.

    Also What are the files in a CPAN distribution?

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11152699]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-09-22 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?