Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Circular Require Warning by gsl and curb

Reply
Thread Tools

Circular Require Warning by gsl and curb

 
 
Adam P.
Guest
Posts: n/a
 
      12-15-2010
I have spent some time googling for answers to this and I have checked
this forum's archives for hints. I am either using the wrong terms or
not understanding what I am reading. Here is what happened:

I am playing around to find out how to download from finance.google.com,
parse the results and then do a linear regression.

I found curb, csv and gsl (rb-gsl that is) to be the gems required.

As I started to develop some code I first required curb, ran the code
with -w flag and all was fine, no warnings.

I developed the parser, required csv and ran code with -w flag and all
was fine, no warnings.

I had to install gsl and rb-gsl gem, which was a hassle, as I first
installed gsl excluding shared libraries (as the INSTALL document for
Mac OS X would state) but that turned out to prevent gem install gsl
from going through. After I reinstalled gsl without any ./configure
options, gem install gsl went through smoothly.

But once I ran my code again with the -w flag suddenly the following
warnings appear:


$ ruby -w goodtest.rb
<internal:lib/rubygems/custom_require>:29: warning: loading in progress,
circular require considered harmful -
/usr/local/lib/ruby/1.9.1/rubygems.rb
from goodtest.rb:1:in `<main>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:32:in `rescue in require'
from <internal:gem_prelude>:217:in `try_activate'
from <internal:gem_prelude>:167:in `load_full_rubygems_library'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/1.9.1/rubygems.rb:1136:in `<top (required)>'
from /usr/local/lib/ruby/1.9.1/rubygems.rb:968:in `load_plugins'
from /usr/local/lib/ruby/1.9.1/rubygems.rb:968:in `each'
from /usr/local/lib/ruby/1.9.1/rubygems.rb:976:in `block in
load_plugins'
from /usr/local/lib/ruby/1.9.1/rubygems.rb:976:in `load'
from
/usr/local/lib/ruby/gems/1.9.1/gems/yard-0.6.3/lib/rubygems_plugin.rb:2:in
`<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/local/lib/ruby/1.9.1/rubygems/doc_manager.rb:8:in `<top
(required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
lib/complex.rb is deprecated

I commented out all requires (require "curb", require "csv", require
"gsl") and then re-added them one by one. "csv" did not trigger the
warning, but curb and gsl did.

I have seen circular requires been discussed as bugs, but since I did
not have them before my troublesome install of gsl and rb-gsl I am not
sure whether this is a bug or whether I am doing something wrong.

Any help would be much appreciated.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
circular 'require' Shadowfirebird Ruby 28 07-24-2008 07:19 PM
Untraceable warning: "Warning: Use of "require" without parenthesesis ambiguous at (eval 23) line 1." Julian Mehnle Perl Misc 17 05-18-2006 11:00 AM
DVD Verdict reviews: CURB YOUR ENTHUSIASM: THE COMPLETE FOURTH SEASON and more! DVD Verdict DVD Video 0 09-05-2005 08:19 AM
Semi-circular definitions (plus circular references) Kiuhnm C++ 16 01-03-2005 03:49 AM
DVD Verdict reviews: CURB YOUR ENTHUSIASM: THE COMPLETE FIRST SEASON and more! DVD Verdict DVD Video 3 02-17-2004 05:41 PM



Advertisments