Skip to content

Add dockerfile and version+help commands#37

Merged
gballet merged 6 commits intoblockblaz:mainfrom
parithosh:add-dockerfile
Aug 3, 2025
Merged

Add dockerfile and version+help commands#37
gballet merged 6 commits intoblockblaz:mainfrom
parithosh:add-dockerfile

Conversation

@parithosh
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@gballet gballet left a comment

Choose a reason for hiding this comment

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

Nice. I have a few questions regarding your changes to the management of the --help option. I'd rather have this using the structure instead of manually parsing the arguments, but I see that this is broken as well. I'd rather fix that upstream.

pub const __messages__ = .{
.genesis = "genesis time",
.genesis = "Genesis time for the chain (default: 1234)",
.num_validators = "Number of validators (default: 4)",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if you define your own help message, this change won't be necessary afaict

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the reason you are manually handling the help message, that you wanted to display the list of commands? I see that this is indeed not working with a call to printHelp(), and also that it does a pretty shitty job of displaying the description. Is that an urgent problem to solve? if not, I'd rather fix it in the imported module.

Comment on lines +71 to +72
_ = try stdout.write("Version: ");
_ = try stdout.write(app_version);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it necessary for your to write the version here? We could add a --version option instead.

gballet added 2 commits August 3, 2025 17:19
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gballet gballet left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this! I had to rummage a bit in the zigcli source code to find out what was going wrong with just defining a help field on the structure. It's now fixed and so I'd rather use the structure as it's what it's been designed for. If you think there is a good reason not to do that, we can reopen a PR and use your "manual" code.

@gballet gballet changed the title Add dockerfile and help command Add dockerfile and version+help commands Aug 3, 2025
@gballet gballet merged commit 0dd1beb into blockblaz:main Aug 3, 2025
4 checks passed
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