4 ms·
I'm generally pretty old school when it comes to development practices but I can totally understand how appealing it is to effectively ship your entire environm
by simias 7y ago
I'm generally pretty old school when it comes to development practices but I can totally understand how appealing it is to effectively ship your entire environment as part of your application instead of relying on shared dependencies. Dealing with dependency incompatibility is a huge maintenance burden in my experience, and it's super tricky to debug if you don't have access to the problematic environment (which is most of the time if you deal with public projects).
That's why I really try to get into docker for instance, sure good old unix sysadmin and configure scripts might arguably be more elegant and efficient but it's a huge pain to maintain and can (and eventually will) break out the blue after a system update because of a regression in some obscure library. Meanwhile docker images should work mostly everywhere without any effort and you only update your dependencies when you want to update them.
So now that storage is cheap and RAM is plentiful I think shipping the dependencies as part of the executable is a reasonable approach most of the time. The problem with electron is that the dependencies involve a full web browser and half a trillion libraries. That's the insane part. I have full python virtual envs for non-trivial apps that are a fraction of the footprint of an electron hello world. It's the core technology that's broken, not the packaging.
- derefr 7y agoI think the grandparent comment is envisioning something more like Docker than like e.g. the JRE. This is actually already how the Microsoft Visual Studio C Runtime (aka MSVCRT) is distributed: each application embeds or streaming-downloads the exact [ABI] version of the runtime it needs, but only one of each exact [ABI] version of the runtime needs to exist per system, and each of those runtimes can be upgraded by the OS to resolve security problems (while never altering the ABI guarantees that version distribution makes.) As such, a runtime built this way is a lot like a base layer in a Docker image: it’s a static dependency of the app, installed during the app’s installation, and held in a pseudo content-addressable store that deduplicates it from other apps’ demands for the same dependency.
- NullPrefix 7y ago>each application embeds or streaming-downloads the exact [ABI] version of the runtime it needs Except when they don't. Took me way too long to accidentally install the right redist to have fn-key OSD (volume up, mute, airplane mode, et cetera) on my ThinkPad. Because why bundle it with the drivers? No error messages either. Just mash the buttons and have no visual feedback.
- sfifs 7y agoI've lost track of the number of times I've had to find the specific version of msvcrt and install just to get some piece of software working. It's a highly user unfriendly process
- ASalazarMX 7y ago> I can totally understand how appealing it is to effectively ship your entire environment as part of your application instead of relying on shared dependencies. It's the modern "It works on my machine", but in this case it does because you almost ship the entire machine.