-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(build): allow disabling git info collection #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
I will publish a new version that includes this change when I leave work. |
maybe our AUR maintainer is interested in this cc @Jisu-Woniu |
Hi @tranzystorekk I just released v0.11.28 which includes this commit. The tag is already pushed to github and the release will be created when the ci is finished. |
Thank you for this PR. I will use that feature gate in |
Is it possible to make |
That would probably be a bit of a breaking change for the CI builds |
I'm not sure. I personally prefer enable it by default. This is useful for people who use |
As far as I know, features are difficult to opt-out, once they are made default, so unnecessary features may be set as non-default. I would suggest a new feature like For now, I suggest keeping it "as is", and make the decision later. |
Do you mean feature flags in rust? They are designed to be pluggable and widely used by tokio, clap... I dont get why it is hard to opt out. |
For example, I want to compile a crate with default features f1, f2, ..., f100, and I only want to exclude f50 since it is not supported on my machine. I would have to declare |
Make sense. It like we need to group features flags in some way like what you've mentioned. Maybe we can consider this once we have a sufficient large number of features. |
When packaging for linux, some distros (e.g. Void Linux) do not use git to obtain package source, but download source archives directly. That makes any git repository info unavailable and currently requires either adding unnecessary libgit2 dependency or patching the code out.
This change allows using
--no-default-features --features=cli,wasm
to disable the git portion if needed.