Skip to content

Conversation

@addaleax
Copy link
Member

We had a number of places in which we created an Environment instance by performing each step in CreateEnvironment manually. Instead, just call the function itself.

We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Dec 16, 2022
@addaleaxaddaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 16, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 16, 2022
@nodejs-github-bot
Copy link
Collaborator

inspector_parent_handle.get())->impl));
env->InitializeInspector(std::move(
static_cast<InspectorParentHandleImpl*>(inspector_parent_handle.get())
->impl));
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is now just a clang-format leftover after addressing review comments, I’d leave it if it’s all the same to everyone.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleaxaddaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleaxaddaleax added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Dec 21, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 21, 2022
@nodejs-github-botnodejs-github-bot merged commit 01323d5 into nodejs:mainDec 21, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 01323d5

@addaleaxaddaleax deleted the inline-createnevironment branch December 21, 2022 16:26
targos pushed a commit that referenced this pull request Jan 1, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: #45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@RafaelGSSRafaelGSS mentioned this pull request Jan 2, 2023
RafaelGSS pushed a commit that referenced this pull request Jan 4, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: #45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jan 5, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: #45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@juanarbol
Copy link
Member

This is not landing cleanly in v18.x, it is generating the. next compile errors:

../src/node_snapshotable.cc:1174:16: error: use of undeclared identifier 'ExitCode' return ExitCode::kBootstrapFailure; ^ ../src/node_snapshotable.cc:1277:73: error: function definition is not allowed here const std::vector<std::string> exec_args){^ ../src/node_snapshotable.cc:1287:21: error: qualified reference to 'SnapshotableObject' is a constructor name rather than a type in this context SnapshotableObject::SnapshotableObject(Environment* env, ^ ../src/node_snapshotable.cc:1287:40: error: 'Environment' does not refer to a value SnapshotableObject::SnapshotableObject(Environment* env, ^ ../src/node_v8.h:13:7: note: declared here class Environment; ^ ../src/node_snapshotable.cc:1288:54: error: expected '(' for function-style cast or type construction Local<Object> wrap, ~~~~~~~~~~~~~ ^ ../src/node_snapshotable.cc:1289:40: error: 'EmbedderObjectType' does not refer to a value EmbedderObjectType type) ^ ../src/node_snapshotable.h:32:12: note: declared here enum class EmbedderObjectType : uint8_t{^ ../src/node_snapshotable.cc:1518:54: error: no member named 'mksnapshot' in namespace 'node' NODE_MODULE_CONTEXT_AWARE_INTERNAL(mksnapshot, node::mksnapshot::Initialize) ~~~~~~^ ../src/node_binding.h:48:42: note: expanded from macro 'NODE_MODULE_CONTEXT_AWARE_INTERNAL' NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_INTERNAL) ^~~~~~~ ../src/node_binding.h:34:43: note: expanded from macro 'NODE_MODULE_CONTEXT_AWARE_CPP' (node::addon_context_register_func)(regfunc), \ ^~~~~~~ ../src/node_snapshotable.cc:1520:38: error: no member named 'mksnapshot' in namespace 'node' node::mksnapshot::RegisterExternalReferences) ~~~~~~^ ../src/node_external_reference.h:148:5: note: expanded from macro 'NODE_MODULE_EXTERNAL_REFERENCE' func(registry); \ ^~~~ ../src/node_snapshotable.cc:1520:77: error: expected '}' node::mksnapshot::RegisterExternalReferences) ^ ../src/node_snapshotable.cc:27:16: note: to match this '{' namespace node{^ 9 errors generated. 

@addaleax
Copy link
MemberAuthor

@juanarbol opened #46330 👍

addaleax added a commit to addaleax/node that referenced this pull request Jan 24, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: nodejs#45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
addaleax added a commit to addaleax/node that referenced this pull request Feb 9, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: nodejs#45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
juanarbol pushed a commit to addaleax/node that referenced this pull request Feb 24, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: nodejs#45886 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
juanarbol pushed a commit that referenced this pull request Mar 1, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: #45886 Backport-PR-URL: #46330 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@juanarboljuanarbol mentioned this pull request Mar 3, 2023
juanarbol pushed a commit that referenced this pull request Mar 5, 2023
We had a number of places in which we created an `Environment` instance by performing each step in `CreateEnvironment` manually. Instead, just call the function itself. PR-URL: #45886 Backport-PR-URL: #46330 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@addaleax@nodejs-github-bot@juanarbol@jasnell@cjihrig@joyeecheung@legendecas