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

Upgrade Deno from v2.0.2 to v2.1.4 #1049

Merged
merged 4 commits into from
Jan 4, 2025
Merged

Upgrade Deno from v2.0.2 to v2.1.4 #1049

merged 4 commits into from
Jan 4, 2025

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Nov 21, 2024

Here are some good reasons to upgrade to newest Deno:

  1. Deno 2.1 is (or will be) the first ever LTS version of Deno

  2. 7% speedier?

image

Simple Bash script I'm using to benchmark this:

#!/bin/bash

set -euxo pipefail

hyperfine_jobs=()
for v in 2.0.6 2.1.0; do
    deno clean
    deno upgrade $v
    deno task compile
    mv pkgx pkgx-deno-$v
    hyperfine_jobs+=("./pkgx-deno-$v git@2.44.0 --version")
done

exec pkgx hyperfine --warmup 2 --shell none --runs 50 "${hyperfine_jobs[@]}"

@coveralls
Copy link

coveralls commented Nov 21, 2024

Pull Request Test Coverage Report for Build 12612003826

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.4%) to 92.492%

Files with Coverage Reduction New Missed Lines %
src/utils/execve.ts 1 96.39%
Totals Coverage Status
Change from base Build 11988281915: 1.4%
Covered Lines: 1376
Relevant Lines: 1490

💛 - Coveralls

@jhheider
Copy link
Contributor

deno 2.1.0 build currently failing for linux/aarch64; fix in research. https://github.com/pkgxdev/pantry/actions/runs/11946529159/job/33301044063

@felipecrs
Copy link
Contributor Author

felipecrs commented Nov 21, 2024

deno 2.1.0 build currently failing for linux/aarch64; fix in research. pkgxdev/pantry/actions/runs/11946529159/job/33301044063

Ops, got it.

I am also investigating another issue. I was expecting a much better startup time with Deno 2.1.0:

@felipecrs
Copy link
Contributor Author

felipecrs commented Nov 21, 2024

Turns out Deno's 2.1.0 code caching is working indeed.

Something to be aware of is that running pkgx with Deno 2.1.0 will create files outside pkgx's cache directory, unless deno compile --no-code-cache.

# let's start cleandeno clean
Removed /home/felipecrs/.cache/deno (7569 files, 86.04MB)./pkgx-cc --syncdeno clean
Removed /home/felipecrs/.cache/deno (4 files, 76.27KB)

EDIT: Correction:

Code cache will be written to /tmp/deno-compile-pkgx.cc. Whatever is being added to ~/.cache/deno is unrelated to code cache.

@jhheider
Copy link
Contributor

looks like the build worked for 2.1.1, so i'm guessing their changes fixed it.

@felipecrs felipecrs changed the title Upgrade Deno from v2.0.2 to v2.1.0 Upgrade Deno from v2.0.2 to v2.1.1 Nov 21, 2024
@mxcl
Copy link
Member

mxcl commented Nov 22, 2024

Strictly ^2.0.2 will use 2.1.1 if available.

image

@mxcl mxcl closed this Nov 22, 2024
@mxcl
Copy link
Member

mxcl commented Nov 22, 2024

Hmm didn't mean to close this.

@mxcl mxcl reopened this Nov 22, 2024
@felipecrs
Copy link
Contributor Author

Maybe it would be a good idea to have full control over Deno's version. It would make the changelog easier and also improve reproducibility.

But anyway, whatever you prefer. What really matters is that the new Deno version is used.

@mxcl, slightly related, deno compile now has an --include flag to embed arbitrary files. Maybe it would be useful to embed the SQLite binary?

@felipecrs felipecrs changed the title Upgrade Deno from v2.0.2 to v2.1.1 Upgrade Deno from v2.0.2 to v2.1.4 Jan 4, 2025
@felipecrs
Copy link
Contributor Author

@mxcl kindly pinging you.

@mxcl mxcl merged commit 67b6bdf into pkgxdev:main Jan 4, 2025
16 checks passed
@felipecrs felipecrs deleted the deno2.1 branch January 4, 2025 21:00
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.

4 participants