Make error messages for missing shared libraries more helpful#5607
Merged
zebreus merged 2 commits intofeat/dl-threadsfrom Jun 16, 2025
Merged
Make error messages for missing shared libraries more helpful#5607zebreus merged 2 commits intofeat/dl-threadsfrom
zebreus merged 2 commits intofeat/dl-threadsfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances error messages for missing shared libraries by including details on the searched paths and the underlying filesystem errors. Key changes include introducing a new LinkError variant (SharedLibraryMissing) with a corresponding FsErrors enum to capture single or multiple filesystem errors, and updating the module lookup logic in locate_module to wrap errors with these detailed messages.
Comments suppressed due to low confidence (2)
lib/wasix/src/state/linker.rs:533
- [nitpick] Consider adding a brief comment above the Display implementation for FsErrors to explain the formatting logic, which will aid future maintainers in understanding the custom error output.
write!(f, "\n {}: {}", path.display(), error)?;
lib/wasix/src/state/linker.rs:3618
- [nitpick] Consider checking for duplicate paths when chaining library_path with DEFAULT_RUNTIME_PATH to avoid redundant filesystem lookups, especially if there may be overlap between the two sources.
let search_paths = library_path.iter()
|
📝 Documentation updates detected! New suggestion: Add troubleshooting documentation for Wasmer runtime shared library errors |
Arshia001
requested changes
Jun 16, 2025
Arshia001
approved these changes
Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The error messages for missing dynamic libraries do not provide any details about why a dynamic library could not be found. This PR makes them more helpful by including the searched paths and the reasons why the library was not found there.
The previous implementation would always show
entry not foundeven when the actual filesystem error was something else.Previous error message:
New error message:
Description