Skip to content

Conversation

@feds01
Copy link
Contributor

@feds01 feds01 commented Dec 7, 2024

Description

This PR is an aggregation of a few observed issues and improvements. These are:

  • Adjustments to documentation for several parts, tokenisation and error
    reporting.

  • Upgrade all dependencies

  • Upgrade to the latest nightly compiler and fix any detected issues by the
    accompanying clippy lints.

  • Fix a CLI cosmetic issue where benign messages such as "help" or "version" were being treated as fatal errors.

Commits

  • token: Update documentation of TokenKind::Tree(...) variant
  • reporting: update documentation on note_on_span utility
  • pipeline: gracefully handle benign clap errors, i.e. printing the help message
  • Fix lifetime elision clippy warnings
  • Avoid uses of map_or for simpler comparison calls
  • Avoid specifying #![feature(...)]s that are stabilised on the current stable release
  • chore: update compiler dependencies

…p message

This commit changes the way the pipeline emits errors when clap fails to parse
the command line arguments. Instead of treating all "abort"s as fatal errors, we
check that the errors from `clap` are not benign before terminating the pipeline
with the indication that the pipeline "failed".

For example, before hand we would print for `--version`:
```
error: hashc 0.1.0-3c6a02d0ca00b7c14e2e0622bfb724f4dbe68fc2
```

And after this, we print:
```
info: hashc 0.1.0-3c6a02d0ca00b7c14e2e0622bfb724f4dbe68fc2
```
@feds01 feds01 self-assigned this Dec 7, 2024
Copy link
Collaborator

@kontheocharis kontheocharis left a comment

Choose a reason for hiding this comment

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

Nice simplification!

@feds01 feds01 merged commit 9c5b2c3 into main Dec 8, 2024
1 check passed
@feds01 feds01 deleted the cli-fixes branch November 1, 2025 21:40
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.

3 participants