Repository: astral-sh/uv
File: crates/uv-resolver/src/pubgrub/report.rs (Rust)

Code before:
            Self::PlatformTags {
                package,
                version,
                tags,
            } => {
                let s = if tags.len() == 1 { "" } else { "s" };
                write!(
                    f,
                    "{}{} Wheels are available for `{}` ({}) on the following platform{s}: {}",
                    "hint".bold().cyan(),
                    ":".bold(),
                    package.cyan(),
                    format!("v{version}").cyan(),
                    tags.iter()
                        .map(|tag| format!("`{}`", tag.cyan()))
                        .join(", "),
                )
            }
            Self::ExcludeNewer {
                package,
                exclude_newer,
            } => {
                write!(
                    f,
                    "{}{} `{}` was filtered by `{}` to only include packages uploaded before {}. \
                    Consider removing the setting or updating it to a later date.",
                    "hint".bold().cyan(),
                    ":".bold(),
                    package.cyan(),
                    "--exclude-newer".green(),
                    exclude_newer.cyan(),
                )
            }
            Self::DisjointPythonVersion { python_version } => {
                write!(
                    f,
                    "{}{} While the active Python version is {}, \
                    the resolution failed for other Python versions supported by your \
                    project. Consider limiting your project's supported Python versions \
                    using `requires-python`.",
                    "hint".bold().cyan(),
                    ":".bold(),
                    python_version.cyan(),
                )
            }
            Self::DisjointEnvironment => {
                write!(
                    f,
                    "{}{} The resolution failed for an environment that is not the current one, \
                    consider limiting the environments with `tool.uv.environments`.",
                    "hint".bold().cyan(),

Review comment (suggestion):
We might want a different hint if `exclude-newer` is the cause, i.e., we could hint to use `exclude-newer-package` to change the target for this package

Code after:
                        best,
                        package.cyan(),
                        format!("v{version}").cyan(),
                        tags.iter()
                            .map(|tag| format!("`{}`", tag.cyan()))
                            .join(", "),
                    )
                } else {
                    let s = if tags.len() == 1 { "" } else { "s" };
                    write!(
                        f,
                        "{}{} Wheels are available for `{}` ({}) with the following Python ABI tag{s}: {}",
                        "hint".bold().cyan(),
                        ":".bold(),
                        package.cyan(),
                        format!("v{version}").cyan(),
                        tags.iter()
                            .map(|tag| format!("`{}`", tag.cyan()))
                            .join(", "),
                    )
                }
            }
            Self::PlatformTags {
                package,
                version,
                tags,
            } => {
                let s = if tags.len() == 1 { "" } else { "s" };
                write!(
                    f,
                    "{}{} Wheels are available for `{}` ({}) on the following platform{s}: {}",
                    "hint".bold().cyan(),
                    ":".bold(),
                    package.cyan(),
                    format!("v{version}").cyan(),
                    tags.iter()
                        .map(|tag| format!("`{}`", tag.cyan()))
                        .join(", "),
                )
            }
            Self::ExcludeNewer {
                package,
                per_package,
                exclude_newer,
            } => {
                if *per_package {
                    write!(
                        f,
                        "{}{} `{}` was filtered by `{}` to only include packages uploaded \
                        before {}. Consider removing the setting or updating it to a later date.",
                        "hint".bold().cyan(),