Comments (2)
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.
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 itoptional
: 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)
- Feature Request Option to blacklist removal when confirmation is requested HOT 1
- private method `named' called HOT 2
- minor issue: homebrew aliases (e.g., "mc" for "midnight-commander") don't resolve as expected
- What does this error mean? HOT 2
- Error: undefined method `args_includes_ignores' for Homebrew:Module HOT 1
- Error: Calling Homebrew.args is disabled! Use `args = <command>_args.parse` and pass `args` along the call chain instead. HOT 1
- Problem with multiple homebrew installations HOT 3
- Homebrew v.3 install as in README.md not working HOT 2
- Thank you HOT 1
- Unable to remove packages HOT 6
- `--dry-run` broken (regression) ? HOT 1
- Consider upstreaming? HOT 2
- can not use --dry-run command HOT 3
- Error: undefined method `args' for Homebrew:Module HOT 1
- Doesn't work on linuxbrew
- No longer available as a Homebrew Formulae HOT 1
- brew autoremove HOT 1
- --dry-run option broken? HOT 3
- Error: undefined method `uses_args' for Homebrew:Module HOT 9
- undefined method `uses_args' for Homebrew:Module 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 homebrew-rmtree.