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

Change search_lib_dir's return type to Result #4043

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reswqa
Copy link
Contributor

@reswqa reswqa commented Apr 3, 2024

This closes #3952.

@reswqa reswqa marked this pull request as ready for review April 3, 2024 09:24
@reswqa
Copy link
Contributor Author

reswqa commented Apr 3, 2024

I didn't aware of how to test it, so codecov failed.

let mut sysconfig_paths = vec![];
for f in fs::read_dir(path).expect("Path does not exist") {
for f in fs::read_dir(path)
.context("failed to search the lib dir, please check your path and permissions.")?
Copy link
Member

Choose a reason for hiding this comment

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

I think we should name the relevant environment variables here or possibly add more targeted calls to context at the call sites of search_lib_dir so the user knows what to check exactly.

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.

panic when PYO3_CROSS_LIB_DIR is set to a missing path
2 participants