Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: denoland/deno
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.43.3
Choose a base ref
...
head repository: denoland/deno
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.43.4
Choose a head ref

Commits on May 16, 2024

  1. Copy the full SHA
    99babe5 View commit details
  2. fix(ext/node): process.uptime works without this (#23786)

    Fixes #23761
    
    Co-authored-by: Satya Rohith <me@satyarohith.com>
    bartlomieju and satyarohith committed May 16, 2024
    Copy the full SHA
    eca12e0 View commit details
  3. Copy the full SHA
    9e25512 View commit details
  4. fix(cli): panic with deno coverage (#23353)

    This PR directly addresses the issue raised in #23282 where Deno panics
    if `deno coverage` is called with `--include` regex that returns no
    matches.
    
    I've opted not to change the return value of `collect_summary` for
    simplicity and return an empty `HashMap` instead
    0xIchigo authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    ac32c0b View commit details
  5. Copy the full SHA
    faf0896 View commit details
  6. Copy the full SHA
    420023c View commit details
  7. fix(ext/web): update ongoing promise in async iterator return() met…

    …hod (#23642)
    
    See whatwg/webidl#1387 for context.
    
    There are new WPT tests for this change in
    web-platform-tests/wpt#44456. They pass on my
    local machine, but I'm not sure if I should update the WPT submodule for
    all of Deno as part of this PR?
    
    Fixes #22389
    
    ---------
    
    Co-authored-by: Asher Gomez <ashersaupingomez@gmail.
    MattiasBuelens authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    03488ca View commit details
  8. Copy the full SHA
    ad01a39 View commit details
  9. fix: Add missing "junction" type for SymlinkOptions.types (#23756)

    Junction symlink support is added in #22762, but `SymlinkOptions` and
    its documents are not updated.
    futsuuu authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    798fd09 View commit details
  10. fix(publish): error for missing version constraints on dry-publish in…

    …stead of just publish (#23798)
    
    Closes #22835
    dsherret authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    5a766b1 View commit details
  11. Copy the full SHA
    d4270e2 View commit details
  12. Copy the full SHA
    470dd8b View commit details
  13. fix(npm): make tarball extraction more reliable (#23759)

    1. Extracts to a directory beside the destination.
    2. Renames to the destination with retries.
    dsherret authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    bce6907 View commit details
  14. chore(tests): increase repl timeout on ci (#23812)

    https://github.com/denoland/deno/actions/runs/9084225162/job/24964698935
    
    ```
    ---- run::file_fetcher_preserves_permissions stdout ----
    command /Users/runner/work/deno/deno/target/debug/deno repl --quiet
    command cwd /Users/runner/work/deno/deno/tests/testdata
    ------ Start Full Text ------
    "const a = await import('http://localhost:4545/run/019_media_types.ts');\r\n"
    ------- End Full Text -------
    Next text: "\r\n"
    thread 'run::file_fetcher_preserves_permissions' panicked at tests/integration/run_tests.rs:4615:15:
    Timed out.
    ```
    
    Closes #23690
    Closes #23682
    Closes #23625
    dsherret authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    44cfb4f View commit details
  15. fix(runtime): output to stderr with colors if a tty and stdout is pip…

    …ed (#23813)
    
    This also fixes a bug where Deno would output to stderr with colours
    when piped and stdout was not piped.
    dsherret authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    0684ab3 View commit details
  16. Copy the full SHA
    8ce9aa5 View commit details
  17. Copy the full SHA
    fd484c3 View commit details
  18. fix: update swc_ecma_parser to 0.114.1 (#23816)

    Has some explicit resource management fixes.
    dsherret authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    bf30a43 View commit details
  19. fix(node): stub AsyncResource.emitDestroy() (#23802)

    <!--
    Before submitting a PR, please read
    https://docs.deno.com/runtime/manual/references/contributing
    
    1. Give the PR a descriptive title.
    
      Examples of good title:
        - fix(std/http): Fix race condition in server
        - docs(console): Update docstrings
        - feat(doc): Handle nested reexports
    
      Examples of bad title:
        - fix #7123
        - update docs
        - fix bugs
    
    2. Ensure there is a related issue and it is referenced in the PR text.
    3. Ensure there are tests that cover the changes.
    4. Ensure `cargo test` passes.
    5. Ensure `./tools/format.js` passes without changing files.
    6. Ensure `./tools/lint.js` passes.
    7. Open as a draft PR if your work is still in progress. The CI won't
    run
       all steps, but you can add '[ci]' to a commit message to force it to.
    8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
    label.
    -->
    
    Fixes #23397
    marvinhagemeister authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    f06fe73 View commit details
  20. Copy the full SHA
    b68e0cd View commit details
  21. perf(lsp): Cache semantic tokens for open documents (#23799)

    VScode will typically send a `textDocument/semanticTokens/full` request
    followed by `textDocument/semanticTokens/range`, and occassionally
    request semantic tokens even when we know nothing has changed. Semantic
    tokens also get refreshed on each change. Computing semantic tokens is
    relatively heavy in TSC, so we should avoid it as much as possible.
    
    Caches the semantic tokens for open documents, to avoid making TSC do
    unnecessary work. Results in a noticeable improvement in local
    benchmarking
    
    before:
    ```
    Starting Deno benchmark
    -> Start benchmarking lsp
       - Simple Startup/Shutdown 
          (10 runs, mean: 383ms)
       - Big Document/Several Edits 
          (5 runs, mean: 1079ms)
       - Find/Replace
          (10 runs, mean: 59ms)
       - Code Lens
          (10 runs, mean: 440ms)
       - deco-cx/apps Multiple Edits + Navigation
          (5 runs, mean: 9921ms)
    <- End benchmarking lsp
    ```
    
    after:
    ```
    Starting Deno benchmark
    -> Start benchmarking lsp
       - Simple Startup/Shutdown 
          (10 runs, mean: 395ms)
       - Big Document/Several Edits 
          (5 runs, mean: 1024ms)
       - Find/Replace
          (10 runs, mean: 56ms)
       - Code Lens
          (10 runs, mean: 438ms)
       - deco-cx/apps Multiple Edits + Navigation
          (5 runs, mean: 8927ms)
    <- End benchmarking lsp
    ```
    nathanwhit authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    17ed600 View commit details
  22. Copy the full SHA
    af47c06 View commit details
  23. fix(node): wrong worker_threads.terminate() return value (#23803)

    <!--
    Before submitting a PR, please read
    https://docs.deno.com/runtime/manual/references/contributing
    
    1. Give the PR a descriptive title.
    
      Examples of good title:
        - fix(std/http): Fix race condition in server
        - docs(console): Update docstrings
        - feat(doc): Handle nested reexports
    
      Examples of bad title:
        - fix #7123
        - update docs
        - fix bugs
    
    2. Ensure there is a related issue and it is referenced in the PR text.
    3. Ensure there are tests that cover the changes.
    4. Ensure `cargo test` passes.
    5. Ensure `./tools/format.js` passes without changing files.
    6. Ensure `./tools/lint.js` passes.
    7. Open as a draft PR if your work is still in progress. The CI won't
    run
       all steps, but you can add '[ci]' to a commit message to force it to.
    8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
    label.
    -->
    
    Fixes #23801
    
    ---------
    
    Signed-off-by: Marvin Hagemeister <marvinhagemeister50@gmail.com>
    Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
    marvinhagemeister and bartlomieju committed May 16, 2024
    Copy the full SHA
    5a3ad02 View commit details
  24. fix: widen aarch64 linux minimum GLIBC version by improving sysroot b…

    …uild (#23791)
    
    Fixes the sysroot to make it more reliable on aarch64. The sysroot we
    download as part of the build process now includes a small script to set
    up the linker flags required to build in that sysroot.
    
    Fixes #23775 
    
    Before:
    
    ```
    matt@raspberrypi:~ $ ~/.deno/bin/deno 
    /home/matt/.deno/bin/deno: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/matt/.deno/bin/deno)
    ```
    
    After:
    
    ```
    matt@raspberrypi:/tmp $ ./deno
    Deno 1.43.3
    exit using ctrl+d, ctrl+c, or close()
    REPL is running with all permissions allowed.
    To specify permissions, run `deno repl` with allow flags.
    ```
    mmastrac authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    62fcce2 View commit details
  25. chore: bump sysroot (#23830)

    Use the smaller, reproducible sysroot from
    https://github.com/denoland/deno_sysroot_build
    
    This saves about 50% of the transfer for each sysroot download.
    mmastrac authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    126091a View commit details
  26. chore: Fix flaky semantic tokens caching test (#23831)

    The stderr stream from the LSP is consumed by a separate thread, so it
    may not have processed the part we care about yet. Instead, wait until
    you see the measure for the request you care about.
    nathanwhit authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    03c7baf View commit details
  27. Copy the full SHA
    125b420 View commit details
  28. Copy the full SHA
    b84eacf View commit details
  29. perf(compile): Do not checksum eszip content (#23839)

    Related: denoland/eszip#181
    
    eszip < v0.69.0 hashes all its contents to ensure data integrity. This
    feature is not necessary in Deno CLI as the binary integrity guarantee
    is deemed an external responsibility (ie it is to be assumed that, if
    necessary, the compiled binary will be checksumed externally prior to
    being executed).
    
    eszip >= v0.69.0 no longer performs this checksum by default. This
    reduces the cold-start time of the compiled binaries, proportionally to
    their size.
    arnauorriols authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    042376f View commit details
  30. Copy the full SHA
    b46e81b View commit details
  31. fix(ext/node): homedir() getpwuid/SHGetKnownFolderPath fallback (#…

    …23841)
    
    **Unix**: Returns the value of the HOME environment variable if it is
    set even if it is an empty string. Otherwise, it tries to determine the
    home directory by invoking the
    [getpwuid_r](https://linux.die.net/man/3/getpwuid_r) function with the
    UID of the current user.
    
    **Windows**: Returns the value of the USERPROFILE environment variable
    if it is set and it is not an empty string. Otherwise, it tries to
    determine the home directory by invoking the
    [SHGetKnownFolderPath](https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath)
    function with
    [FOLDERID_Profile](https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid).
    
    Fixes #23824
    littledivy authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    925be25 View commit details
  32. fix(node): seperate worker module cache (#23634)

    Construct a new module graph container for workers instead of sharing it
    with the main worker.
    
    Fixes #17248
    Fixes #23461
    
    ---------
    
    Co-authored-by: David Sherret <dsherret@gmail.com>
    2 people authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    4137a08 View commit details
  33. fix(node): error when throwing FS_EISDIR (#23829)

    The `EISDIR` error code is not available as a global variable, but must
    be accessed through the `osConstants.errno` object.
    
    Fixes #23695
    marvinhagemeister authored and bartlomieju committed May 16, 2024
    Copy the full SHA
    10ce4b1 View commit details
  34. fix(ext/node): fix grpc error_handling example (#23755)

    gRPC depends only on the END_STREAM flag to emit "trailers" event which
    is responsible to propagate the errors correctly. This patch uses
    Body::is_end_stream() to determine if a stream will end and set the
    END_STREAM flag.
    
    Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
    satyarohith and bartlomieju committed May 16, 2024
    Copy the full SHA
    e857039 View commit details
  35. Copy the full SHA
    f15ad5d View commit details
  36. 1.43.4 (#23853)

    Bumped versions for 1.43.4
    
    Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
    denobot and bartlomieju authored May 16, 2024
    Copy the full SHA
    d64921c View commit details
Showing with 2,456 additions and 1,365 deletions.
  1. +39 −39 .github/workflows/ci.generate.ts
  2. +32 −31 .github/workflows/ci.yml
  3. +97 −162 Cargo.lock
  4. +27 −30 Cargo.toml
  5. +35 −0 Releases.md
  6. +1 −2 bench_util/Cargo.toml
  7. +6 −10 cli/Cargo.toml
  8. +10 −1 cli/args/mod.rs
  9. +24 −24 cli/factory.rs
  10. +157 −0 cli/graph_container.rs
  11. +5 −68 cli/graph_util.rs
  12. +1 −0 cli/lsp/code_lens.rs
  13. +3 −3 cli/lsp/diagnostics.rs
  14. +39 −71 cli/lsp/documents.rs
  15. +28 −1 cli/lsp/language_server.rs
  16. +47 −143 cli/lsp/resolver.rs
  17. +174 −0 cli/lsp/semantic_tokens.rs
  18. +2 −2 cli/lsp/testing/execution.rs
  19. +35 −23 cli/lsp/tsc.rs
  20. +9 −6 cli/main.rs
  21. +223 −214 cli/module_loader.rs
  22. +1 −2 cli/napi/sym/Cargo.toml
  23. +38 −13 cli/npm/managed/cache.rs
  24. +87 −6 cli/npm/managed/tarball.rs
  25. +34 −89 cli/resolver.rs
  26. +19 −18 cli/standalone/mod.rs
  27. +6 −27 cli/tools/bench/mod.rs
  28. +6 −1 cli/tools/coverage/reporter.rs
  29. +3 −2 cli/tools/installer.rs
  30. +82 −26 cli/tools/registry/diagnostics.rs
  31. +66 −7 cli/tools/registry/graph.rs
  32. +34 −29 cli/tools/registry/mod.rs
  33. +21 −9 cli/tools/registry/paths.rs
  34. +50 −48 cli/tools/task.rs
  35. +10 −17 cli/tools/test/mod.rs
  36. +1 −1 cli/tools/vendor/build.rs
  37. +7 −7 cli/tsc/dts/lib.deno.ns.d.ts
  38. +2 −10 cli/util/fs.rs
  39. +26 −0 cli/util/path.rs
  40. +21 −14 cli/worker.rs
  41. +1 −1 ext/broadcast_channel/Cargo.toml
  42. +1 −1 ext/cache/Cargo.toml
  43. +1 −2 ext/canvas/Cargo.toml
  44. +33 −20 ext/console/01_console.js
  45. +1 −1 ext/console/Cargo.toml
  46. +1 −1 ext/cron/Cargo.toml
  47. +1 −2 ext/crypto/Cargo.toml
  48. +1 −2 ext/fetch/Cargo.toml
  49. +1 −2 ext/ffi/Cargo.toml
  50. +1 −4 ext/fs/Cargo.toml
  51. +1 −1 ext/http/Cargo.toml
  52. +1 −1 ext/io/Cargo.toml
  53. +1 −6 ext/kv/Cargo.toml
  54. +1 −1 ext/napi/Cargo.toml
  55. +1 −5 ext/net/Cargo.toml
  56. +2 −3 ext/node/Cargo.toml
  57. +1 −0 ext/node/lib.rs
  58. +10 −6 ext/node/ops/http2.rs
  59. +14 −0 ext/node/ops/os/mod.rs
  60. +2 −0 ext/node/polyfills/async_hooks.ts
  61. +8 −2 ext/node/polyfills/http2.ts
  62. +1 −1 ext/node/polyfills/internal/fs/utils.mjs
  63. +3 −16 ext/node/polyfills/os.ts
  64. +14 −19 ext/node/polyfills/process.ts
  65. +3 −1 ext/node/polyfills/worker_threads.ts
  66. +1 −2 ext/tls/Cargo.toml
  67. +1 −2 ext/url/Cargo.toml
  68. +2 −2 ext/web/06_streams.js
  69. +1 −2 ext/web/Cargo.toml
  70. +1 −5 ext/webgpu/Cargo.toml
  71. +1 −1 ext/webidl/Cargo.toml
  72. +1 −1 ext/websocket/Cargo.toml
  73. +1 −2 ext/webstorage/Cargo.toml
  74. +1 −7 runtime/Cargo.toml
  75. +10 −6 runtime/js/99_main.js
  76. +10 −3 runtime/ops/bootstrap.rs
  77. +1 −3 runtime/permissions/Cargo.toml
  78. +1 −1 runtime/permissions/lib.rs
  79. +4 −2 runtime/worker_bootstrap.rs
  80. +1 −3 tests/Cargo.toml
  81. +54 −0 tests/integration/coverage_tests.rs
  82. +221 −2 tests/integration/lsp_tests.rs
  83. +0 −9 tests/integration/node_unit_tests.rs
  84. +2 −8 tests/integration/run_tests.rs
  85. +2 −0 tests/specs/install/future_install_local_deno/install.out
  86. +2 −0 tests/specs/jsr/deps/main.out
  87. +2 −0 tests/specs/jsr/deps/main_info.out
  88. +2 −0 tests/specs/jsr/import_jsr_via_https/main.out
  89. +1 −1 tests/specs/jsr/no_unused_params/main.ts
  90. +2 −0 tests/specs/jsr/subset_type_graph/main.check.out
  91. +1 −2 tests/specs/mod.rs
  92. +6 −0 tests/specs/node/rejection_handled_web_process/__test__.jsonc
  93. +11 −2 tests/{testdata/node → specs/node/rejection_handled_web_process}/rejection_handled_web_process.ts
  94. 0 ...s/{testdata/node → specs/node/rejection_handled_web_process}/rejection_handled_web_process.ts.out
  95. +5 −0 tests/specs/node/worker_threads_cache/__test__.jsonc
  96. +2 −0 tests/specs/node/worker_threads_cache/main.out
  97. +13 −0 tests/specs/node/worker_threads_cache/main.ts
  98. +1 −0 tests/specs/publish/byonm_dep/publish.out
  99. +14 −0 tests/specs/publish/excluded_deno_jsonc/__test__.jsonc
  100. +5 −0 tests/specs/publish/excluded_deno_jsonc/deno.jsonc
  101. +6 −0 tests/specs/publish/excluded_deno_jsonc/mod.out
  102. +2 −0 tests/specs/publish/excluded_deno_jsonc/mod.ts
  103. +5 −0 tests/specs/publish/missing_constraint/__test__.jsonc
  104. +9 −0 tests/specs/publish/missing_constraint/deno.json
  105. +7 −0 tests/specs/publish/missing_constraint/mod.ts
  106. +37 −0 tests/specs/publish/missing_constraint/publish.out
  107. +5 −0 tests/specs/publish/missing_constraint_jsx_import_source/__test__.jsonc
  108. +5 −0 tests/specs/publish/missing_constraint_jsx_import_source/foo.tsx
  109. +11 −0 tests/specs/publish/missing_constraint_jsx_import_source/jsr.jsonc
  110. +17 −0 tests/specs/publish/missing_constraint_jsx_import_source/mod.out
  111. +5 −0 tests/specs/publish/missing_constraint_jsx_import_source/mod.ts
  112. +1 −1 tests/specs/publish/package_json/package.json
  113. +1 −1 tests/specs/publish/unsupported_jsx_tsx/foo.jsx
  114. +1 −1 tests/specs/publish/unsupported_jsx_tsx/foo.tsx
  115. +1 −1 tests/specs/publish/unsupported_jsx_tsx/jsr.jsonc
  116. +4 −0 tests/specs/run/045_proxy/__test__.jsonc
  117. 0 ...testdata/run/045_programmatic_proxy_client.ts → specs/run/045_proxy/programmatic_proxy_client.ts}
  118. 0 tests/{testdata/run/045_proxy_client.ts → specs/run/045_proxy/proxy_client.ts}
  119. +23 −15 tests/{testdata/run/045_proxy_test.ts → specs/run/045_proxy/proxy_test.ts}
  120. 0 tests/{testdata/run/045_proxy_test.ts.out → specs/run/045_proxy/proxy_test.ts.out}
  121. +4 −0 tests/specs/run/keep_comments_ts/__test__.jsonc
  122. +4 −0 tests/specs/run/keep_comments_ts/main.out
  123. +7 −0 tests/specs/run/keep_comments_ts/main.ts
  124. +18 −2 tests/testdata/coverage/complex_expected.lcov
  125. +1 −1 tests/testdata/coverage/complex_expected.out
  126. +36 −0 tests/unit/symlink_test.ts
  127. +5 −0 tests/unit_node/async_hooks_test.ts
  128. +6 −1 tests/unit_node/http_test.ts
  129. +8 −0 tests/unit_node/os_test.ts
  130. +11 −0 tests/unit_node/process_test.ts
  131. +26 −0 tests/unit_node/worker_threads_test.ts
  132. +134 −5 tests/util/server/src/lsp.rs
  133. +6 −1 tests/util/server/src/pty.rs
  134. +50 −11 tests/wpt/runner/expectation.json
  135. +1 −1 tests/wpt/suite
  136. +2 −2 tools/lint.js
  137. +1 −2 tools/wgpu_sync.js
78 changes: 39 additions & 39 deletions .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify";
// Bump this number when you want to purge the cache.
// Note: the tools/release/01_bump_crate_versions.ts script will update this version
// automatically via regex, so ensure that this line maintains this format.
const cacheVersion = 89;
const cacheVersion = 91;

const ubuntuX86Runner = "ubuntu-22.04";
const ubuntuX86XlRunner = "ubuntu-22.04-xl";
@@ -86,7 +86,7 @@ ${installPkgsCommand} || echo 'Failed. Trying again.' && sudo apt-get clean && s
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240207/sysroot-\`uname -m\`.tar.xz -O /tmp/sysroot.tar.xz
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240528/sysroot-\`uname -m\`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
sudo mount --rbind /dev /sysroot/dev
@@ -95,21 +95,23 @@ sudo mount --rbind /home /sysroot/home
sudo mount -t proc /proc /sysroot/proc
cd
if [[ \`uname -m\` == "aarch64" ]]; then
echo "Copying libdl.a"
sudo cp /sysroot/usr/lib/aarch64-linux-gnu/libdl.a /sysroot/lib/aarch64-linux-gnu/libdl.a
echo "Copying libdl.so"
sudo cp /sysroot/lib/aarch64-linux-gnu/libdl.so.2 /sysroot/lib/aarch64-linux-gnu/libdl.so
else
echo "Copying libdl.a"
sudo cp /sysroot/usr/lib/x86_64-linux-gnu/libdl.a /sysroot/lib/x86_64-linux-gnu/libdl.a
echo "Copying libdl.so"
sudo cp /sysroot/lib/x86_64-linux-gnu/libdl.so.2 /sysroot/lib/x86_64-linux-gnu/libdl.so
fi
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
cat >> $GITHUB_ENV << __0
# Load the sysroot's env vars
echo "sysroot env:"
cat /sysroot/.env
. /sysroot/.env
# Important notes:
# 1. -ldl seems to be required to avoid a failure in FFI tests. This flag seems
# to be in the Rust default flags in the smoketest, so uncertain why we need
# to be explicit here.
# 2. RUSTFLAGS and RUSTDOCFLAGS must be specified, otherwise the doctests fail
# to build because the object formats are not compatible.
echo "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_BENCH_LTO=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
@@ -118,28 +120,27 @@ RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-${llvmVersion}
-C link-arg=-fuse-ld=lld-${llvmVersion}
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
--cfg tokio_unstable
\${{ env.RUSTFLAGS }}
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-${llvmVersion}
-C link-arg=-fuse-ld=lld-${llvmVersion}
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
\${{ env.RUSTFLAGS }}
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-${llvmVersion}
CFLAGS=-flto=thin --sysroot=/sysroot
__0`,
CFLAGS=-flto=thin $CFLAGS
" > $GITHUB_ENV`,
};

const installBenchTools = "./tools/install_prebuilt.js wrk hyperfine";
@@ -700,6 +701,24 @@ const ci = {
"df -h",
].join("\n"),
},
{
// Run a minimal check to ensure that binary is not corrupted, regardless
// of our build mode
name: "Check deno binary",
if: "matrix.job == 'test'",
run:
'target/${{ matrix.profile }}/deno eval "console.log(1+2)" | grep 3',
env: {
NO_COLOR: 1,
},
},
{
// Verify that the binary actually works in the Ubuntu-16.04 sysroot.
name: "Check deno binary (in sysroot)",
if: "matrix.job == 'test' && matrix.use_sysroot",
run:
'sudo chroot /sysroot "$(pwd)/target/${{ matrix.profile }}/deno" --version',
},
{
name: "Upload PR artifact (linux)",
if: [
@@ -835,25 +854,6 @@ const ci = {
].join("\n"),
run: "cargo test --release --locked",
},
{
// Since all tests are skipped when we're building a tagged commit
// this is a minimal check to ensure that binary is not corrupted
name: "Check deno binary",
if:
"matrix.profile == 'release' && startsWith(github.ref, 'refs/tags/')",
run: 'target/release/deno eval "console.log(1+2)" | grep 3',
env: {
NO_COLOR: 1,
},
},
{
// Verify that the binary actually works in the Ubuntu-16.04 sysroot.
// TODO(mmastrac): make this work for aarch64 as well
name: "Check deno binary (in sysroot)",
if:
"matrix.profile == 'release' && matrix.use_sysroot && matrix.arch != 'aarch64'",
run: 'sudo chroot /sysroot "$(pwd)/target/release/deno" --version',
},
{
name: "Configure hosts file for WPT",
if: "matrix.wpt",
63 changes: 32 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -273,7 +273,7 @@ jobs:
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240528/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
sudo mount --rbind /dev /sysroot/dev
@@ -282,21 +282,23 @@ jobs:
sudo mount -t proc /proc /sysroot/proc
cd
if [[ `uname -m` == "aarch64" ]]; then
echo "Copying libdl.a"
sudo cp /sysroot/usr/lib/aarch64-linux-gnu/libdl.a /sysroot/lib/aarch64-linux-gnu/libdl.a
echo "Copying libdl.so"
sudo cp /sysroot/lib/aarch64-linux-gnu/libdl.so.2 /sysroot/lib/aarch64-linux-gnu/libdl.so
else
echo "Copying libdl.a"
sudo cp /sysroot/usr/lib/x86_64-linux-gnu/libdl.a /sysroot/lib/x86_64-linux-gnu/libdl.a
echo "Copying libdl.so"
sudo cp /sysroot/lib/x86_64-linux-gnu/libdl.so.2 /sysroot/lib/x86_64-linux-gnu/libdl.so
fi
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
cat >> $GITHUB_ENV << __0
# Load the sysroot's env vars
echo "sysroot env:"
cat /sysroot/.env
. /sysroot/.env
# Important notes:
# 1. -ldl seems to be required to avoid a failure in FFI tests. This flag seems
# to be in the Rust default flags in the smoketest, so uncertain why we need
# to be explicit here.
# 2. RUSTFLAGS and RUSTDOCFLAGS must be specified, otherwise the doctests fail
# to build because the object formats are not compatible.
echo "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_BENCH_LTO=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
@@ -305,28 +307,27 @@ jobs:
-C linker-plugin-lto=true
-C linker=clang-17
-C link-arg=-fuse-ld=lld-17
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
--cfg tokio_unstable
${{ env.RUSTFLAGS }}
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-17
-C link-arg=-fuse-ld=lld-17
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
${{ env.RUSTFLAGS }}
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-17
CFLAGS=-flto=thin --sysroot=/sysroot
__0
CFLAGS=-flto=thin $CFLAGS
" > $GITHUB_ENV
- name: Remove macOS cURL --ipv4 flag
run: |-
curl --version
@@ -366,8 +367,8 @@ jobs:
path: |-
~/.cargo/registry/index
~/.cargo/registry/cache
key: '89-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '89-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
key: '91-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '91-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
if: '!(matrix.skip)'
- name: Restore cache build output (PR)
uses: actions/cache/restore@v4
@@ -379,7 +380,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '89-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
restore-keys: '91-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache
if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache
@@ -419,6 +420,14 @@ jobs:
df -h
cargo build --release --locked --all-targets
df -h
- name: Check deno binary
if: '!(matrix.skip) && (matrix.job == ''test'')'
run: 'target/${{ matrix.profile }}/deno eval "console.log(1+2)" | grep 3'
env:
NO_COLOR: 1
- name: Check deno binary (in sysroot)
if: '!(matrix.skip) && (matrix.job == ''test'' && matrix.use_sysroot)'
run: 'sudo chroot /sysroot "$(pwd)/target/${{ matrix.profile }}/deno" --version'
- name: Upload PR artifact (linux)
if: |-
!(matrix.skip) && (matrix.job == 'test' &&
@@ -512,14 +521,6 @@ jobs:
github.repository == 'denoland/deno' &&
!startsWith(github.ref, 'refs/tags/'))))
run: cargo test --release --locked
- name: Check deno binary
if: '!(matrix.skip) && (matrix.profile == ''release'' && startsWith(github.ref, ''refs/tags/''))'
run: target/release/deno eval "console.log(1+2)" | grep 3
env:
NO_COLOR: 1
- name: Check deno binary (in sysroot)
if: '!(matrix.skip) && (matrix.profile == ''release'' && matrix.use_sysroot && matrix.arch != ''aarch64'')'
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
- name: Configure hosts file for WPT
if: '!(matrix.skip) && (matrix.wpt)'
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
@@ -668,7 +669,7 @@ jobs:
!./target/*/gn_out
!./target/*/*.zip
!./target/*/*.tar.gz
key: '89-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
key: '91-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary:
name: publish canary
runs-on: ubuntu-22.04
Loading