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

Mention submodules in readme & at likely error site #492

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Jan 30, 2022

The problem here is that include_bytes runs at compile time, and it doesn't seem to matter what features are enabled? So I suspect this problem will pop up fairly often.

I don't want to spend the time to try and figure out a real solution right now (although someone else is welcome to!) but this at least mentions the problem in the README, and adds a comment inline that will be printed whenever this problem is encountered. Maybe someone will even see it?

error: couldn't read piet/src/samples/../../snapshots/resources/Anaheim-Regular.ttf: No such file or directory (os error 2)
  --> piet/src/samples/picture_13.rs:16:28
   |
16 |       let _ = text.load_font(include_bytes!(
   |  ____________________________^
17 | |         "../../snapshots/resources/Anaheim-Regular.ttf"
18 | |     )); // SEEING AN ERROR? run `git submodule update --init`
   | |_____^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

closes #491

@cmyr cmyr merged commit a99ca0b into master Feb 7, 2022
@cmyr cmyr deleted the expert-diagnostics branch February 7, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot run examples - missing fonts?
1 participant