rcaputo / app-bundlefly Goto Github PK
View Code? Open in Web Editor NEWInstall your CPAN bundles faster --- make your bundles fly!
Install your CPAN bundles faster --- make your bundles fly!
--- WTF?! I'm dissatisfied with the way CPAN tools install modules, especially when they install several modules at once. Modules in autobundle snapshots are installed alphabetically. Dependencies are prepended as needed, and then they are installed again later when they appear in the alphabet. Distributions with a lot of dependencies tend to have the same issue on a smaller scale. Common dependencies such as Test::More may be prepended and installed multiple times. Yes, confirmations can be made automatic. Yes, automatic confirmations suck less. But redundantly installing modules, perhaps many times, still sucks. --- So What? Perlbrew lowers the effort to install new versions of Perl. This is awesome, and it's all fun and games, until one realizes that each new Perl instance is missing all those necessary modules. Autobundle snapshots reduce the effort needed to install a suite of modules into a new Perl instance. Create an autobundle snapshot from one Perl instance, and install them into another. These tools reduce the bletcherous redundancy inherent in autobundle installs. The process is greatly improved. --- What You Get This project includes two utilities to stop the sucking altogether. "smartcpan" installs one or more modules and their dependencies so that the dependencies come before the dependants. This minimizes (often eliminates) "prepend them to the queue" prompts and redundant installations. "smartbundle" does the same for all the modules in an autobundle snapshot. --- How It Works CPANDB lets us quickly find the distributions for each module to install. It uses Graph::Directed to build dependency graphs for each module. We subvert CPANDB to build a combined dependency graph for all requested modules. The graph is iterated through from successorless vertices (distributions) up to the requested distributions. Successorless vertices are removed from the graph after each iteration. This continues until the entire graph has been installed and deleted. The graph is based on distributions, but CPAN tools install modules. CPANDB is used again to install a module for each distribution. --- Troublesome Log::Log4perl installs fine, but cpan doesn't seem to see it. Every time smartbundle is run, it installs Log::Log4perl again. So much for eliminating redundancy, eh?
Pedro Melo suggested:
Nice...
Just a couple of days ago I was hinting to miyagawa that I would love to see cpanm -j 6 :)
Maybe we could hack Bundlefly to manage multiple parallel CPAN clients instead...
There's a new API to map modules to distributions. We may be able to use that.
I have LOTS of perl modules installed. Your script seems to be an improvement over running a Snapshot directly. However, there are always some modules that don't install properly. Mostly it's because some change to the module has caused one of the tests to fail. If I happened to need THAT module, it would be a big deal, and I would poke into it to see what's wrong and communicate with the author.
But, mostly, I don't care because (a) it's something I don't use very often (b) it will get fixed eventually, and (c) there are other modules that I need a lot more and they DO install. I use this installation process either when I have to upgrade/install my O/S and/or a new perl version.
Please, either allow for modules that don't pass their tests and report what dependencies they break, and/or allow me to indicate whether the installation script should halt when an error is encountered.
Thanks,
Chelmite
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.