8000 Some CLI ergonomics by Rawk · Pull Request #108 · librasn/compiler · GitHub
[go: up one dir, main page]

Skip to content

Some CLI ergonomics #108

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

Merged
merged 4 commits into from
Jun 4, 2025
Merged

Some CLI ergonomics #108

merged 4 commits into from
Jun 4, 2025

Conversation

Rawk
Copy link
Contributor
@Rawk Rawk commented Jun 1, 2025

Prefix all output with blue "info", yellow "warning" or red "error", and do not color the full message. Kind of like how rustc does it.

Report warnings when walking with --directory.

Move the arguments --directory/-d and --module/-m into a required argument group, so that at least one have to be specified. This makes error reporting and --help nicer.

Rawk added 3 commits June 1, 2025 09:47
Move the arguments --directory/-d and --module/-m into a required
argument group, so that at least one have to be specified. This makes
error reporting and --help nicer.
Prefix all output with blue "info", yellow "warning" or red "error", and
do not color the full message. Kind of like how rustc does it.
Copy link
Member
@6d7a 6d7a left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I have only one request regarding exit codes:

@Rawk
Copy link
Contributor Author
Rawk commented Jun 4, 2025

That is true! I didn't realize that panic! also gives a non-zero exit code. I have changed to returning std::process::ExitCode.

I really do not like to use panic! for error reporting to the user, so i hope this will do.

Copy link
Member
@6d7a 6d7a left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for your contribution!

@6d7a 6d7a merged commit bb5fca8 into librasn:main Jun 4, 2025
1 check passed
@Rawk Rawk deleted the cli-ergonomics branch June 4, 2025 18:01
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
0