I am not sure if this particular message is better or not - but I agree with you in
general. To me this was a source of frustration for a long time transitioning from
ruby 1.8.x to a higher ruby version, until I started to change the way how I write
ruby code. Nowadays I usually start with the smallest, standalone base .rb file and
then build from there to avoid the circular requires.
I still would love to see some kind of better abstraction system for loading ruby
code though, so I am all up for all suggestions that try to improve that warning
or the overall situation here.
PS: Actually on second thought, your new message confuses me too. ;)
May it actually be possible to also show some ascii message or something that
pinpoints to the problematic file at hand? Like:
foobar.rb
barfoo.rb
-> bar/foo.rb
With the warning showing that foo.rb is required by both foobar.rb and barfoo.rb
and additionally requires barfoo.rb (and barfoo.rb also showing foo.rb). I guess
ruby can not be sure as to which file is the troublemaker but it could give some
listing as to which files exactly could be problematic, most likely. Some reporting
that is a bit similar as to how the "did_you_mean" gem indicates a possible
error or typo.
the above situation, foobar.rb