Skip to content

Couldn't build against Deno 1.23.0  #1174

@trap000d

Description

@trap000d

Bug description

Hi, I'm maintainer of Arch Linux package quarto-cli (0.9.594 currenly). Few days ago deno was updated there to 1.23.0 With the new Deno version I'm getting half a dozen of errors during the build:

../dist/bin/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/import_map.json bld.ts prepare-dist --log-level info
Using configuration:
{"productName":"Quarto","version":"0.9","importmap":"/home/trap000d/src/quarto-cli/src/dev_import_map.json","directoryInfo":{"root":"/home/trap000d/src/quarto-cli","pkg":"/home/trap000d/src/quarto-cli/package","dist":"/home/trap000d/src/quarto-cli/package/dist","share":"/home/trap000d/src/quarto-cli/package/dist/share","src":"/home/trap000d/src/quarto-cli/src","out":"/home/trap000d/src/quarto-cli/package/out","bin":"/home/trap000d/src/quarto-cli/package/dist/bin"}}

Moving supporting files
Ensuring dir /home/trap000d/src/quarto-cli/package/dist/share exists
Copying /home/trap000d/src/quarto-cli/COPYING.md to /home/trap000d/src/quarto-cli/package/dist/share/COPYING.md
Ensuring dir /home/trap000d/src/quarto-cli/package/dist/share exists
Copying /home/trap000d/src/quarto-cli/COPYRIGHT to /home/trap000d/src/quarto-cli/package/dist/share/COPYRIGHT
Ensuring dir /home/trap000d/src/quarto-cli/package/dist exists
Copying /home/trap000d/src/quarto-cli/src/resources to /home/trap000d/src/quarto-cli/package/dist/share
Ensuring dir /home/trap000d/src/quarto-cli/package/dist/bin exists
Copying /home/trap000d/src/quarto-cli/src/resources/vendor to /home/trap000d/src/quarto-cli/package/dist/bin/vendor


Creating Deno Bundle
/home/trap000d/src/quarto-cli/package/dist/bin/quarto.js
["/home/trap000d/src/quarto-cli/package/dist/bin/tools/deno","bundle","--unstable","--importmap=/home/trap000d/src/quarto-cli/src/dev_import_map.json","/home/trap000d/src/quarto-cli/src/quarto.ts","/home/trap000d/src/quarto-cli/package/dist/bin/quarto.js"]
Check file:///home/trap000d/src/quarto-cli/src/quarto.ts
error: TS2352 [ERROR]: Conversion of type 'bigint' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
        const usizeBytes = dylib.symbols.deno_dom_usize_len() as number;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/trap000d/src/quarto-cli/src/core/deno-dom.ts:61:28

TS2783 [ERROR]: 'type' is specified more than once, so this usage will be overwritten.
        type: "full",
        ~~~~~~~~~~~~
    at file:///home/trap000d/src/quarto-cli/src/project/types/website/listing/website-listing.ts:245:9

TS2785 [ERROR]:     This spread always overwrites this property.
            ...options[kFeed],
            ~~~~~~~~~~~~~~~~~
        at file:///home/trap000d/src/quarto-cli/src/project/types/website/listing/website-listing.ts:246:9

TS2352 [ERROR]: Conversion of type 'undefined' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
            giscusOptions[kGiscusCategoryId] as string,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/trap000d/src/quarto-cli/src/project/types/website/website-giscus.ts:77:13

TS2551 [ERROR]: Property 'sleepSync' does not exist on type 'typeof Deno'. Did you mean 'seekSync'?
        Deno.sleepSync(3000);
             ~~~~~~~~~
    at file:///home/trap000d/src/quarto-cli/src/project/serve/serve.ts:571:14

    'seekSync' is declared here.
      export function seekSync(
                      ~~~~~~~~
        at asset:///lib.deno.ns.d.ts:999:19

TS2564 [ERROR]: Property '[Symbol.toStringTag]' has no initializer and is not definitely assigned in the constructor.
  readonly [Symbol.toStringTag]: string;
           ~~~~~~~~~~~~~~~~~~~~
    at file:///home/trap000d/src/quarto-cli/src/publish/netlify/api/core/CancelablePromise.ts:25:12

Found 5 errors.
ERROR: Failure to bundle /home/trap000d/src/quarto-cli/src/quarto.ts

Error: Failure to bundle /home/trap000d/src/quarto-cli/src/quarto.ts
    at bundle (file:///home/trap000d/src/quarto-cli/package/src/util/deno.ts:38:11)
    at async prepareDist (file:///home/trap000d/src/quarto-cli/package/src/common/prepare-dist.ts:39:3)
    at async Command.fn (file:///home/trap000d/src/quarto-cli/package/src/cmd/pkg-cmd.ts:38:5)
    at async Command.execute (https://deno.land/x/[email protected]/command/command.ts:1275:7)
    at async quartoBld (file:///home/trap000d/src/quarto-cli/package/src/bld.ts:48:3)
    at async mainRunner (file:///home/trap000d/src/quarto-cli/src/core/main.ts:39:5)
    at async file:///home/trap000d/src/quarto-cli/package/src/bld.ts:52:3

After rolling back to old Deno version (1.22.3) all seems OK. As a temporary override I've added "deno <1.23.0" into PKGBUILD. However it's just a matter of time when other distributions (Manjaro of Fedora) will pick up the new Deno. So please take a look occasionally at these errors.

Regards.

Checklist

  • formatted your issue so it is easier for us to read?
  • included a minimal, self-contained, and reproducible example?
  • documented the quarto version you're running, by providing the output produced by quarto check in a terminal in your issue?
  • documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • documented which operating system you're running? If on Linux, please provide the specific distribution as well.
  • upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions