-
Notifications
You must be signed in to change notification settings - Fork 122
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
Include advertised version in BindError::UnsupportVersion
#671
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #671 +/- ##
==========================================
+ Coverage 73.02% 73.17% +0.14%
==========================================
Files 47 47
Lines 7779 7829 +50
==========================================
+ Hits 5681 5729 +48
- Misses 2098 2100 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
wayland-client/src/globals.rs
Outdated
BindError::UnsupportedVersion {} => { | ||
write!(f, "the requested version of the global is not supported") | ||
BindError::UnsupportedVersion(version) => { | ||
write!(f, "the requested version {version} of the global is not supported") |
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.
This wording suggests that {version}
is the version that was requested by the user, not that advertised by the compositor.
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.
Ah my mistake, I got confused there!
Should I remove the {version}
completely or reorder the sentence to announce the actually available version?
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 change the sentence so that it uses version
but in a meaningful way
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.
What do you think of the available version {version} of the global is lower than the requested version
?
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.
sound good yes 👍
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.
@elinorbgr It is now in the updated commit
The |
@@ -232,7 +226,7 @@ impl From<InvalidId> for GlobalError { | |||
#[derive(Debug)] | |||
pub enum BindError { | |||
/// The requested version of the global is not supported. | |||
UnsupportedVersion, | |||
UnsupportedVersion(u32), |
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.
This is a breaking change, so please include a changelog entry for this
Would a similar change be accepted for In this specific case I used to get:
On
I'd like to include |
Reporting the advertised version is helpful because I can then report this to the user in case of an error.
This way I can get more information in a reported issue.
I also added two code clean up commits since the code was right next to each other.
The tests did not run successfully but they don't run through on master either.
Both branches fail at
client_receive_generic_error
: