When is it (not) appropriate to bundle dependencies with an application?

后端 未结 8 2245
忘掉有多难
忘掉有多难 2021-02-19 13:43

Summary

I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as

8条回答
  •  醉话见心
    2021-02-19 14:04

    I favor bundling dependencies, if it's not feasible to use a system for automatic dependency resolution (i.e. setuptools), and if you can do it without introducing version conflicts. You still have to consider your application and your audience; serious developers or enthusiasts are more likely to want to work with a specific (latest) version of the dependency. Bundling stuff in may be annoying for them, since it's not what they expect.

    But, especially for end-users of an application, I seriously doubt most people enjoy having to search for dependencies. As far as having duplicate copies goes, I would much rather spend an extra 10 milliseconds downloading some additional kilobytes, or spend whatever fraction of a cent on the extra meg of disk space, than spend 10+ minutes searching through websites (which may be down), downloading, installing (which may fail if versions are incompatible), etc.

    I don't care how many copies of a library I have on my disk, as long as they don't get in each others' way. Disk space is really, really cheap.

提交回复
热议问题