Skip to content

The crate store does not deduplicate used crates #3474

Closed
@brson

Description

@brson

If you have code that links the same crate multiple times, the metadata loader may record several copies of the same crate in its crate list, e.g.

extern mod std(vers = "0.4");
extern std;

This could have potentially bad effects. It has already resulted a mysterious situation that caused all the crate hashes to change because of a spurious 'use'. I can imagine it also could cause types to not resolve if referenced from different mount points.

I believe that the metadata loader does make some effort to do this but it isn't sufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-metadataArea: Crate metadata

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions