GithubHelp home page GithubHelp logo

Comments (6)

cometkim avatar cometkim commented on May 27, 2024 2

Ok, I figured out some problems with global installs that I wanna fix before adding this feature.

The first problem with bun install is that installs all the transitive dependencies binaries as well, which is not good for PATH. Second is users have to manually configure the PATH.

I will fix problems by adding shim for bun install command like asdf-nodejs does.

from asdf-bun.

aarvay avatar aarvay commented on May 27, 2024 1

@cometkim yes the feature request is for global. bunx is for executing a package binary.

Apart from having parity with other plugins in the ecosystem like @willian mentioned, another nice thing about having this feature would be that, this file (.default-bun-packages) can live in your dotfiles repo and be part of the init script (for new machine setup)

from asdf-bun.

cometkim avatar cometkim commented on May 27, 2024 1

I'm not sure if I understood it correctly.

There is no reason to reinstall a global package due to a bun version change. Also, naive reinstallation may be a potential security risk because it does not respect package locks.

Moving global packages to a new machine makes sense to me. But why do we need a new format like .default-bun-packages instead of migrating $HOME/.bun/install/global/{package.json, bun.lockb} files already exist?

I think running bun install --cwd ~/.bun/install/global after installation is better solution.

from asdf-bun.

cometkim avatar cometkim commented on May 27, 2024

Is that feature for global? I'd recommend using bunx then

from asdf-bun.

willian avatar willian commented on May 27, 2024

I also agree with @aarvay on this feature request. Not only asdf-node follows this approach, asdf-ruby (.default-gems file), asdf-python (.default-python-packages file), and many others also follow this approach.
The idea is to have some global packages installed automatically as soon as a new version of Bun is installed via asdf install .... This is useful for keeping the environment consistency no matter what version of Bun we're running.

from asdf-bun.

cometkim avatar cometkim commented on May 27, 2024

Bun has the problem of not being well suited to handle global installations (See oven-sh/bun#6928)

I could override the behavior like the asdf-nodejs plugin does for npm, but I believe that's not the correct move. I would not recommend managing global installations via Bun until this is discussed upstream.

from asdf-bun.

Related Issues (11)

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.