package_control icon indicating copy to clipboard operation
package_control copied to clipboard

Package dependencies (install dependent sublime packages)

Open randy3k opened this issue 9 years ago • 2 comments

I know it is an old topic, and there are several closed thread already #166 #661 #747. However, I have searched over all the issues, it seems that no opened issue is now tracking this feature.

Starting with package control 3.0, there is a way to specify dependencies of a package.

One of the new features of Package Control 3.0 is support for dependencies. Dependencies are non-user-visible packages that contain binaries, shared libraries or Python modules. Dependencies are not a way to install multiple related packages. Currently no such functionality exists.

As what it has stated, currently, there is no official support for installing dependent sublime packages. Although there are ad-hoc methods to install dependecies, eg, @FichteFoll 's code in #747 or using advanced_install_package command, I reckon it is still preferable to have some official support of such a functionality.

randy3k avatar Feb 25 '16 04:02 randy3k

Personally, I don't have an interest in developing such a feature. What follows is an explanation of why, and what I would prefer for an alternative.

You can't control the load order of packages, and packages should always have their own user-facing functionality. Getting into the world of trying to resolve version dependencies is a pain, and there would be no way to resolve version conflicts even if they did arise. Additionally, my experience working with developing dependencies was that they are hardly ever used, and the implementation required a whole bunch of work and testing. In the end, I don't think it was a great use of my time. There are still edge case issues with them, but

My own personal interest is to develop the concept of a "bundle". It would be a simple JSON file where any user could specify any number of packages to be installed, plus possibly some default configuration to add to the user settings. These would not be centralized in the channel. Any bundle could be installed from any HTTPS URL. Thus anyone could create their favorite bundle of PHP packages, or web dev packages, and we wouldn't need to approve them, or version them, or anything like that.

This is not to say package dependencies won't ever happen, however I don't currently intend to implement them myself. I may at some point implement bundles, but I don't expect that will be very soon. Unfortunately my free time for open source is relatively limited these days.

wbond avatar Feb 25 '16 20:02 wbond

I forgot to thank you for this amazing piece of work. It changes the ecosystem of Sublime Text community entirely. Thanks for your detailed explanation. I agree that there may be only a handful of developers who need this feature, and spending time in implementing such feature is not time-economic.

Working on a open source project is tricky, but there is a lot of fun :+1:

randy3k avatar Feb 25 '16 21:02 randy3k