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

Update Odilia to atspi v0.21.0 #144

Merged
merged 18 commits into from
May 24, 2024
Merged

Update Odilia to atspi v0.21.0 #144

merged 18 commits into from
May 24, 2024

Conversation

TTWNO
Copy link
Member

@TTWNO TTWNO commented Apr 21, 2024

No description provided.

@TTWNO TTWNO marked this pull request as draft April 21, 2024 23:03
@TTWNO
Copy link
Member Author

TTWNO commented Apr 21, 2024

Oooops, looks like I pushed previous commit to main by accident.

@TTWNO TTWNO marked this pull request as ready for review April 26, 2024 20:47
Copy link
Member

@albertotirla albertotirla left a comment

Choose a reason for hiding this comment

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

alright, here's a small review on this pr. It's shaping up very nicely indeed, with some extra clarifications in place perhaps and afew code changes as outlined in the following, if necesary, this would be mergeable. Some comments in there could be eronious, if so, it's because I'm not very familiar with this part of the codebase, especially the cache. If that's the case, feel free to mark the conversation as solved without a comment.

cache/src/accessible_ext.rs Show resolved Hide resolved
cache/src/accessible_ext.rs Show resolved Hide resolved
cache/src/accessible_ext.rs Outdated Show resolved Hide resolved
cache/src/accessible_ext.rs Outdated Show resolved Hide resolved
cache/src/accessible_ext.rs Outdated Show resolved Hide resolved
cache/src/accessible_ext.rs Outdated Show resolved Hide resolved
cache/src/convertable.rs Outdated Show resolved Hide resolved
odilia/src/events/object.rs Outdated Show resolved Hide resolved
odilia/src/events/object.rs Outdated Show resolved Hide resolved
cache/src/accessible_ext.rs Show resolved Hide resolved
async fn to_accessible(&self) -> Result<AccessibleProxy, Self::Error>;
fn to_accessible(
&self,
) -> impl Future<Output = Result<AccessibleProxy, Self::Error>> + Send;
Copy link
Member

Choose a reason for hiding this comment

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

you don't have to manually return a future like that, the traits can still be async as long as we bump the msrv. Sure, no longer an object safe trait, but yeah, we may be able to live without that

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we need to specify the bounds.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, in stead of this:

	fn to_accessible(
 		&self,
 	) -> impl Future<Output = Result<AccessibleProxy, Self::Error>> + Send;

you could do something like this:

	async fn to_accessible(
 		&self,
 	) -> Result<AccessibleProxy, Self::Error>>;

I dk about accessible proxy, but essentially the send value shouldn't be required on the future itself, because the compiler boxes it, and futures are send by default unless otherwise noted, so yeah. I dk if that's possible to be done, but it will make for less a code complexity

cache/src/convertable.rs Show resolved Hide resolved
cache/src/convertable.rs Show resolved Hide resolved
cache/src/convertable.rs Show resolved Hide resolved
cache/src/convertable.rs Show resolved Hide resolved
cache/src/convertable.rs Show resolved Hide resolved
Err(e) => return Err(e),
};
if update_state(state, &a11y_prim, event.state, state_value)? {
tracing::debug!("Updating of the state was not succesful! The item with id {:?} was not found in the cache.", a11y_prim.id);
Copy link
Member

Choose a reason for hiding this comment

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

debug is more acceptable, but also the spelling error remains. One can always lower it to trace as well, because cache is initially not consistent anyway, and even debug log can be clogged by this, but since it's not error anymore, this is just a suggestion

@albertotirla
Copy link
Member

so then, is this mergeable? I'll merge it, if so

@TTWNO TTWNO merged commit 23797bd into main May 24, 2024
9 checks passed
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