Skip to content

feat: add version display supports.#96

Merged
kevmoo merged 5 commits intomasterfrom
merge_2nd_try
Mar 15, 2026
Merged

feat: add version display supports.#96
kevmoo merged 5 commits intomasterfrom
merge_2nd_try

Conversation

@kevmoo
Copy link
Owner

@kevmoo kevmoo commented Mar 15, 2026

Fixes #38

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 enhances the dhttpd command-line tool by adding a standard --version flag. This feature improves user experience by providing a straightforward way to query the tool's installed version directly from the terminal, making it easier to manage and troubleshoot installations.

Highlights

  • New Feature: Version Display: Introduced a new --version command-line flag for the dhttpd tool, allowing users to easily display the package's current version.
  • Version Management: Added a new lib/src/version.dart file to centralize the package version, and integrated the build_version dev dependency for automated version management.
  • Documentation and Testing: Updated the README.md documentation and command_test.dart to reflect the new --version flag and ensure its correct behavior.
Changelog
  • README.md
    • Documented the newly added --version command-line flag.
  • bin/dhttpd.dart
    • Imported the new version.dart file.
    • Implemented logic to print the package version and exit when the --version flag is provided.
  • lib/src/options.dart
    • Added a version boolean field to the Options class, annotated with @CliOption.
  • lib/src/options.g.dart
    • Updated the generated code to parse the --version flag from ArgResults.
    • Added the --version flag definition to the ArgParser.
  • lib/src/version.dart
    • Added a new file to define the packageVersion constant.
  • pubspec.yaml
    • Added build_version to dev_dependencies.
  • test/command_test.dart
    • Updated the expected help output to include the --version flag.
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.

@github-actions
Copy link

github-actions bot commented Mar 15, 2026

Package publishing

Package Version Status Publish tag (post-merge)
package:dhttpd 4.2.0 ready to publish v4.2.0

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Copy link

@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 adds a --version flag to display the application's version. The implementation correctly uses the build_version package to generate a version file from pubspec.yaml, ensuring the version is always in sync. The changes are well-integrated, with updates to the command-line option parsing, main application logic, tests, and README.

I have a couple of suggestions for improvement:

  • Adding a dedicated test case for the new --version flag to ensure its functionality is covered.
  • Improving consistency in the Options class constructor for boolean flag parameters.

Overall, this is a solid feature addition.

@kevmoo kevmoo merged commit d4b97c5 into master Mar 15, 2026
5 checks passed
@kevmoo kevmoo deleted the merge_2nd_try branch March 15, 2026 22:09
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.

2 participants