GithubHelp home page GithubHelp logo

Comments (4)

NobodyXu avatar NobodyXu commented on July 30, 2024 2

Ideally you'd be able to say "if X is enabled, Y should be disabled", but that's not possible with cargo features.

More like cargo needs sum-type/enum in the feature system:

[features."flate-backend"]
choices = ["minoz", "libz", "libz-ng"]

from gitoxide.

joshtriplett avatar joshtriplett commented on July 30, 2024 1

@Byron It's possible to build flate2 and libz-sys without the default backends. The problem is, it's difficult to expose that via gix features in a way that doesn't have the same feature structure the underlying crates do: a pair of features such that if you don't enable either you get a build error. Ideally you'd be able to say "if X is enabled, Y should be disabled", but that's not possible with cargo features.

from gitoxide.

weihanglo avatar weihanglo commented on July 30, 2024 1

Another way to manage this is to have all dependencies specified under workspace.dependencies with default-features = false, so we'll have a (slightly) better view when a feature is really needed.

from gitoxide.

Byron avatar Byron commented on July 30, 2024

Thanks for bringing this up!

I vaguely remember thinking that flate2 is built so that the default backend can be activated (and therefore will be built) even while additional backends are selected, like zlib-ng. This is helpful as it adds flexibility, but leads to overhead.

I wish that one day there is tooling that helps to manage and maintain the nightmarish complexity of all the features in this project, even though I have little hope 😅.

from gitoxide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.