Skip to content

Conversation

@danbev
Copy link
Contributor

This commit adds a CheckOptions function that the options classes can
optionally implement to check that options specified are correct
(dependencies between options are met or options that are mutually
exclusive).

In the process of doing this the error pointer passed to Parse was
changed to be of type vector so that potentially multiple options check
failures can be reported.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

This commit adds a CheckOptions function that the options classes can optionally implement to check that options specified are correct (dependencies between options are met or options that are mutually exclusive). In the process of doing this the error pointer passed to Parse was changed to be of type vector so that potentially multiple options check failures can be reported.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 19, 2018
@danbev
Copy link
ContributorAuthor

#endif
per_isolate->CheckOptions(errors);
per_isolate->per_env->CheckOptions(errors);
per_isolate->per_env->debug_options->CheckOptions(errors);
Copy link
Member

Choose a reason for hiding this comment

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

Would it maybe make sense to nest these directly, like callling debug_options->CheckOptions(errors) from EnvironmentOptions::CheckOptions() and so on?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah I like that, I'll give that a try. Thanks

@danbev
Copy link
ContributorAuthor

Re-run CI after latest commit: https://ci.nodejs.org/job/node-test-pull-request/17350/

@addaleax
Copy link
Member

Landed in 36bdd19, thanks for doing this!

addaleax pushed a commit that referenced this pull request Sep 22, 2018
This commit adds a CheckOptions function that the options classes can optionally implement to check that options specified are correct (dependencies between options are met or options that are mutually exclusive). In the process of doing this the error pointer passed to Parse was changed to be of type vector so that potentially multiple options check failures can be reported. PR-URL: #22943 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this pull request Sep 23, 2018
This commit adds a CheckOptions function that the options classes can optionally implement to check that options specified are correct (dependencies between options are met or options that are mutually exclusive). In the process of doing this the error pointer passed to Parse was changed to be of type vector so that potentially multiple options check failures can be reported. PR-URL: #22943 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@targostargos mentioned this pull request Oct 7, 2018
@danbevdanbev deleted the check_options branch August 20, 2019 07:50
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++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@danbev@nodejs-github-bot@addaleax@jasnell@joyeecheung