about summary refs log tree commit diff
path: root/tests/codegen/array-codegen.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-18 20:54:38 +0000
committerbors <bors@rust-lang.org>2024-03-18 20:54:38 +0000
commit59b9cc17f9a57176e21492e974e64a83b015166d (patch)
tree37d8b83b0ba000a3e3e30402b9163aea34d677d3 /tests/codegen/array-codegen.rs
parentd3eeadc242cffece74f8ff5e24029b6881b25a70 (diff)
parent76fb73a99e2794b0e67ff279e48a3f88c193d41a (diff)
downloadrust-59b9cc17f9a57176e21492e974e64a83b015166d.tar.gz
rust-59b9cc17f9a57176e21492e974e64a83b015166d.zip
Auto merge of #16871 - Veykril:dev-dependency-cycles, r=Veykril
fix: Skip problematic cyclic dev-dependencies

Implements a workaround for https://github.com/rust-lang/rust-analyzer/issues/14167, notably it does not implement the ideas surfaced in the issue, but takes a simpler to implement approach (and one that is more consistent).

Effectively, all this does is discard dev-dependency edges that go from a workspace library target to another workspace library target. This means, using a dev-dependency to another workspace member inside unit tests will always fail to resolve for r-a now, (instead of being order dependent and causing problems elsewhere) while things will work out fine in integration tests, benches, examples etc. This effectively acknowledges package cycles to be okay, but crate graph cycles to be invalid:

Quoting https://github.com/rust-lang/rust-analyzer/issues/14167#issuecomment-1864145772
> Though, if you have “package cycle” in integration tests, you’d have “crate cycle” in unit test.

We disallow the latter here, while continuing to support the former

(What's missing is to supress diagnostics for such unit tests, though not doing so might be a good deterrent, making devs avoid the pattern altogether)
Diffstat (limited to 'tests/codegen/array-codegen.rs')
0 files changed, 0 insertions, 0 deletions