Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular require warning in prawn 2.5.0 #1349

Open
jeremyevans opened this issue May 22, 2024 · 0 comments · May be fixed by #1363
Open

Circular require warning in prawn 2.5.0 #1349

jeremyevans opened this issue May 22, 2024 · 0 comments · May be fixed by #1363

Comments

@jeremyevans
Copy link

$ 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.

@kbrock kbrock linked a pull request Sep 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant