summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-06-29 22:07:05 +0100
committerGitHub <noreply@github.com>2023-06-29 23:07:05 +0200
commit55362452a8eb6abaf74d704cb4333dfc1f0cfe58 (patch)
tree611991a8cef85f457575ff01dd90978db10ec8d2 /.github
parent09af1a5fef9d6c9e2c1b50484701b1cfd7c7e938 (diff)
fix(core): consistent extension source resolution (#19615)
Currently the resolution for extension sources is different depending on whether `include_js_files_for_snapshotting` is enabled. If sources are embedded it uses `include_str!()` which is module-relative. If sources are read at runtime paths are joined to `CARGO_MANIFEST_DIR` and are package-relative. This makes them both package-relative. Fixes `cargo run -p deno_runtime --example extension_with_esm --features include_js_files_for_snapshotting`.
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/ci.generate.ts13
-rw-r--r--.github/workflows/ci.yml9
2 files changed, 20 insertions, 2 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index 8d11e297f..9446a44b8 100755
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -697,7 +697,7 @@ const ci = {
{
name: "Test debug (fast)",
if: [
- "matrix.job == 'test' && matrix.profile == 'debug' && ",
+ "matrix.job == 'test' && matrix.profile == 'debug' &&",
"!startsWith(matrix.os, 'ubuntu')",
].join("\n"),
run: [
@@ -709,6 +709,17 @@ const ci = {
env: { CARGO_PROFILE_DEV_DEBUG: 0 },
},
{
+ name: "Test examples debug",
+ if: "matrix.job == 'test' && matrix.profile == 'debug'",
+ run: [
+ // Only regression tests here for now.
+ // Regression test for https://github.com/denoland/deno/pull/19615.
+ "cargo run -p deno_runtime --example extension_with_esm",
+ "cargo run -p deno_runtime --example extension_with_esm --features include_js_files_for_snapshotting",
+ ].join("\n"),
+ env: { CARGO_PROFILE_DEV_DEBUG: 0 },
+ },
+ {
name: "Test release",
if: [
"matrix.job == 'test' && matrix.profile == 'release' &&",
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d197c2b5f..39da43682 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -428,13 +428,20 @@ jobs:
CARGO_PROFILE_DEV_DEBUG: 0
- name: Test debug (fast)
if: |-
- !(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
+ !(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
!startsWith(matrix.os, 'ubuntu'))
run: |-
cargo test --locked --lib
cargo test --locked --test '*'
env:
CARGO_PROFILE_DEV_DEBUG: 0
+ - name: Test examples debug
+ if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''test'' && matrix.profile == ''debug'')'
+ run: |-
+ cargo run -p deno_runtime --example extension_with_esm
+ cargo run -p deno_runtime --example extension_with_esm --features include_js_files_for_snapshotting
+ env:
+ CARGO_PROFILE_DEV_DEBUG: 0
- name: Test release
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'release' &&