-
Notifications
You must be signed in to change notification settings - Fork 790
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
Use consistent formatting for build system errors #9340
base: main
Are you sure you want to change the base?
Conversation
087878c
to
20bb50a
Compare
@@ -1105,7 +1105,7 @@ impl std::fmt::Display for PubGrubHint { | |||
Self::InvalidPackageMetadata { package, reason } => { | |||
write!( | |||
f, | |||
"{}{} Metadata for {} could not be parsed:\n{}", | |||
"{}{} Metadata for `{}` could not be parsed:\n{}", | |||
"hint".bold().cyan(), | |||
":".bold(), | |||
package.bold(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the package names be cyan? In the build failures, they're now cyan (but not bold)... But here, they're just bold.
974bb3d
to
4a5cd25
Compare
@@ -1068,7 +1068,7 @@ impl std::fmt::Display for PubGrubHint { | |||
Self::PrereleaseRequested { package, range } => { | |||
write!( | |||
f, | |||
"{}{} {} was requested with a pre-release marker (e.g., {}), but pre-releases weren't enabled (try: `{}`)", | |||
"{}{} `{}` was requested with a pre-release marker (e.g., {}), but pre-releases weren't enabled (try: `{}`)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is bad? We don't use backticks around the package name in the PubGrub error message (just this hint, now).
4a5cd25
to
126943b
Compare
Summary
These look pretty different from the help / hint messages we show on resolver failure. I've added color, backticks, and a "hint:" prefix.
Before:
After: