Re:Writing a Package Manager
by richardwhiuk on Wednesday August 23, 2023 @05:48AM
(#37233717)
vcpkg is also an option
Re:Writing a Package Manager
by grumblingdev on Wednesday August 23, 2023 @07:37AM
(#37234353)
The cpp ecosystem is insane. I don't know how it got so out of hand. At the end of the day you are just a running a bunch of clang/gcc cli commands. It's really, really, really simple. But all these commands are generated, and the user becomes so detached from what they are actually doing, and then they are left with an error about one of these commands not working, and then they need to dive into this huge monstrosity to figure out what is making a command do something.
Declarative build systems obfuscate so much without providing the proper debugging and error-handling capabilities.
Build systems should be imperative and type-checked. A simple script that a user can step through and observe what is happening.
Makefiles suck because they are not type-checked.
The only abstraction you need is some kind of dependency graph. But then it should be completely transparent to the user so they can easily understand it.
Re:Writing a Package Manager
by 10000truths on Wednesday August 23, 2023 @04:36PM
(#37241610)
> Build systems should be imperative and type-checked.
Perhaps Meson fits the bill for you?
If you control the compiler AND build system you can get away with just one package for most cases. This true for Microsoft’s C/C++ package manager, NuGet[3]
Historically, the convention has been to use the package manager of the underlying system to install packages, as there are so many different build configurations to worry about when packaging the libraries. The other advantage of using the system package manager is that dependencies (shared libraries) that are common can be shared between many applications, saving space.
[1] https://conan.io/
[2] https://docs.conan.io/1/creating_packages/toolchains.html
[3] https://devblogs.microsoft.com/cppblog/nuget-for-c/