News for hackers. Stuff that matters.
Re:Why has Plan 9 chosen statically linked binaries instead ... by erik_seaberg on Friday February 15, 2019 @11:06AM (#19171968)
DLL hell happened because Windows used to lack a package manager, leaving apps to bundle their dependencies and overwrite other versions (without semver names!) in common directories.
Re:Why has Plan 9 chosen statically linked binaries instead ... by astine on Friday February 15, 2019 @11:14AM (#19172043)
Yeah, Windows has traditionally been worse than Linux in this capacity, but my point is that dependency management is a non-trivial problem. My experience is that package managers usually work but not always (I've had occasional issues on Arch) and the fact that you need a package manager, and how sophisticated they often have to be, shows how tricky the problem can be to solve.
Re:Why has Plan 9 chosen statically linked binaries instead ... by int_19h on Friday February 15, 2019 @09:25PM (#19176616)
To be even more specific, it happened because apps dumped DLLs into shared system directories instead of bundling them alongside the app binary. Since on Windows, each app has its own directory, it's easy to bundle in a way that doesn't mess up other apps.
Re:Why has Plan 9 chosen statically linked binaries instead ... by __d on Saturday February 16, 2019 @07:08AM (#19178254)
It became so once the DLL search path was changed to put the .exe file's containing folder first.

Prior to that, the system dirs were searched first, which was the trigger for the DLL hell issue.

Re:Why has Plan 9 chosen statically linked binaries instead ... by int_19h on Saturday February 16, 2019 @08:21PM (#19182030)
I mean, if all apps avoided writing to the global folders (i.e. reserve it for OS-managed components), there wouldn't be an issue even with the old arrangement.

But not even Microsoft's own products respected that in practice.

Re:Why has Plan 9 chosen statically linked binaries instead ... by pjmlp on Friday February 15, 2019 @12:39PM (#19172896)
As if Linux is any better, specially regarding glibc.
Re:Why has Plan 9 chosen statically linked binaries instead ... by jiveturkey on Friday February 15, 2019 @01:36PM (#19173450)
it is better. (Unix/ELF generically, not linux). versioned symbols are a YUGE improvement over DLLs.
Re:Why has Plan 9 chosen statically linked binaries instead ... by pjmlp on Friday February 15, 2019 @01:55PM (#19173634)
Hence why I explicitly mentioned Linux.

Also Aix uses the same model as Windows.

Finally, .NET Assemblies are versioned, and Microsoft has introduced Application Manifests around Windows XP.

https://docs.microsoft.com/en-us/windows/desktop/sbscs/appli...

So it a matter of actually taking the effort of specifying the versions that the application works with.

Re:Why has Plan 9 chosen statically linked binaries instead ... by btschaegg on Saturday February 16, 2019 @05:41AM (#19178071)
> Finally, .NET Assemblies are versioned,

But then, you still have to put up with defining potentially hundreds of <bindingRedirect>s in config files to even get an application to run correctly, even though they mostly don't share their DLLs.

The only thing it takes is Nuget dowloading a newer version of some dependency another library depends on, even if it's backwards compatible with the old API. Which, of course, it should always be if you haven't switched to a new major version.

Edit: Also, I find it very disturbing that the resulting errors always happen to be crashes during runtime instead of up-front. If that happens with a plugin or through reflection: fine. But for most of .NET code, dependencies should be able to be loaded during startup.

Re:Why has Plan 9 chosen statically linked binaries instead ... by int_19h on Friday February 15, 2019 @09:25PM (#19176614)
All assemblies are versioned and can potentially have unique strong names, not just .NET assemblies. A native DLL can still be an assembly.

https://en.wikipedia.org/wiki/Side-by-side_assembly