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

Remove Renames of Internal Packages #6975

Open
cwfitzgerald opened this issue Jan 23, 2025 · 6 comments
Open

Remove Renames of Internal Packages #6975

cwfitzgerald opened this issue Jan 23, 2025 · 6 comments
Labels
kind: refactor Making existing function faster or nicer type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

Internally we currently have the following renames in the codebase:

  • wgpu_core -> wgc
  • wgpu_hal -> hal
  • wgpu_types -> wgt`

This is a thing that can trip up newcomers to the project as the names come from out of nowhere. An uncontroversial first step is to move the aliases from inside the Cargo.toml to in the code, so they can be more easily seen.

We have discussed this at our 2025-01-25 meeting to change to the following:

  • wgpu_core (do not rename due to conflict with ::core)
  • wgpu_hal -> hal
  • wgpu_typtes -> types
@cwfitzgerald cwfitzgerald added kind: refactor Making existing function faster or nicer type: enhancement New feature or request labels Jan 23, 2025
@sagudev
Copy link
Contributor

sagudev commented Jan 23, 2025

An uncontroversial first step is to move the aliases from inside the Cargo.toml to in the code, so they can be more easily seen.

In servo we currently have something like this and it's a nightmare. Rust-Analyzer does not consider aliases (we have defined them in root create), so all auto imports uses what's written in toml file (do note that servo has interesting integration with RA that might be causing those problems).

@cwfitzgerald
Copy link
Member Author

I'll definitely make sure to give it a test!

@cwfitzgerald
Copy link
Member Author

Thankfully it seems RA deals with it correctly, so that's probably a servo specific thing.

@sagudev
Copy link
Contributor

sagudev commented Jan 23, 2025

@ErichDonGubler how will this effect Firefox?

@ErichDonGubler
Copy link
Member

@sagudev: We use a Cargo workspace with vendored deps., so I don't think it will change anything on Firefox's end. The best way to find out is to do it, I guess!

@sagudev
Copy link
Contributor

sagudev commented Jan 24, 2025

@sagudev: We use a Cargo workspace with vendored deps., so I don't think it will change anything on Firefox's end. The best way to find out is to do it, I guess!

So Firefox will keep current aliases? https://searchfox.org/mozilla-central/source/gfx/wgpu_bindings/Cargo.toml#46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: refactor Making existing function faster or nicer type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants