-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate making Zig rely on another project for package management #3116
Comments
I think zig should play nice with pkg-config. Language specific package managers are wrong way to go. (What if I want to depend on non zig package?) Language specific package managers are ill solution for the "I just want this project to have in-source builds", when one could instead use existing package managers to install the dependencies in local directory, pointing pkg-config env var there and running make. It's whole different can of worms in non linux/bsd environments where package management in general is non existent though, but that's not really a language's problem. Making language heavily dependent in the package management itself is a mistake though I think, you lose lots of flexibility on how to satisfy those dependencies. At the very least, I think language-specific package management is sort of waste of effort, when it could be solved globally, by having search paths, linkage and popular package manager people want to package their stuff for (heck, I've been using pacman myself to do this for both linux and mingw builds). |
One specific package manager that I think warrants a closer look is Conan:
Conan does not dictate one singular build system per project hierarchy. Instead it allows the user to depend on several packages built with different build systems living side by side. As I understand it the latest proposal in #943 does not cover this kind of usage. |
It seems in 0.5.0 it is possible to use Is there anything I missed that would make this additional alias a bad idea? |
There's lots more granular data required. e.g. many packages need different flags for linking dynamically vs statically (see e.g. |
Okay, but there is still no alias that lets me use |
@gkdr you're asking for a |
|
Yes, and thanks! |
Package management seems to be a big topic the Zig project wants to tackle in the 0.6 release cycle.
I think it would be worthwhile to evaluate if the best way forward could be finding an existing package manager that fits nicely with Zig and making the necessary adaptations for using it with Zig.
This could be done through adding support for the Zig build system and compiler to this package management system and by making sure Zig is easy for package managers in general to interface with.
A blessed package manager that is already popular in the C/C++ world could promote code reuse, especially for cross-language dependencies.
It could be an opportunity for Zig code to gain access to already existing repositories of packaged software to depend on and even for developers in other languages to seamlessly rely on useful Zig packages as they become available.
Zig already benefits from interfacing with well established great tooling like gdb and valgrind instead of reinventing the wheel there. Sure package management is a really big and complex topic and seemingly not a well-saturated space for C/C++. Still I do believe the efforts for evaluating existing options will have an indirect payoff in lessons learned along the way even when Zig proceeds to create its own package manager.
The text was updated successfully, but these errors were encountered: