uutils / uutils/coreutils

Errors and GNU compatibility

Open
#4,000 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

I - Discussion U - All
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

TL;DR: I think we need a policy for error compatibility with GNU. We can pick either:

  • Errors should be identical to GNU.
  • Errors can differ from GNU and we should aim to make them better than GNU.

We advertise a goal of (almost) 100% GNU compatibility and I think we need to figure out whether that includes error messages. We currently have some parts of the code which try really hard to give the same errors and other parts which blatantly ignore the GNU messages. As a community, we need to decide what we want do to here.

My personal opinion is that we should not make error messages identical to GNU, because I think that this is an area where we could provide a significant improvement over GNU, by making prettier and more informative messages. The code also usually becomes simpler because we need to jump through fewer hoops to match GNU. However, this means that we need to patch the GNU test suite a lot where they test for specific messages.

Note: I'm not advocating that we change when messages pop up, only what the messages look like.

Questions to discuss:

  1. Is an improvement in error messages worthwhile?
  2. Are there scripts which rely on specific messages that we would break by introducing different messages?
  3. Would you expect a drop-in replacement for coreutils to have identical error messages?
  4. What is your personal preference on this?

Once we settle on something, I propose we add it to the documentation and the contributors guide.

Random selection of some relevant issues/PRs:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading this issue and reviewing the referenced issues and pull requests, especially the GNU compatibility discussions and test-suite changes. Inspect the current documentation and contributors guide to see where a policy belongs. Done means the community has decided how error-message compatibility should work and the decision is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.