Honestly that seems horrifying and prone to breakage to me. What if different elixir apps depend on different version of benchee? How would you resolve that when all they would do is just 'use the global'? Global state in general for package management seems utterly horrifying to me... (Hence why I love docker for my servers)
On Wednesday, July 13, 2016 at 5:23:56 AM UTC-6, Derek Cheung wrote: > > On Sat, Jul 9, 2016 at 11:29 AM, Ben Wilson <[email protected] > <javascript:>> wrote: > > Global package installation is also a constant source of problems when > they > > conflict. That isn't to say that there aren't scenarios where it's > handy. > > However great care needs to be taken when it comes to make code globally > > available as we don't want to end up in dependency hell. > > > > It's also worth pointing out that as a compiled language Elixir is > simply a > > different beast than Python. To my knowledge it is not possible to > > consolidate protocols outside of a mix project, and without such > > consolidation there is literally no point in benchmarking anything. If > you > > have a mix project to consolidate protocols, then you may as well just > add > > your benchmarking library as a dev dependency. > > In the company I'm working for there are still lots of components in > pure Erlang, and those Erlang packages are installed globally under > /usr/lib/erlang/lib/... by a Linux package manager like yum; Managing > packages dependencies is not a big deal here I would say, even without > yum; With switching to Elixir doesn't mean we have to rewrite all > components in Elixir, a consensus here is only when rewriting is > proven to have superior benefits; so here why not give user freedom to > manage global packages? not restricting user have to make a fake > project to evaluate something; here benchee is used as a global > package and doesn't belong to any particular project, don't even want > to add into mix.exs > > The current requirement of mix to install a package within a project > is just odd to people with different language background > > This is the proposal: > > $ mix install benchee --save # install the package to > current project, `--save` option is optinal, inspired from `npm > install`, which does add the new dependency to its package.json; for > mix this can be added into mix.exs > $ mix install benchee --user # install into a hidden > directory under user's home, this works for a user with ERL_LIBS > properly set; this is pip's behavior > $ sudo mix install benchee --global # install globally to where > Elixir or Erlang's system libs (that is /usr/lib/erlang/lib to Erlang > usually) > -- You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/940637d7-1aa9-4e19-bb6c-698050872da4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
