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

zmerp-staging #2625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

zmerp-staging #2625

wants to merge 1 commit into from

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented Jan 15, 2025

No description provided.

Copy link
Collaborator

@The-personified-devil The-personified-devil left a comment

Choose a reason for hiding this comment

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

This should really be handled in dbg_connection! itself, not like this, the family of debug stuff might trip up a lot of other places too.

@zmerp
Copy link
Member Author

zmerp commented Jan 18, 2025

This should really be handled in dbg_connection! itself, not like this, the family of debug stuff might trip up a lot of other places too.

I can't find an easy way of doing this unfortunately. The macro takes a $($args:tt)* which doesn't allow me to single out the arguments. Apparently the issue is unsolvable because even if I single out the arguments, the variable to handle is mentioned only inside the string as string interpolation

@zmerp zmerp force-pushed the zmerp-staging branch 2 times, most recently from 0ed9f86 to ce9c7e4 Compare January 18, 2025 22:10
@zmerp
Copy link
Member Author

zmerp commented Jan 18, 2025

Failure on warnings works


if !messages.is_empty() {
panic!("ci clippy produced warnings");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure there's also other compiler messages than diagnostics (you'd have to check the rustc docs tho), but we should only cause a ci failure when a diagnostic is actually emitted.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I checked and there's actually some, but they're not very frequent. Either way the diagnostic message filtering should be moved to the main filter (or a second stacked filter_map), as that'll fully ensure that causes no issues.

if let WiredConnectionStatus::NotReady(m) = status {
dbg_connection!("handshake_loop: Wired connection not ready: {m}");
#[cfg_attr(not(debug_assertions), allow(unused_variables))]
if let WiredConnectionStatus::NotReady(s) = status {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could make this an expect ig

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. All allows should be turned into expect actually.

@The-personified-devil
Copy link
Collaborator

But the moving the warning handling was more of a suggestion, if it doesn't work then it doesn't work.

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.

2 participants