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

fix: Gracefully handle errors when disabling C modules #530

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

Conversation

Sculas
Copy link

@Sculas Sculas commented Feb 15, 2025

This PR makes a small change to mlua so it no longer panics when unable to disable C modules.

This is primarily meant for Pluto, which has sandbox options that fully disable loading C modules, which would otherwise conflict with mlua also trying to disable a loader that no longer exists.

I'm not 100% sure if throwing the error away is the best solution, but it seems extremely unlikely that this would fail in any logical sense besides package.loadlib or the searchers not existing, in which case the end goal was already reached (being unable to load any C modules).

I'm happy to fix this differently if you have any other ideas!

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.

1 participant