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(ext/ffi): formatting dlopen errors on Windows #12301

Merged
merged 18 commits into from
Oct 6, 2021

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Oct 2, 2021

Fixes #11632

@littledivy littledivy changed the title fix(ext/ffi): Windows dlopen IoError formatting fix(ext/ffi): formatting dlopen errors on Windows Oct 2, 2021
@littledivy littledivy marked this pull request as ready for review October 2, 2021 17:03
AaronO
AaronO previously requested changes Oct 2, 2021
Copy link
Contributor

@AaronO AaronO left a comment

Choose a reason for hiding this comment

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

Have you considered moving out the error mapping to its own function ? I think that would be cleaner

@littledivy littledivy requested a review from AaronO October 3, 2021 09:56
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

Almost there. It would be useful to add some windows only unit tests doing something like format_error(io:Error::from_raw_os_error(code), path).

ext/ffi/lib.rs Outdated Show resolved Hide resolved
ext/ffi/lib.rs Outdated Show resolved Hide resolved
ext/ffi/lib.rs Outdated Show resolved Hide resolved
ext/ffi/lib.rs Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this. There are just some merge conflicts that need to be resolved though.

@piscisaureus piscisaureus dismissed AaronO’s stale review October 5, 2021 15:37

Comments have been addressed.

@bartlomieju bartlomieju merged commit 2b39e74 into denoland:main Oct 6, 2021
@littledivy littledivy deleted the fix/ffi-dlopen-error branch October 6, 2021 02:37
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Oct 10, 2021
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.

Incorrectly using 32 bit dll in Deno.dlopen on Windows leads to error message with format string
5 participants