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

add warning messages when wayland fails to load due to shared libraries #503

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

Conversation

Adjective-Object
Copy link

While trying to debug why macroquad was failing to run in a container, I ran into a variation of this issue, which turned out to just be that I was missing libwayland-egl in the container.

This would have been more straightforward to debug if miniquad printed the reason it failed to initialize when it fails, which it does in a few other scenarios.

This change adds eprintln! warnings when a required library is missing

@Adjective-Object
Copy link
Author

For reference I wasn't able to fully test this -- it looks like there's some unrelated failing tests in cargo test?
image

let client = LibWaylandClient::try_load()?;
let egl = LibWaylandEgl::try_load()?;
let xkb = LibXkbCommon::try_load()?;
let client = eprint_iferr("libwayland-client", LibWaylandClient::try_load())?;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe try_load could return a better message instead of handling this here?

Copy link
Author

@Adjective-Object Adjective-Object Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for sure, I can handle the errors in the try_load() fns

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.

2 participants