Re: Re: subpackages and bundles
| From: | Greg Beaver | Date: | Fri, 04 Jun 2004 03:06:38 +0000 |
| Subject: | Re: Re: subpackages and bundles | ||
| References: | 1 2 | Groups: | php.pear.core |
| Request: | Send a blank email to pear-core+get-366@lists.php.net to get a copy of this message | ||
Tomas V.V.Cox wrote:
Greg Beaver wrote:--alldeps forces users to install the entire application. Bundles would give much finer grained control over installation by specifying common configurations, without forcing the users to pick each individual section. People should not be expected to know how a package is organized if they have never used it before, and abstracting dependencies into bundles will make it easier to do this. It will also improve design by allowing packages to become much more modular and lightweight. I think you'll notice that most packages sporting a BC-breaking number like MDB2 are basically more modular versions of their predecessors.is kind of annoying. Console_Getopt should always be upgraded if a higher version is required by PEAR, it is not really separate from PEAR.I'm not with you here. If I'm using Console_Getopt in production and know the next version breaks my app, I don't want to see automatic upgrade. If I'm sure there is your nice "-a|--alldeps".
This is incorrect - people wouldn't even know the difference unless they wanted to do the research. By default, they would get the same package they've always gotten (that's what the point of type="default" is). Only power users, or people with problems would need to research further. documentation has plenty of room for this. People are more than accustomed to seeing "Typical" "Minimal" and "Custom" in windows installations. This is exactly the same thing. I'm not going to tell you disk space because I have no idea why I would mention that, perhaps I missed something.package-level bundles would be defined in package.xml for a package <bundles> <bundle type="default"> <!-- default install on "pear install/upgrade PEAR" --> <subpackage type="pkg">Console_Getopt</subpackage> <subpackage type="pkg">PEAR_ErrorStack</subpackage> <bundle> <bundle type="custom" name="minimal"> <subpackage type="pkg">Console_Getopt</subpackage> <bundle> <bundles>I won't go that far. With that, you require from the user to know what packages bundles (pear list-bundles?) and to analyze what set of them is best for me (please don't tell me disk space).
This stuff makes a lot of sense if the pear web treats subpackages inside the parent package page. So it could list diferent maintainers for different subpackages and split bugs, etc.Not to mention different stabilities for different sections. Often a package is not uniformly beta, alpha or stable, a sub-package may be alpha while the core and primary sub-package are stable (PDF converter is beta in phpDocumentor, but the core and HTML converters are stable, PEAR_ErrorStack is alpha, while PEAR is stable).
But imho that's a mess, each package release will need a high QA effort for selecting what versions works better with what subpackages, or people installing drivers that don't work with its current "core", etc.I'm going to throw your argument back at you - this is what "deps" tag is for. You test your subpackage against different versions, and depend on only versions that are known to work, using a "ge" relation, and even the "not" relation. The QA effort will be no higher than it already is, but stability will be well-defined and enforceable using the installer, instead of guessed or in an obscure part of the manual. Poor coding causes difficulty with debugging no matter how a package is organized, sub-packages won't change that. They will make good coding better.
Haven't yet seen a real need for subpackages, please prove me the contrary :)Why do I feel like I'm talking to a brick wall :). phpDocumentor is 2.6 MB. With subpackages, I can cut this to a minimal install of about 500k. I was running out of disk space on a shared install a while back (not everyone is rich in the internet world), so this is a real issue. I will never, ever use any of the database drivers for DB that don't relate to the database I am using. Plus, they all have different stability, which Daniel documents in an internal file only. Let's imagine, for argument, that the core of phpDocumentor is very stable. I make some vast improvements to the PDF converter. In order to get these changes out to the public, I have to prepare a new release of the entire package. In addition, new developers show up and want to help, but they are daunted by the sheer amount of code they have to understand, and so the project as a whole is crippled. With sub-packages, I can do a release of just the PDF converter, which will work with the old core, people can upgrade as they wish, and development can occur concurrently on different, smaller segments of the package. Without sub-packages, this is much more difficult.
That's the easy part, just a pre and post call to a php script, AFAIR that was even supported (not handled) by the package.xml parser. If we want to be kind we could provide some functions to common tasks.pre and post call is not nearly enough configurability, the scripts need to have full access to configuration, and other information the installer has access to, otherwise you might as well write another installer from scratch in the scripts. Greg