Comments (7)
One workaround is to do
cargo install --no-default-features --features=gix-features/zlib-stock
but it's not clear at all how much this disables relative to the default configuration. Ideally it should be simple to choose features so that they are identical to the default max
configuration except for the zlib-ng
backend.
Another workaround is to replace zlib-ng
in this line
Line 107 in d67551d
with zlib-stock
, which results in the desired behaviour from
cargo install --features=gix-features/zlib-stock
However, it would be nice to not have to hack up a Cargo.toml
here.
For reference, this is related to Homebrew/homebrew-core#129719, where we're trying to package gitoxide
for Homebrew.
from gitoxide.
My only other request is for you to avoid changing these flags in future releases.
I will do my best to keep them those working and won't change them lightheartedly. Fortunately it seems like these flags are stabilizing, especially after the recent push, as they seem to now fit their purpose pretty well.
Besides that, it's exciting to see gitoxide
on homebrew, thanks for all your work :).
from gitoxide.
Thank you so much for reporting this and most importantly, provide a workaround. What's astonishing here is that I was not aware that it's possible to specify any features that are defined in dependencies of the crate. This makes cargo features so much more powerful!
With that said, the way features are currently organized it's hard to reproduce exactly what the default is, minus zlib-ng, + zlib-stock, but being able to specify it from the command-line might be a game-changer for future iterations of how features are exposed by the crate.
As for the actual issue described here, there is nothing that can be done as cargo
features are additive, and the default choice happens to optimize for performance. However, I think it could make a safer choice, as to not choose anything people usually want to override. Thus a better choice might be something like max-pure
and then build on top of that. Thinking about it, I don't see a way yet to make it usable by everyone, it's really just about trying to find a local minimum that serves most.
Maybe for now, you can maintain a patch file to make the changes directly where you need them? cargo build --features=gix-features/zlib-stock
isn't recommended for the reasons you mention, it's unclear what you get and I don't see a way to fix that.
I will think about better ways to organize features, but can't know for sure I will manage to make significant improvements.
from gitoxide.
In the linked PR (and soon in main) you find the improvements needed more more easily build something like max
but with difference choices for zlib
or hashing. Please let me know if this works for you. Please find attached the rendered docs, those will be up on docs.rs
when there is a new gitoxide
release.
gitoxide - Rust.pdf - jump right to the Package Maintainers
section.
Thank you
from gitoxide.
This works great, thanks!
❯ cargo tree --no-default-features --features=max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl | rg libz
│ │ │ │ │ │ ├── libz-sys v1.1.8
│ │ │ │ │ │ └── libz-sys v1.1.8 (*)
Will this be in your next release?
from gitoxide.
Yes, it will be, and I think it's worth waiting as it will contain gix status
or something like it.
from gitoxide.
What's astonishing here is that I was not aware that it's possible to specify any features that are defined in dependencies of the crate.
Yes, the --features
flag of cargo
is woefully underdocumented. The gix-features/zlib-stock
syntax is mentioned here, but I don't think it really gives you a clear idea of how it works.
Yes, it will be, and I think it's worth waiting as it will contain
gix status
or something like it.
Great, thanks!
My only other request is for you to avoid changing these flags in future releases. We only have a small team of maintainers at Homebrew for ~6000 packages, so we rarely have the time to check updates carefully for changes to the build configuration. We often only notice that configurations need to change when packages fail loudly while building.
from gitoxide.
Related Issues (20)
- Panic when cloning empty repo HOT 1
- Support equivalent of `git_revwalk_hide_cb` HOT 2
- Revisions cannot contains the character @ HOT 1
- Support equivalent of `GIT_SORT_REVERSE | GIT_SORT_TOPOLOGICAL` in rev walk HOT 2
- libssl1.1 is being deprecated HOT 3
- Add a new feature "vendored-openssl" for gitoxide HOT 3
- `gix-hashmap` may panic on i686 targets HOT 3
- Assertion failed when fetching from gitweb: "Naive always finishes after the first round" HOT 6
- The curl backend can't verify certificates by default: "issuer is not recognized" HOT 2
- How to make authenticated clones/fetches
- Loose object tempfile failure on Windows HOT 1
- gix::open() : support bare repo with index HOT 1
- OSS-Fuzz issue 58355 HOT 1
- gix 0.43 cannot be build after 0.44 was published HOT 10
- .git/HEAD is missing a newline HOT 2
- Checkout without cloning HOT 1
- Wrong entry order in tree object HOT 2
- Gitoxide use significantly more memory than git when cloning semisynthetic repos HOT 11
- .git/HEAD doesn't contain newline HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitoxide.