Coder Social home page Coder Social logo

app-modulebuildtiny's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

app-modulebuildtiny's Issues

Support minting a distribution

Currently there is no support for minting distributions. This would need to support:

  • Module file(s)
  • Changes
  • MANIFEST.SKIP

And maybe README too (#10)

Empty directory should be clearer about what is failing

mkdir /tmp/mbt-test
cd /tmp/mbt-test
mbtiny dist
# Can't call method "pod" on an undefined value at /home/kent/perl5/perlbrew/perls/5.24.0-RC5/lib/site_perl/5.24.0/App/ModuleBuildTiny.pm line 110.

I think the right thing to do here would be to assert that $filename on line 106 is expected to exist,
as nothing really works without that, and subsequent failures in said file generate fatal errors anyway.

Symlink handling undefined, leads to Win32 unfriendly tars

See kentnl/CPAN-Testers-TailLog#3

I have the shortcut:

lib/Foo.pm
README.pod -> lib/Foo.pm

In order to convince Github to render Foo.pm as the README

This is apparently a viable hack on Dzil because Dzil converts symlinks to their contents.

But AMBT seems to preserve symlinks as-is.

curl -sLk https://cpan.metacpan.org/authors/id/K/KE/KENTNL/CPAN-Testers-TailLog-0.001001.tar.gz | tar -zvt  | grep -i READ 
lrwxr-xr-x kent/kent         0 2016-08-22 23:29 CPAN-Testers-TailLog-0.001001/README.pod -> lib/CPAN/Testers/TailLog.pm

Add proper license support

Currently it is hard-coded to use the perl license, this is suboptimal. It should probably be detected from the source much like [LicenseFromModule] does. It should probably also be able to generate a LICENSE file.

Add tests

Currently ambt doesn't have any end-user tests beyond compilation tests

`mbtiny generate` writes files with double encoding to UTF-8

While doing gugod/Hijk#26 for the CPAN PRC, the META.* files generated by mbtiny generate write bad output for Ævar's name, for example in META.yml:

author:
  - 'Kang-min Liu <[email protected]>'
  - "Ã�\x86var ArnfjÃ�¶rÃ�° Bjarmason <[email protected]>"
  - 'Borislav Nikolov <[email protected]>'
  - 'Damian Gryski <[email protected]>'

I've confirmed that both the source 'Hijk.pm' is in Unicode:

$ file lib/Hijk.pm 
lib/Hijk.pm: Perl5 module source, UTF-8 Unicode text

and it has =encoding utf8 in its pod.

Full context in gugod/Hijk#26 (review)

mbtiny regenerate includes $DISTNAME-$VERSION.tar.gz in MANIFEST

mbtiny dist 
mbtiny regenerate

->

MANIFEST now contains Some-Dist-Name-0.001.tar.gz

This is typically undesirable, and should either

  • not happen at all by default
  • give some kind of warning that this is happening and point out what file to augment to fix it.

"Changes appears to be empty" ... not.

Here's a reduced set of a Changes file I think should parse, but completely doesn't, and the error is not exactly enlightening.

0.048
- Asdf
mbtiny dist
# Changes appears to be empty

Optionally write out a config file

When I do this:

mbtint mint Some::Dist

I see this:

What is the author's name? Curtis "Ovid" Poe
What is the author's email? [email protected]
What license do you want to use? [Perl_5]

It would be nice if it then prompted you to allow it to write out a config file with this information so that you no longer had to re-enter this information.

Add support for merging in META information

As discussed on IRC, it would be handy to be able to specify other META information which could be merged into the META.* files. While Module::Metadata can detect some things, others, like repository/website information or no_index would be too hard to heuristically extract in any reasonable way.

We have discussed using an external file. I originally proposed a perl file which could be do-loaded and then merged. @Leont has stated a preference for json, though the meta-spec version would have to be specified as a key. @dagolden has stated that CPAN::Meta::Merge could default to the most current version of CPAN::Meta, which would ease that somewhat, though the user should be encouraged to specify the version to avoid breakage later.

Meta data from .pod file

Please support reading the meta data from the .pod file, not just the .pm file. Maybe have a --pod option to request this.

Multiple licenses

Version 2 of the CPAN Meta Spec specifies the license fields as a list and includes an example with more than 1 license. Currently, this module only allows 1 license.

Add a contributing document

We currently don't have an overview of how to contribute to this project, even if it should be mostly obvious.

Invalid links to helper scripts

scan_prereqs_cpanfile should be scan-prereqs-cpanfile. perl-reversion is an example script which is no longer indexed and uses the version rules of Perl::Version which are not quite the same as version.pm, perl-bump-version or perl-rewrite-version could be referenced instead.

Symlinks removed instead of followed

Given the fix in #30 , the resulting tarball ends up with no file.

readlink README.pod 
# lib/Acme/Beamerang/ArgParser.pm
mbtiny dist && tar -tf Acme-Beamerang-ArgParser-0.001000.tar.gz | grep -i READ
# <no output>
mbtiny distdir && ls -la Acme-Beamerang-ArgParser-0.001000/ | grep -i READ
# <no output>

Lack of $VERSION in .pm file gives cryptic error

 $ mbtiny regenerate                                                                                                
Can't call method "stringify" on an undefined value at /usr/local/lib64/perl5/5.22.1/App/ModuleBuildTiny.pm line 112.

I suspect

            my $version = $data->version($data->name)->stringify;

Where ->version returns 'undef' to be the culprit.

A good error would be

"Cannot parse \$VERSION from $filename"

Falls afoul the dreaded legacy + different version requirements => Wrong result

requires 'Term::ANSIColor';
on test => sub {
   requires 'Term::ANSIColor' => '2.01';
};
perl = 5.8.9
PERL5_CPANPLUS_IS_RUNNING = 24999
PERL5_CPANPLUS_IS_VERSION = 0.9156
      Module Name                        Have     Want
      Log::Contextual                0.007000        0
+     Term::ANSIColor                    1.12        0
      Test::Differences                  0.64        0
      Test::More                     1.001014     0.89

:(

Term::ANSIColor version 2.01 required--this is only version 1.12 at t/examples/clan.t line 6.
BEGIN failed--compilation aborted at t/examples/clan.t line 6.

Cannot parse $VERSION from... in newly minted module

mbtiny mint Test::MBTinyTest --dirname=test-mbtinytest

results in

Cannot parse $VERSION from lib/test/mbtinytest.pm at <snip>.perlbrew/libs/perl-5.30.3@doseme/lib/perl5/App/ModuleBuildTiny/Dist.pm line 238.

Trying again:

cd test-mbtinytest
mbtiny regenerate

Again, you get:

Cannot parse $VERSION from lib/test/mbtinytest.pm at <snip>.perlbrew/libs/perl-5.30.3@doseme/lib/perl5/App/ModuleBuildTiny/Dist.pm line 238
cat lib/test/mbtinytest.pm

Version is there. Error persists even if set to 0.001, which is supposed to be the default.

package Test::MBTinyTest;

use strict;
use warnings;

our $VERSION = '0.000';

1;

__END__

=pod
<snip>

uninit value at App/ModuleBuildTiny.pm line 57

I did:
mbtiny regerate
mbtiny test

Got: Use of uninitialized value in numeric lt (<) at App/ModuleBuildTiny.pm line 57

After looking at the source, I deleted META.json, then ran "mbtiny test" and got:
Creating new 'Build' script for 'xxxxxx'
'.' is not recognized as an internal or external command,
operable program or batch file.

Tried deleting Build.PL and rerunning, again.

Got: Can't open perl script "Build.PL": No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.