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

Add command to add github package to zig.mod #17

Closed
xxami opened this issue Jun 6, 2021 · 1 comment · May be fixed by #21
Closed

Add command to add github package to zig.mod #17

xxami opened this issue Jun 6, 2021 · 1 comment · May be fixed by #21
Labels
enhancement New feature or request

Comments

@xxami
Copy link

xxami commented Jun 6, 2021

Small feature request, we currently write this in zig.mod

dev_dependencies:
  - src: git https://github.com/user/package
    name: packagename
    main: src/main.zig

For packages not on zpm and only on github, it would be convenient to include a shortcut to add this like some other languages do:

$ zigmod add --git user/package

This will make it easier for users to get up and running with everyones packages too.

@nektro
Copy link
Owner

nektro commented Jul 11, 2021

With the release of https://github.com/nektro/zigmod/releases/tag/v51 I feel comfortable closing this now.

There's a change that makes it so if a remote repo doesnt have a zig.mod it will now also check for {name}.zig, src/lib.zig, src/main.zig in that order in an attempt to auto-detect the entry point for a package.

I do not want to add any preferential treatment towards GtiHub so the root idea of this proposal is denied. But I do respect wanting it to be easier to add packages to your project.

@nektro nektro closed this as completed Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants