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

package attribute is not respected when inheriting dependency from workspace #14851

Closed
momvart opened this issue Nov 22, 2024 · 1 comment
Closed
Labels
A-workspace-inheritance Area: workspace inheritance RFC 2906 C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@momvart
Copy link

momvart commented Nov 22, 2024

Problem

Regarding Renaming dependencies, it looks like that it's not respected when inheriting the dependency from the workspace.

Steps

  1. Add a dependency to your workspace.
  2. Reference it in one of the members.
  3. Rename it something else in the member and use the package attribute.

Example

Workspace:

# ...
[workspace.dependencies]
derive_more = { version = "1.0.0" }

Member:

[dependencies]
dm = { workspace = true, package = "derive_more" }

Possible Solution(s)

No response

Notes

Error:

error: failed to load manifest for workspace member `...`
referenced by workspace at `...`

Caused by:
  failed to parse manifest at `...`

Caused by:
  error inheriting `dm` from workspace root manifest's `workspace.dependencies.dm`

Caused by:
  `dependency.dm` was not found in `workspace.dependencies`

Version

cargo 1.84.0-nightly (69e595908 2024-11-16)
release: 1.84.0-nightly
commit-hash: 69e595908e2c420e7f0d1be34e6c5b984c8cfb84
commit-date: 2024-11-16
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Ubuntu 22.4.0 (jammy) [64-bit]
@momvart momvart added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Nov 22, 2024
@epage epage added the A-workspace-inheritance Area: workspace inheritance RFC 2906 label Nov 22, 2024
@epage
Copy link
Contributor

epage commented Nov 22, 2024

I believe this is a duplicate of #12546 and am closing in favor of that. If there is a reason for us to keep this open, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspace-inheritance Area: workspace inheritance RFC 2906 C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants