blackwinter / brice

Extra cool IRb goodness for the masses.

Home Page:http://blackwinter.github.io/brice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load Errors & Dependencies

trans opened this issue · comments

Been looking for a good replacement for Wirble for a while. Nothing has really satisfied me, as most strike me as far too complex. Brice is about the closest I've found to something I like. So, kudos on the project.

I do have a couple issues though. The first thing I notice when I use brice are warnings about load errors for:

  • added_methods
  • backports
  • what_methods

I assume it's trying to load them but rescues the load errors and moves on without them.

I wonder why backports is needed since I'm running 1.9?

I looked at what_methods and that lib is so small (and hasn't seen an update in five years), you might as will just include the code in Brice.

Although added_methods isn't quite as small, it's seems like it's geared directly for use by Brice. Is it being used by any other project? So maybe just include it too, or make it part of ruby-nuggets perhaps?

I guess taken as whole (putting aside the the issue of the actual warnings) my only complaint about Brice is that it would be much nicer if it had fewer dependencies. Being such a fundamental tool, the less dependencies the better.

thanks for the feedback! i should definitely adjust a few things now that other people start using brice. the list of libraries is my default setting, that's what i want to be present in my irb sessions.

so i can think of two solutions right now: 1) in your ~/.irbrc, you exclude the libraries you don't want; or 2) i simply silence the warnings in the default case. yeah, that sounds sensible; i probably make a new release tomorrow.

I wonder why backports is needed since I'm running 1.9?

even 1.9.3 will become an "old version" some day ;) so maybe there are actually going to be backports for that one. OTOH, @marcandre's backports library is much more exhaustive and better fleshed out. i might switch some day, anyway.

Although added_methods isn't quite as small, it's seems like it's geared directly for use by Brice. Is it being used by any other project? So maybe just include it too, or make it part of ruby-nuggets perhaps?

hehe, funny that you mention this: it has been a part of ruby-nuggets originally before i ripped it out. it's currently not used by any other project that i know of, but then it's really a standalone library you can use with any program or library. though interactive use inside irb is probably the most instructive.

Is this not the default behaviour? 0.2.6 still complains about missing added_methods. It's a bit of a WTF until you figure out what's going on.

it is, but the warning you're seeing comes from a different code path. do you have any suggestions on how to handle this case?