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

Unify RESERVED_PARAMETER_NAMES and GLOBAL_OPTIONS #5418

Closed
alcuadrado opened this issue Jun 20, 2024 · 1 comment
Closed

Unify RESERVED_PARAMETER_NAMES and GLOBAL_OPTIONS #5418

alcuadrado opened this issue Jun 20, 2024 · 1 comment
Assignees
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task

Comments

@alcuadrado
Copy link
Member

alcuadrado commented Jun 20, 2024

We have two ways to define global builtin options. I think we should unify them, so that most of hardhat can treat the same as user-defined global options.

The one exception would be that some of these built-in global options need to be parsed differently, but it's better to contain that in the parser.

See my comment here: #5409

@alcuadrado alcuadrado added the v-next A Hardhat v3 development task label Jun 20, 2024
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Jun 20, 2024
@alcuadrado alcuadrado mentioned this issue Jun 20, 2024
6 tasks
@schaable schaable self-assigned this Jul 1, 2024
@schaable
Copy link
Member

schaable commented Jul 1, 2024

List of changes:

  • RESERVED_PARAMETER_NAMES: update this to be a list of reserved words instead of the current list of built-in options. This list is intended to reserve specific words for future use. The built-in options are already validated by TaskManager.#validateClashesWithGlobalOptions.
  • GLOBAL_OPTIONS: change this to be an actual array of options, including all their properties, and use globalOption to construct them. Also, rename the variable from GLOBAL_OPTIONS to BUILTIN_OPTIONS, as it only includes the Hardhat built-in options. The logic in v-next/hardhat/src/internal/cli/helpers/utils.ts should be updated to reflect this new format.
  • Pass the user-defined global options to getGlobalHelpString and print them along with the built-in options.

@schaable schaable closed this as completed Jul 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Archived in project
Development

No branches or pull requests

2 participants