https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • s

    samdd

    03/05/2023, 8:03 PM
    does anyone on the cloudflare workers dev team know how to respond to this: https://github.com/rustwasm/wasm-bindgen/issues/2562
  • s

    samdd

    03/05/2023, 8:05 PM
    it's a bug that i can consistently reproduce on a specific route when using the rust wasm workers
  • s

    samdd

    03/05/2023, 8:05 PM
    according to the comment, apparently the cloudflare workerd runtime has different behaviour to the browsers runtime leading to the bug
  • s

    samdd

    03/05/2023, 8:06 PM
    the bug can also be ran into when serving a large amount of requests, aka load testing
  • s

    samdd

    03/05/2023, 8:06 PM
    i don't really know how to debug workerd to fix the issue, but it's a really annoying one that's stopping me from using workers in production
  • d

    dave

    03/05/2023, 8:28 PM
  • d

    dave

    03/05/2023, 8:28 PM
    what's this about?
  • s

    Skye

    03/05/2023, 8:29 PM
    Update your workers types 👀
  • d

    dave

    03/05/2023, 8:30 PM
    Copy code
    "@cloudflare/workers-types": "^4.20230228.0",
  • d

    dave

    03/05/2023, 8:30 PM
    isn't that up to date...?
  • j

    James

    03/05/2023, 8:30 PM
    ~~Yeah
    waitUntil
    expects promises to return `void`~~: https://github.com/Cloudflare-Mining/Cloudflare-Datamining/blob/87ef982bb7bbf9f8f1468f38de1dc1701e4a04cf/data/workers-types/experimental/index.d.ts#L291
  • k

    kian

    03/05/2023, 8:30 PM
    That was fixed in December
  • k

    kian

    03/05/2023, 8:30 PM
  • s

    Skye

    03/05/2023, 8:31 PM
    did they break it again
  • k

    kian

    03/05/2023, 8:31 PM
  • j

    James

    03/05/2023, 8:31 PM
    That's the latest
    experimental
    types from
    workers-types
    🤔
  • d

    dave

    03/05/2023, 8:31 PM
    oh right
  • d

    dave

    03/05/2023, 8:31 PM
    I need to change tsconfig.json
  • k

    kian

    03/05/2023, 8:31 PM
    Oh, return void
  • d

    dave

    03/05/2023, 8:31 PM
    @cloudflare/workers-types/experimental right?
  • j

    James

    03/05/2023, 8:31 PM
    oh wait I misread that type
  • j

    James

    03/05/2023, 8:32 PM
    yeah
    @cloudflare/workers-types/experimental
    should be fine
  • d

    dave

    03/05/2023, 8:34 PM
    hmm how do I "update" after changing it in tsconfig.json?
  • j

    James

    03/05/2023, 8:34 PM
    That's all you should need to do. What's your tsconfig look like?
  • d

    dave

    03/05/2023, 8:34 PM
    Copy code
    {
        "compilerOptions": {
            "noEmit": true,
            "module": "esnext",
            "target": "es2022",
            "lib": [
                "es2022"
            ],
            "strict": true,
            "alwaysStrict": true,
            "preserveConstEnums": true,
            "moduleResolution": "node",
            "sourceMap": true,
            "types": [
                "@cloudflare/workers-types/experimental",
            ]
        },
        "include": [
            "src"
        ],
        "exclude": [
            "node_modules",
            "dist",
            "test"
        ]
    }
  • j

    James

    03/05/2023, 8:34 PM
    You may have to reload vscode - it can be weird and sticky sometimes
  • d

    dave

    03/05/2023, 8:34 PM
    yeah I closed the folder and reopened it already
  • j

    James

    03/05/2023, 8:35 PM
    oh wait is this Hono?
  • j

    James

    03/05/2023, 8:35 PM
    https://github.com/honojs/hono/blob/64956cb57ded4f8b7833afd9a9059e6dac3bfaac/src/context.ts#L13
  • j

    James

    03/05/2023, 8:35 PM
    Hono wants
    void
1...232023212322...2509Latest