-
Notifications
You must be signed in to change notification settings - Fork 1k
Replace winreg with windows-registry
#3896
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
Conversation
windows-registrywinreg with windows-registry
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.
I haven't done a complete review yet, because I think there's a bunch of stuff left to clean up. The core change looks great though, thanks for working on this!
djc
left a comment
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.
Overall a really nice improvement!
|
Sorry, but it turns out I had to make some changes to registry-related API in #3893. Hopefully it won't be too hard to rebase on top of my changes. |
Oh, I think I'd better replace dependency from scratch lest appear some unexpect problems.😅 |
|
This PR will keep closed until |
|
@InfyniteHeap FYI microsoft/windows-rs#3119 has been closed, so you might restart your work on this one! |
Sounds great! I'll restart my work when new version of |
@InfyniteHeap You shouldn't update |
It seems that I should only open VS Code to let it automatically update |
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 PR is getting even clearer than the previous iteration, modulo some eventual rebases (esp. after @kennykerr's possible API adjustments). Good job!
PS: As a favor, please consider listing @ChrisDenton as a co-author of some (or all) of your commits when applicable :)
djc
left a comment
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 looks good to me, thanks for all the work!
|
I could implement Deref in place of as_wide and that would provide all of this directly. |
|
Current status: Waiting for a new upstream release to ship microsoft/windows-rs#3148... |
|
Here's the |
djc
left a comment
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.
@kennykerr what's the rationale for using all-uppercase names for stuff like HSTRING and HRESULT? Are you trying to match the upstream names exactly? It looks rather unidiomatic.
There are countless identifiers in the Windows API. It's just not very practical to come up with different names - it has been attempted. It also makes it a lot harder to cross-reference documentation and source code for equivalent types. |
|
What about these changes? |
djc
left a comment
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.
I think this is looking great. @InfyniteHeap and @kennykerr thanks for all the work! Would be nice to get that windows-registry release out so that we can move forward with this.
|
Coming up: microsoft/windows-rs#3293 |
|
Version 0.3.0 of the windows-registry crate has been published. https://github.com/microsoft/windows-rs/releases/tag/0.60.0 |
|
Can you squash all of your changes into a single commit? |
I've done this. |
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.
LGTM, and thanks for your work @InfyniteHeap!
PS: You may proceed with cleanup PRs such as the one discussed in #3896 (comment) shortly after.
Closes #3779.
APIs provided by
winregcrate is not safe, simple and abstract enough. Besides that, it probably also contains protential bugs. Because of that, it is better to replace it withwindows-registrycrate, which is officially published and maintained by Microsoft.