Skip to content
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

Improved error message when no baseline version found on crates.io #456

Merged
merged 7 commits into from
May 29, 2023

Conversation

era
Copy link
Contributor

@era era commented May 28, 2023

Fixes #183.

The new error message now is:

Error: tinylang not found in registry. The registry is crates.io. Crates published on a custom registry cannot be checked using default settings, see https://github.com/obi1kenobi/cargo-semver-checks/issues/166

Where tinylang is the crate I tested the program.

Let me know how you want to change the error message :)

@obi1kenobi
Copy link
Owner

Neat, thanks for the PR! The new message is certainly a lot better, and merging it would already be an improvement.

In case you're interested in doing one more round of polish, I wanted to suggest a couple of options for further improvements if you'd be open to it:

  • The repetition of "registry" in the beginning is a bit verbose. Concise errors are best. Can we shorten it to Error: tinylang not found in registry (crates.io) or similar?
  • Do you think linking to the FAQ section on checking non-crates.io crates might be a better option?
  • It's possible at this point in the code that the user didn't actually use default settings, and in that case the reference to default settings would be confusing. The underlying problem is that we're trying to look up a crate version in the registry, and failing since the registry doesn't know about the crate. Perhaps we can reuse some language from the FAQ entry and nudge the user toward the workaround of supplying a baseline themselves (and not just a baseline version number).

Don't worry about the nightly failure, that's a "me" problem and not anything you did. I'm on it.

Also, might you be interested in tackling some more issues in the project? If you'd like, I'd be happy to act as concierge and suggest issues if you let me know what sorts of things you find interesting.

@obi1kenobi obi1kenobi self-requested a review May 29, 2023 01:27
@era
Copy link
Contributor Author

era commented May 29, 2023

Hi @obi1kenobi , thank you for the quick review.

I tried to reduce the message in this new revision, I hope I was able to still pass the right message. Since the problem is not necessarily the usage of a custom registry, but also the possibility of the user not even publishing on one I tried to follow your advice and be a bit more generic towards the root cause.

I think the FAQ makes sense, the person facing the error will probably go to the GitHub issue and follow the link to the FAQ anyway, so maybe this way we can optimize it a bit.

Let me know if you want me to rephrase something on the error message.

Also, might you be interested in tackling some more issues in the project? If you'd like, I'd be happy to act as concierge and suggest issues if you let me know what sorts of things you find interesting.

I would love to :), I just don't want to delay any important feature, so any task that is not high-priority and I can take my time to work on it would be perfect.

src/rustdoc_gen.rs Outdated Show resolved Hide resolved
@obi1kenobi obi1kenobi enabled auto-merge (squash) May 29, 2023 21:55
@obi1kenobi obi1kenobi merged commit f46f1d2 into obi1kenobi:main May 29, 2023
@obi1kenobi
Copy link
Owner

Awesome, thanks for the help! Depending on your interests, there are at least two flavors of issues to choose from.

One set is issues that directly improve the CLI and ergonomics of using the tool. A few example issues:

Another direction is improving our checking capabilities, like adding more lints and improving existing ones. For example:

Sometimes, improving our checking capabilities requires making changes in the trustfall-rustdoc-adapter crate as well. I'd be happy to help you get onboarded — it isn't nearly as hard as it looks — and you could make a seriously valuable contribution by writing up onboarding docs we could use for future contributors.

None of these are particularly time-sensitive, so don't worry about taking your time. We're all volunteers here so things get done when they get done :)

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.

Improved error message when no baseline version found on crates.io
2 participants