Skip to content
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

Support zig official zon style package managing #101

Open
RockChinQ opened this issue Jan 7, 2024 · 2 comments
Open

Support zig official zon style package managing #101

RockChinQ opened this issue Jan 7, 2024 · 2 comments

Comments

@RockChinQ
Copy link

Thank you for your great work! Zigmod is so easy to use. But I noticed that in v0.11.0, a simple but 'mature enough' package management feature was added. Some zig package has already supports this feature, such as websocket.zig. But zigmod seems not compatible with this feature, and sadly that package using zigmod also incompatible with that using zon. Will zigmod support this feature too ?

@nektro
Copy link
Owner

nektro commented Jan 7, 2024

thank you for the kind words! in the long run I hope that the nice workflows Zigmod provides can be brought to the upstream but in the meantime if you wish to put in the work to support both one option would be to have a build.zig that provides a module for the builtin package manager and a separate build.dev.zig that uses Zigmod.

Zigmod's usage of deps.zig in build.zig makes the two incompatible and also the builtin one comes with the drawback of having to update the build.zig.zon files every time you push an update to dependent package. So it can get unruly if your dep tree gets more than one or two deep. Meanwhile Zigmod only requires you to update the lockfile in the root package.

@nektro
Copy link
Owner

nektro commented Jan 7, 2024

you can also merge the two build.zigs I mentioned in the case of when a package has no dependencies, but that is more rare and then this prospect of supporting both artificially limits you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants