perl-toolchain-gang / cpan-static Goto Github PK
View Code? Open in Web Editor NEWStatic install specification for CPAN distributions
Static install specification for CPAN distributions
The spec talks mostly about what cpan clients should do to install distributions statically, but how do I as an author specify that my distribution supports static installation?
The EXTERNAL REQUIREMENTS section states:
[...] a valid
Build.PL
(per CPAN::API::BuildPL) orMakefile.PL
must be present as a fallback. It may be copied verbatim to fromMETA.json
. The same may be done forMYMETA.yml
/META.yml
.
So a cpan client may copy META.json
verbatim to Makefile.PL
, and copy MYMETA.yml
verbatim to Makefile.PL
, and copy META.yml
verbatim to Makefile.PL
.
This makes no sense.
I think including autosplit in this is very questionable. Autosplit is rarely used these days, and it adds complexity and slows down the install process. I know when I was profiling EUMM installs on Win32, autosplit was a significant part of the install time, even though no autosplitting was actually taking place.
package CPAN::Static;
but the file is CPAN/Static/Spec.pm
.
The spec should mention that copying files to blib is an optional step in installation, so tests should not depend on it.
The spec currently describes requirements (using terms like must, may, etc.), but some sections do not say who these requirements apply to. It's all passive voice.
For example, the spec says a valid Build.PL
or Makefile.PL
"must be present as a fallback". This looks like an authoring requirement, but is it? Or does it mean a cpan client must generate a Makefile.PL
if none exists? Or does it mean a cpan client must check for the presence of such a file and error out if it isn't there?
Then: "It may be copied verbatim to from META.json
." Does this mean an author should cp META.json Makefile.PL
before creating a distribution tarball, or does it mean the cpan client should overwrite the existing Build.PL
/Makefile.PL
with data from META.json
?
Then: "This action must be done during configure-time." What action is meant here? The "must be present" thing? That's technically not an action, but maybe it means "the Build.PL/Makefile.PL file must be present at configure time"? Or does it refer to the copying action, cp META.json Makefile.PL
? But that's an optional action ("may"). Why is it now an absolute requirement ("must")? Or does it refer to the immediately preceding sentence of "The same may be done for MYMETA.yml
/META.yml
"? That's also optional (and the "may" part isn't even bolded).
It was always intended as a version, but cpanm is currently treating it as a boolean, which is not future-compatible at all.
It would make some sense to support for x_static_install even with dynamic_config of 1. This would mean that the Makefile.PL or Build.PL would have to be run to calculate dependencies, but that further installation could be done statically.
This adds extra complexity though, and may have some unforeseen edge cases. It should be left for some later version of the spec, if it does eventually get implemented.
Until then, we should clarify that x_static_install is not supported if dynamic_config is true.
The static install spec includes by reference CPAN::Meta::Spec and CPAN::API::BuildPL. I can't find the latter on CPAN. What is it?
Currently only script/
is described, should it also cover bin/
?
Currently it's treated as any other file in script/
: they're installed as scripts. This is probably not very helpful.
What should it do instead?
What guarantees should be made about configuration? Currently only a MYMETA.json must be generated, is that enough? Is that too much?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.