8000 Fixes circular require warning by kbrock · Pull Request #1363 · prawnpdf/prawn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixes circular require warning #1363

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kbrock
8000
Copy link
@kbrock kbrock commented Sep 27, 2024

fixes:

warning: lib/prawn/fonts.rb:9: warning: loading in progress, circular require considered harmful - lib/prawn/font.rb

Aah.

Fixes: #1349

@radwo
Copy link
radwo commented Mar 7, 2025

Hey team!

Any idea if this is going to be merge?

warning: lib/prawn/fonts.rb:9: warning: loading in progress, circular require considered harmful - lib/prawn/font.rb
@kbrock
Copy link
Author
kbrock commented Mar 7, 2025

update:

  • rebased to ensure an easy merge.

Thanks for the ping @radwo
I too hope this can be merged

@practicingdev
Copy link
Contributor

I was curious about why this was happening to begin with and it looks like it's due to the compatibility shim that sets constants on Font::* to point to the Fonts::** namespace.

Fonts::AFM and Fonts::TTF do inherit from Font so it does need to be loaded first. However, because this happens in font.rb and the fonts.rb file is not loaded from anywhere else, it does seem safe to simply remove that line.

Did not attempt to run the code, just dropping a note based on what I found reading things.

@kbrock
Copy link
Author
kbrock commented Apr 25, 2025

This failure is unrelated.
It only fails on ruby head and no other version.
The failure is based upon a change in encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Circular require warning in prawn 2.5.0
3 participants
0