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

Avoid showing negations of ranges in error messages #981

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jan 18, 2024

Closes #980

@zanieb zanieb added the error messages Messaging when something goes wrong label Jan 19, 2024
write!(
f,
"{}",
PackageRange::compatibility(self.package, &set.complement())
Copy link
Member Author

Choose a reason for hiding this comment

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

I actually don't think set is guaranteed to be a single segment here so the pull request title is misleading. Regardless, it seems better to use the complement than to negate a section. Worth keeping in mind when we start to see real-world errors.

@zanieb zanieb changed the title Avoid showing negations of single ranges in error messages Avoid showing negations of ranges in error messages Jan 19, 2024
Closes #980

# Conflicts:
#	crates/puffin/tests/pip_install_scenarios.rs
@zanieb zanieb merged commit ae7a2cd into main Jan 19, 2024
3 checks passed
@zanieb zanieb deleted the zb/negation-single branch January 19, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid showing negations of single ranges in error messages
2 participants