-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Allow dlopen(…)
to accept file://…
so that values from import.meta.resolve(…)
can be directly passed in again
#9878
Labels
bug
Something isn't working
Comments
Thanks for implementing this so quickly, this is really nice to have! 🤩 |
Actually, it looks like this isn't quite working yet? git clone https://github.com/cubing/twsearch && cd twsearch
git checkout 6279f4abbee4ac8941d7cd5648c6811eb283cb0a
cargo install cargo-run-bin # Requires `cargo` to be installed already.
make build-rust-ffi
bun run "src/rs-ffi/test/js_test.ts"
Should I file a new issue? |
lgarron
added a commit
to cubing/twsearch
that referenced
this issue
Apr 5, 2024
lgarron
added a commit
to cubing/twsearch
that referenced
this issue
Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Bun is running?
1.1.0
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
The code works, as it did in
bun
1.0.34.What do you see instead?
Thanks to #5827
import.meta.resolve
is now synchronous (which is fantastic for interop) and returnsfile://
URLs as strings to matchnode
(certainly handy to have consistency!).Unfortunately,
dlopen
currently fails when given afile://
scheme, so these changes broke some code. The workaround for this is not entirely obvious, as it requires re-parsing the resolved path as a URL:It errors with:
Since
dlopen(…)
isn't matching the functionality of an existingnode
API, I'd love to see it accept file URLs so that resolved path cans be passed to it intuitively and ergonomically. I think this is particularly valuable because:bun
is handing me a resolved path to a file that definitely exists!") It's a real red herring, and even with a lot of expertise it took me a few minutes to figure out what was going on.Additional information
No response
The text was updated successfully, but these errors were encountered: