[WIP] Node tests using Edgejs WASIX QuickJS#91
Draft
sadhbh-c0d3 wants to merge 19 commits into
Draft
Conversation
…mporarily other workflows).
…till-active requests with ECANCELLED, reverse lookup includes h_name, and loopback reverse/nameinfo returns localhost
syrusakbary
reviewed
Jun 8, 2026
Comment on lines
+80
to
+86
| #ifdef __wasi__ | ||
| if (args == nullptr || args->size() < 3) return; | ||
| if (!IsEvalOrPrintFlag((*args)[1])) return; | ||
| std::string& script = (*args)[2]; | ||
| if (script.find('\n') == std::string::npos && script.find('\r') == std::string::npos) return; | ||
| script = "eval(Buffer.from('" + Base64Encode(script) + "', 'base64').toString())"; | ||
| #else |
Member
There was a problem hiding this comment.
This seems like a major hack, I strongly feel we should not have this. Why this was needed on the first place?
Collaborator
Author
There was a problem hiding this comment.
Yes, this should be removed at the end, when we improve proc_spawn() to take multiple arguments.
syrusakbary
reviewed
Jun 8, 2026
Comment on lines
+1631
to
+1642
| if (req->hostname == "127.0.0.1" || req->hostname == "::1") { | ||
| channel->active_reqs.insert(req); | ||
| char localhost[] = "localhost"; | ||
| char* aliases[] = {localhost, nullptr}; | ||
| hostent host{}; | ||
| host.h_name = localhost; | ||
| host.h_aliases = aliases; | ||
| host.h_addrtype = family; | ||
| host.h_length = length; | ||
| CompleteQuery(req, ARES_SUCCESS, nullptr, 0, &host, true); | ||
| return 0; | ||
| } |
Member
There was a problem hiding this comment.
It seems to me this should be fixed on wasix-libc or the wasmer side
Collaborator
Author
There was a problem hiding this comment.
will check this
syrusakbary
reviewed
Jun 8, 2026
Comment on lines
+2002
to
+2014
| if (host == "127.0.0.1" || host == "::1") { | ||
| const std::string service = std::to_string(port); | ||
| napi_value cb_argv[3] = { | ||
| MakeInt32(env, 0), | ||
| MakeStringUtf8(env, "localhost"), | ||
| MakeStringUtf8(env, service.c_str()), | ||
| }; | ||
| InvokeOnComplete(env, req, 3, cb_argv); | ||
| UntrackPendingReq(req); | ||
| MarkReqComplete(req); | ||
| CleanupReqAfterAsync(req); | ||
| return MakeInt32(env, 0); | ||
| } |
Member
There was a problem hiding this comment.
I don't think this should live here? (very related to my other comment)
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.
NOTE This is work in progress. Some W/A are introduced to check tests passing - they will need to be addressed separately in wasix-libc and wasmer.