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

Introduce a new CrateOrigin variant Member #16174

Closed

Commits on Dec 21, 2023

  1. Introduce a new CrateOrigin variant Member

    CrateGraph has been suffering from ignoring a unified definition of a Workspace : Cargo
    rightly assumes that each project has its own workspace but in RA this assumption does not
    hold and this has caused problems for renaming symbols ( rust-lang#15656 ). What I propose is to add
    a new variant to `CrateOrigin` called `Member` ( the name is open to discussion :D ). Member will be assigned
    to workspace members and this is easy to find out as cargo provides this information directly. `CrateOrigin::Local`
    will now be those crates that workspaces depend on and these crates need to be in the local filesystem and open to editing ( current state of things doesn't
    really reflect what I describe but anyway... ) and `CrateOrigin::Library` will be the *vendor* crates.
    By doing this we can now express things like "a symbol is renameable if it originates from a user defined crate ( meaning if `CrateOrigin` is `Local` or `Member`)".
    This follows in part @ogapo's findings so let's thank them too!
    alibektas committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    68e9161 View commit details
    Browse the repository at this point in the history