Skip to content

Unicode collation #551

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

Merged
merged 3 commits into from
Nov 10, 2022
Merged

Unicode collation #551

merged 3 commits into from
Nov 10, 2022

Conversation

d-sonuga
Copy link
Contributor

@d-sonuga d-sonuga commented Nov 7, 2022

Added support for the Unicode Collation protocol.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

Copy link
Member

@nicholasbishop nicholasbishop left a comment

Choose a reason for hiding this comment

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

Format check is failing, please run cargo fmt --all.

@phip1611
Copy link
Member

phip1611 commented Nov 8, 2022

Before merge, we'd also prefer a cleaner git history (I'm a little nitpicky here :)). Depending on your git expertise, we may help you with that.

  • no "merged branch main into feature branch"-commits
    --> instead: rebase onto latest main branch
  • no double commits with the same name
  • Squash where reasonable.

@d-sonuga
Copy link
Contributor Author

d-sonuga commented Nov 8, 2022

Checklist done.

@d-sonuga d-sonuga requested review from phip1611 and nicholasbishop and removed request for phip1611 and nicholasbishop November 9, 2022 08:49
);
}
} else {
warn!("The Unicode Collation protocol is not supported");
Copy link
Member

Choose a reason for hiding this comment

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

this should panic. Or do the other tests do it the same way?

I think if the OVMF version of our tests suddenly doesn't include a protocol anymore, we want to get notified. What does @nicholasbishop think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A number of the other tests do it the same way.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine for now, as you say a lot (but not all) of the tests have such a check.

I filed #553 for us to figure this out properly, but that can happen outside the context of this PR.

info!("Testing the Unicode Collation protocol");

if let Ok(handles) = bt.find_handles::<UnicodeCollation>() {
for handle in handles {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this makes sense.. but I'm not an expert with the uefi-API. Why would there be multiple handles to the same protocol? @GabrielMajeri @nicholasbishop

Copy link
Member

Choose a reason for hiding this comment

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

It looks like this protocol can have multiple instances (i.e. multiple handles). From section 21.1.1:
"One or more of the EFI_UNICODE_COLLATION_PROTOCOL instances may be present at one time.
Each protocol instance can support one or more language codes."

@phip1611
Copy link
Member

phip1611 commented Nov 9, 2022

LGTM, thanks for working on this @d-sonuga ! Only a few more things and then this will be ready for merge!

@nicholasbishop
Copy link
Member

I think everything's been addressed, lgtm :)

@nicholasbishop nicholasbishop merged commit 3a42bd1 into rust-osdev:main Nov 10, 2022
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.

3 participants