GithubHelp home page GithubHelp logo

Comments (2)

beeftornado avatar beeftornado commented on August 13, 2024

Tweaking the types of dependencies that get considered is trivial, but let's talk about that. It's good you brought this up. I think in this area it probably is a little too cautious.

I agree with excluding build dependencies, but I'm not so sure about optional ones. TBH I don't know much about homebrew (quite ironic), so I don't know what qualifies something as an optional dependency. Specifically, if that dependency were removed, would the dependent package lose functionality? Using your example, if we removed python2, would enchant work incorrectly? I really want rmtree to be as safe as possible just in case it goes off the rails.

I'm not very familiar with the ecosystem, so I don't know what types of things formulae list as optional. Are they truly "optional" or "optional, but yeah you kinda need it"?

If I go with what I know, I can offer an alternate solution, and filter out the build deps, and add a flag to turn on if someone really wants to skip the optional formula check too.

from homebrew-rmtree.

sbibauw avatar sbibauw commented on August 13, 2024

Good questions! My understanding of homebrew is limited too.

Actually, besides build and required dependencies, there are 2 other kinds:

  • recommended: included by default, but you can build a custom install without it
  • optional: not included by default, but you can build a custom install with it

A good example for these 2 types of dependencies is ffmpeg: lame and x264 are recommended (support for these codecs is included by default), while libvorbis and x265 are optional, meaning that you can, if you want, build your own version with brew install ffmpeg --with-x265 --without-x264. So, rather than being optional or recommended, what matters is whether the deps was actually included at install or not (as it influences the build). If I (force) uninstall an installed optional/recommended dep afterwards, it might cause an error when trying to run the program (e.g., if I try to run ffmpeg after uninstalling libvorbis, even not needing this codec for a porcess, I get a dyld: Library not loaded: /usr/local/opt/libvorbis/lib/libvorbisenc.2.dylib error).

The good news is brew uses --installed depname knows whether or not an optional/recommended dependency was "activated" at install (it returns ffmpeg for libvorbis, and nothing for other optional deps that I didn't activate). brew deps ffmpeg on the contrary lists required and recommended deps (and optional with option --include-optional) independently from their actual use/activation at install. So you should probably try to gather deps the same way as brew uses --installed?

from homebrew-rmtree.

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.