3 ms·
Dependency management isn't really a solved problem in any language ecosystem or operating system AFAIK. I'd love an example of the best case. I feel like this
by bhntr3 10y ago
Dependency management isn't really a solved problem in any language ecosystem or operating system AFAIK. I'd love an example of the best case.
I feel like this is why things like Docker exist.
For a language like python, I'm not sure this is something you would really want to try to solve at the language level. Let's say you solved it for pure python code. You'd still have the problem of interfacing with native libraries and the OS itself. For instance, NumPy and SciPy are typically kind of a pain due to Fortran dependencies.
I think Docker is a pretty nice solution. I feel like for any language, any time this becomes painful, I assume I should either be using Docker or AWS+Chef. Disposable VMs essentially.
In a sense, virtualenv is a lot like a VM. It provides a reliable execution environment on demand without forcing you to have an actual different machine. And you don't have to deal with virtualization. But. . . it has its limitations. Because, if this is what really matters to you, you might really be wanting a VM.
Languages that run in VMs already (like Java) solve this problem a bit better at the language level. But Java dependency management turns out to be a nightmare anyway. This is probably just one of those hard problems. But if you really want reliable environments for just your app, I think it's going to be better in the long term to think about containerization and virtual machines instead of virtual environments.
- Eridrus 10y agoWhat have you seen go wrong with Java packaging? I've had very, very few issues with it. The fact that you can package compiled blobs in JARs means you don't need to rely on the OS package manager. You can get into some hairy class loader situations with dependencies on conflicting versions, but most other environments don't even let you try and resolve those issues.