You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to implement #37, we'll need to be able to handle multiple copies of a crate, as crates are entirely recompiled and linked separately when they have different feature flags.
I suggest we do what cargo does: generate a hash that can be supplied to rustc's -C metadata argument for the purpose of disambiguation.
I wrote a prototype implementation that uses the rule's path for this purpose here, that I can use to prepare a "proper" implementation here.
@davidzchen Are there any issues you foresee in using the rule's path as a unique identifier for a crate?
The text was updated successfully, but these errors were encountered:
Basically, when cargo resolves features, it unions them across the dependency tree. That means that if your crate root, depending on "foo" asks for "default-features=false", but your crate root depends on "bar" that depends on "foo" and permits the default features, your crate root gets them too! There is only one version of each rlib compiled for an entire workspace!
I believe we can close this, but I'd like to think on it a little more.
To add: This is actually the internal data structure they use to represent the dependency graph. Note, that the nodes, "PackageId", aren't specific to any set of features. All instances of "PackageId" must use on the same features.
In order to implement #37, we'll need to be able to handle multiple copies of a crate, as crates are entirely recompiled and linked separately when they have different feature flags.
I suggest we do what cargo does: generate a hash that can be supplied to rustc's
-C metadata
argument for the purpose of disambiguation.I wrote a prototype implementation that uses the rule's path for this purpose here, that I can use to prepare a "proper" implementation here.
@davidzchen Are there any issues you foresee in using the rule's path as a unique identifier for a crate?
The text was updated successfully, but these errors were encountered: