Skip to content

Regression affecting static-init versions 1.0.1-1.0.3: "failed to resolve: use of unresolved module or unlinked crate parking_lot" #150646

@theemathas

Description

@theemathas
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/static_init-1.0.3/src/lazy_sequentializer.rs:336:13
[INFO] [stdout]     |
[INFO] [stdout] 336 |         use parking_lot::lock_api::GetThreadId;
[INFO] [stdout]     |             ^^^^^^^^^^^ use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]     |
[INFO] [stdout]     = help: if you wanted to use a crate named `parking_lot`, use `cargo add parking_lot` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/static_init-1.0.3/src/lazy_sequentializer.rs:371:21
[INFO] [stdout]     |
[INFO] [stdout] 371 |                 use parking_lot::lock_api::GetThreadId;
[INFO] [stdout]     |                     ^^^^^^^^^^^ use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]     |
[INFO] [stdout]     = help: if you wanted to use a crate named `parking_lot`, use `cargo add parking_lot` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/static_init-1.0.3/src/lazy_sequentializer.rs:338:13
[INFO] [stdout]     |
[INFO] [stdout] 338 |             parking_lot::RawThreadId.nonzero_thread_id().into(),
[INFO] [stdout]     |             ^^^^^^^^^^^ use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]     |
[INFO] [stdout]     = help: if you wanted to use a crate named `parking_lot`, use `cargo add parking_lot` to add it to your `Cargo.toml`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/static_init-1.0.3/src/lazy_sequentializer.rs:372:26
[INFO] [stdout]     |
[INFO] [stdout] 372 |                 if id == parking_lot::RawThreadId.nonzero_thread_id().into() {
[INFO] [stdout]     |                          ^^^^^^^^^^^ use of unresolved module or unlinked crate `parking_lot`
[INFO] [stdout]     |
[INFO] [stdout]     = help: if you wanted to use a crate named `parking_lot`, use `cargo add parking_lot` to add it to your `Cargo.toml`

This regression appears to affect the static-init crate versions 1.0.1-1.0.3, when built with debug_assertions on.

Explanation of the regression (Edit: This explanation is wrong), according to @cuviper, copied from zulip:

  • static-init's feature "debug_order" enables parking-lot
  • the code that uses it is gated on cfg(debug_mode) (not feature)
  • the build script sets cfg "debug_mode" for feature "debug_order" or for debug_assertions, until 1.0.4 removed the latter
  • thus it was trying to use parking-lot in all debug builds until 1.0.4 fixed that

and I think it's clearly the intention of #149273 that they shouldn't have been able to use parking-lot implicitly before

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueT-cargoRelevant to the cargo team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    Status

    Nominated

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions