Circular require warning in prawn 2.5.0
jeremyevans opened this issue · 0 comments
jeremyevans commented
$ ruby -v -w -r prawn -e ''
ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-openbsd]
/usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/fonts.rb:9: warning: /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/fonts.rb:9: warning: loading in progress, circular require considered harmful - /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/font.rb
from <internal:/usr/local/lib/ruby/3.3/rubygems/core_ext/kernel_require.rb>:135:in `require'
from <internal:/usr/local/lib/ruby/3.3/rubygems/core_ext/kernel_require.rb>:141:in `rescue in require'
from <internal:/usr/local/lib/ruby/3.3/rubygems/core_ext/kernel_require.rb>:141:in `require'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn.rb:78:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn.rb:78:in `require_relative'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/font.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/font.rb:338:in `<module:Prawn>'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/font.rb:339:in `<class:Font>'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/font.rb:339:in `require_relative'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/fonts.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.3/gems/prawn-2.5.0/lib/prawn/fonts.rb:9:in `require_relative'
Possibly fixable by having fonts.rb
not require font.rb
if Prawn::Font
is already defined.