GithubHelp home page GithubHelp logo

Comments (5)

beeftornado avatar beeftornado commented on September 16, 2024

Interesting. I'll definitely take a look. Seems like it could be tricky to find the root cause though. Thanks for the report!

from homebrew-rmtree.

beeftornado avatar beeftornado commented on September 16, 2024

I believe the issue is as you stated, with outdated dependencies. It seems as though when, in your example, lua is outdated, rmtree is not considering it installed and then gets excluded from subsequent operations. Should be pretty straightforward to fix.

from homebrew-rmtree.

beeftornado avatar beeftornado commented on September 16, 2024

And it looks like I have my very own test case. On my computer, brew uses node only prints out yarn. But when I try and fake remove yarn,

$ brew rmtree --dry-run yarn
This is a dry-run, nothing will be deleted
==> Examining installed formulae required by yarn...
 /

Can safely be removed
----------------------
yarn

Won't be removed
-----------------


Order of operations
-------------------
yarn
Would have removed yarn

It should have also removed node. Both node and yarn are outdated.

from homebrew-rmtree.

beeftornado avatar beeftornado commented on September 16, 2024

Ah, ok. Specifically the issue is with how we get the formula instance of what you want to remove. In my case, I have yarn 1.5, but rmtree is using the formula for yarn 1.6, which depends on node latest, which I don't have installed, which is why it isn't getting removed.

$ brew info yarn
yarn: stable 1.6.0
JavaScript package manager
https://yarnpkg.com/
Conflicts with:
  hadoop (because both install `yarn` binaries)
/usr/local/Cellar/yarn/1.5.1_1 (14 files, 4.1MB) *
  Built from source on 2018-03-20 at 15:53:57
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/yarn.rb
==> Dependencies
Recommended: node ✘
==> Options
--without-node
        Build without node support

from homebrew-rmtree.

beeftornado avatar beeftornado commented on September 16, 2024

Ok, I think I found a solution. Now when I try and remove yarn, it correctly looks at installed dependencies.

$ brew rmtree --dry-run yarn
This is a dry-run, nothing will be deleted
==> Examining installed formulae required by yarn...
 /

Can safely be removed
----------------------
yarn
node

Won't be removed
-----------------
icu4c is used by harfbuzz, sqlite

Order of operations
-------------------
yarn
node
Would have removed yarn
Would have removed node

I'll publish the fix for this shortly. Thanks again for finding this and including all that helpful info @airdrummingfool

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.