Skip to content

artifact-dependencies should auto use per-package-target forced-target #17050

@loynoir

Description

@loynoir

Problem

artifact-dependencies does not auto use per-package-target forced-target

Steps

actual

cargo-features = ["per-package-target"]

[package]
name = "foo"
...
forced-target = "x86_64-unknown-uefi"
[package]
name = "foo_test"
...

[dev-dependencies]
foo = { version = "0.1.0", path = "../foo", artifact = ["bin:foo"], target = "x86_64-unknown-uefi" }

expected

cargo-features = ["per-package-target"]

[package]
name = "foo"
...
forced-target = "x86_64-unknown-uefi"
[package]
name = "foo_test"
...

[dev-dependencies]
foo = { version = "0.1.0", path = "../foo", artifact = ["bin:foo"] }

Possible Solution(s)

artifact-dependencies should auto use per-package-target forced-target

  • when not declared, use forced target

  • when declared, same, warn no need

  • when declared, not same, fatal

Notes

related

#9096

#9406

Version

cargo 1.98.0-nightly (4d1f98451 2026-05-15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Z-bindepsNightly: binary artifact dependenciesZ-per-package-targetNightly: per-package-target

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions