Skip to content

feat(schema)!: Remove variadic property from CLI options definition#20

Merged
ioncakephper merged 1 commit intomainfrom
chore/gmd-no-variadic-option
Dec 8, 2025
Merged

feat(schema)!: Remove variadic property from CLI options definition#20
ioncakephper merged 1 commit intomainfrom
chore/gmd-no-variadic-option

Conversation

@ioncakephper
Copy link
Copy Markdown
Owner

The variadic property has been removed from the definition of CLI options in cli.schema.json. This property previously allowed specifying if an option could accept multiple values. This removal simplifies the schema and its usage, streamlining how CLI options are defined.

The README.md has been updated to reflect this change by removing the variadic entry from the 'Options' table. Furthermore, two crucial sections in the README.md—one concerning the mandatory top-level cli object and another about the structure of the default object—have been enhanced with [!IMPORTANT] admonitions to improve their visibility and emphasis.

BREAKING CHANGE: This commit introduces breaking changes.

…tion

The `variadic` property has been removed from the definition of CLI options in `cli.schema.json`. This property previously allowed specifying if an option could accept multiple values. This removal simplifies the schema and its usage, streamlining how CLI options are defined.

The `README.md` has been updated to reflect this change by removing the `variadic` entry from the 'Options' table. Furthermore, two crucial sections in the `README.md`—one concerning the mandatory top-level `cli` object and another about the structure of the `default` object—have been enhanced with `[!IMPORTANT]` admonitions to improve their visibility and emphasis.

BREAKING CHANGE: This commit introduces breaking changes.
@ioncakephper ioncakephper merged commit 3e68b5e into main Dec 8, 2025
2 checks passed
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @ioncakephper, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the definition of CLI options by removing the variadic property from the cli.schema.json, simplifying the schema and its usage. Concurrently, the README.md has been updated to reflect this schema modification and further improved with [!IMPORTANT] admonitions to highlight crucial sections regarding the cli and default objects, enhancing overall documentation clarity and user guidance.

Highlights

  • Schema Simplification: The variadic property has been removed from the CLI options definition in cli.schema.json, simplifying the schema structure.
  • Documentation Update: The README.md has been updated to reflect the removal of the variadic property from the 'Options' table.
  • Documentation Clarity: Enhanced README.md with [!IMPORTANT] admonitions for the mandatory top-level cli object and the default object sections, improving visibility and emphasis.
  • Breaking Change: This pull request introduces a breaking change by removing the variadic property, which previously allowed specifying multiple values for an option.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ioncakephper ioncakephper deleted the chore/gmd-no-variadic-option branch December 8, 2025 14:11
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the variadic property from CLI option definitions, a breaking change aimed at simplifying the schema. The modifications to cli.schema.json and README.md are correct and align with this objective. My review highlights two key areas for improvement. Firstly, this change results in a feature regression: it's no longer possible to enforce a list of choices for a multi-value option, as the argument definition (the new way to handle this) lacks a choices property. Secondly, I recommend enhancing the documentation to explicitly guide users on the new pattern for defining options that accept multiple values, which is crucial for a breaking change.

"short": { "type": "string", "pattern": "^[a-zA-Z]$" },
"description": { "type": "string" },
"type": { "enum": ["string", "number", "boolean"] },
"variadic": { "type": "boolean" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Removing variadic from options introduces a feature regression regarding choices. Previously, a variadic option could have its values constrained by a choices array. The new approach would be to use an option with a variadic argument. However, the argument definition does not have a choices property.

This means it's no longer possible to enforce that multiple values for an option come from a predefined set. Was this intentional? If not, I'd recommend adding a choices property to the argument definition to restore this functionality.

| `required` | `boolean` | Whether the option is required. Defaults to `false`. |
| `short` | `string` | The single-letter short alias (e.g., `p`). Must be `^[a-zA-Z]$`. |
| `type` | `string` | The data type. Can be `string`, `number`, `boolean`. |
| `variadic` | `boolean` | Whether the option can accept multiple values. Defaults to `false`. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

With the removal of the variadic property, the method for defining an option that accepts multiple values is no longer obvious. To improve clarity for users of the schema, especially given this is a breaking change, I recommend adding a note to the documentation.

For instance, you could enhance the description of the arguments property within the option object's table to explain that a variadic argument should now be used to accept multiple values. This would make the transition smoother for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant