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

Update lazy_static dependency to "1.0.2" #2378

Merged
merged 1 commit into from
Nov 30, 2020
Merged

Update lazy_static dependency to "1.0.2" #2378

merged 1 commit into from
Nov 30, 2020

Conversation

Tamschi
Copy link
Contributor

@Tamschi Tamschi commented Nov 30, 2020

This fixes a bug that can happen in combination with cargo +nightly update -Z minimal-versions on dependent projects.

(I'd like to add this check to my CI script, but it's not a blocking issue otherwise.)

Cause

See rust-lang-nursery/lazy-static.rs#107.

Replication

  • Create a new project with a Cargo.toml like this:

    [package]
    name = "dependency-test"
    version = "0.0.0"
    edition = "2018"
    publish = false
    
    [dependencies]
    wasm-bindgen = "0.2.69"
  • cargo +nightly update -Z minimal-versions && cargo check

Error

error: cannot find macro `__lazy_static_internal` in this scope
    --> […]\wasm-bindgen-backend-0.2.69\src\codegen.rs:1282:9
     |
1282 | /         lazy_static::lazy_static! {
1283 | |             static ref DESCRIPTORS_EMITTED: Mutex<HashSet<String>> = Default::default();
1284 | |         }
     | |_________^
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find value `DESCRIPTORS_EMITTED` in this scope
    --> […]\wasm-bindgen-backend-0.2.69\src\codegen.rs:1288:13
     |
1288 |         if !DESCRIPTORS_EMITTED
     |             ^^^^^^^^^^^^^^^^^^^ not found in this scope

Fix

Attached. See also https://github.com/rust-lang-nursery/lazy-static.rs/releases/tag/1.0.2 to confirm this is the correct version.

Thanks!

@alexcrichton alexcrichton merged commit a125903 into rustwasm:master Nov 30, 2020
@alexcrichton
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants