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

Generated windows-sys pathnames are capitalized which is unexpected #1346

Closed
yoshuawuyts opened this issue Nov 19, 2021 · 3 comments
Closed
Labels
question Further information is requested

Comments

@yoshuawuyts
Copy link
Member

We had a customer provide feedback via Twitter on the windows-sys bindings. We currently generate capitalized module names, which conflicts with the naming guidelines outlined in RFC 430. They appear to be a Rust programmer coming from winapi, and for them this appears to be odd enough to call out:

why are all the module names camelcase?! this is non-conformant per rfc 430. i used to use the autogen bindings but this was changed at some point and it makes rust-analyzer very unhappy (not to mention the huge amount of disk space it eats up) so i switched back to winapi

source: @jc0f0116 on Twitter

As I understand it we currently use capitalized path names because that matches the metadata. I do agree with the customer that it does feel somewhat out of place though, in part also because winapi has chosen to keep submodule paths lowercased.

I feel like it would be to our benefit if we can help make the transition from winapi to windows-sys as smooth as possible. This could be a relatively easy improvement for users trying out windows-sys for the first time. Is this something we can consider changing?

@kennykerr kennykerr added enhancement New feature or request and removed enhancement New feature or request labels Nov 19, 2021
@kennykerr
Copy link
Collaborator

This was previously attempted but ultimately rejected. More info: #646

@kennykerr kennykerr added the question Further information is requested label Nov 19, 2021
@crlf0710
Copy link

Just want to leave a note here that in the current status quo improper capitalization also causes inferior error message and possible autofix diagnostic information supressed. Though this should be fixed in rustc-side.

For an example see rust-lang/rust#82140 .

@yoshuawuyts
Copy link
Member Author

I see, that reasoning makes sense. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants