Giter VIP home page Giter VIP logo

cpan-api-buildpl's People

Contributors

leont avatar miyagawa avatar xdg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

leont sjn

cpan-api-buildpl's Issues

Specify $ENV{PATH} consistency with @INC

This is a general CPAN client spec issue, not specific to Build.PL.

In the environment variable section something must be said about $ENV{PATH}: it must be consistent with @INC.

I'm writing this because some packages fail to install because the CPAN client has modified $ENV{PERL5LIB} to add some temporary lib paths, but did not modify PATH to add the bin or script dirs. This cause problems for distributions that rely on Perl scripts instead of modules, as we can get trouble if there is a mismatch between the script and its supporting modules (example: running an older script with the newer modules, or finding the module but not the newer script).

Here is an example issue: https://rt.cpan.org/Ticket/Display.html?id=75376

Merging install logic with the rest

Currently, the document is sourced from two places: the first part is new, written by @dagolden (in wikidoc) and describes mostactions and arguments; the second part was written by Ken, and is a straight copy from Module::Build's docs. In particular, the workings of options is spread in a weird way.

How do we iron this out? Also with regards to some of the issues mentioned in #6.

--quiet

Currently we have the --quiet option in the spec with a question mark behind it. I propose we drop it.

Firstly, having both verbose and quiet as separate entities is confusing,

Secondly, I don't see the use of it. What it currently does is in Module::Build

  • Make file copying quiet
  • Make fake installing quiet
  • Make ExtUtils::CBuilder quiet
  • Disable some informational output (e.g. "Building $distname\n"), unless verbose is also set.

It's not affecting TAP::Harness, despite that having lots of quietness levels.

I've often wanted a build to be more verbose, but I never wanted it to be more quiet. Maybe because CPAN clients can already make it quiet for me.

Verbose option argument

Module::Build accepts just about any argument convention under the rainbow in an unpleasantly heuristic and opportunistic manner. To be more precise it will accept any of:

  1. verbose=1
  2. --verbose
  3. --verbose 1
  4. --verbose=1
  5. --no-verbose
  6. --noverbose
  7. --no_verbose

Getopt::Long (and other parsers AFAIK) can only parse some of those, in three different ways but never more than half at the same time.

  1. As a boolean option (verbose!) it can parse 2, 5 and 6
  2. As an integer option with mandatory argument (verbose=i) it can parse 3 and 4
  3. As an integer option with an optional argument (verbose:1) it can parse 2, 3 and 4

Module::Build::Tiny does the last possibility currently, which I consider the most backwards compatible option as it makes the common styles 2 and 3 DWIM. Other than style 1 (which we don't support anyway), I don't think I've seen any of the others in the wild (5-7 would be silly anyway).

--create_packlist

Module::Build and Module::Build::Tiny has a create_packlist option that defaults to true. This allows vendors to skip on the packlist, which a lot of packagers prefer to do.

Should we support that in the spec? Should we have something more high level? Do we even know what we need here?

--fake and --pure

Module::Build currently has two extra install actions: fake_install and pure_install.

The former is of somewhat limited use IMO unless you're writing a build system, but ExtUtils::Install has explicit support for it in the form of the dry_run argument.

The latter is more useful, as it guarantees that no perllocal is written. Currently in M::B, it's synonymous to install, though I'd like to change that in the future.

That said, this system is not scalable. Obviously, you can't combine fake and pure this way, and if we implement the install database we discussed in Lancaster this problem will only become worse.

Therefor, I propose we'll use flag arguments instead. e.g. ./Build install --fake --pure. That way we'll have plenty of space to grow in the future.

--jobs?

We live in a multi-core world. I'd like Build.PL to enable that in a sane way. Therefor I suggest we add a --jobs argument. This would be suggestion for the build tool to use a certain number of processes/threads when doing its job, similar to make -j.

Adding support for this in the testing phase is fairly easy (in both Module::Build and Module::Build::Tiny), and a future implementation may also implement it for other phases.

--config

Should we add --config to the spec. This provides an escape-hatch to tweak various things, such the compilation process.

clean and realclean?

Should we specify the clean and realclean actions? They are useful, and some packagers (including debian) are (weakly?) depending on them. They shouldn't be too hard to define either.

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.