-
Notifications
You must be signed in to change notification settings - Fork 383
Description
@cscheid This happens only with our bundled version where we activate --cached-only
. This is why our test is passing, especially
quarto-cli/tests/smoke/run/stdlib-run-version.test.ts
Lines 1 to 24 in 464c18c
/* | |
* stdlib-run-version.test.ts | |
* | |
* Copyright (C) 2022 Posit Software, PBC | |
* | |
*/ | |
import { execProcess } from "../../../src/core/process.ts"; | |
import { assert } from "testing/asserts"; | |
import { unitTest } from "../../test.ts"; | |
unitTest("stdlib-run-version", async () => { | |
const result = await execProcess({ | |
cmd: [ | |
"quarto", | |
"run", | |
"docs/run/test-stdlib.ts", | |
], | |
}); | |
console.log({result}) | |
assert(result.success); | |
}, { | |
ignore: Deno.build.os == "windows", | |
}); |
Trying to run the file using last prerelease I get
β― C:\Users\chris\AppData\Local\qvm\versions\v1.6.30\bin\quarto run .\tests\docs\run\test-stdlib.ts
error: JSR package version manifest for '@std/[email protected]' failed to load: Specifier not found in cache: "https://jsr.io/@std/io/0.224.9_meta.json", --cached-only is specified.
at file:///C:/Users/chris/Documents/DEV_R/quarto-cli/tests/docs/run/test-stdlib.ts:1:27
My understanding is the following
-
We are using bundling versions and it seems we do bundle
0.224.8
quarto-cli/src/dev_import_map.json
Line 19 in 464c18c
"io/": "./vendor/jsr.io/@std/io/0.224.8/mod.ts/", -
However the spec for
stdlib/io
used for loading the dep in aquarto run
script is
"stdlib/io": "jsr:/@std/io@^0.224.0",
Using the^
means that0.224.9
is valid and it seems Deno wants do use it, but can't find it in the cache as expected.
Maybe I don't get it right, but it seems that Deno may resolve the specifier, unrelated to the cache, instead of looking for a version in cache that respect ^0.224.0
π€
I did the test with deno run
, using deno binary bundled in quarto and using this file
import { format } from "jsr:@std/[email protected]"
and in a clean cache (I deleted the all Deno cache directory)
- First run using cached only fails
β― C:\Users\chris\scoop\apps\quarto-prerelease\current\bin\tools\x86_64\deno.exe run --cached-only test.ts error: JSR package version manifest for '@std/[email protected]' failed to load: Specifier not found in cache: "https://jsr.io/@std/io/0.224.8_meta.json", --cached-only is specified. at file:///C:/Users/chris/Documents/DEV_OTHER/00-TESTS/test-quarto/test.ts:1:24
- Second run without
--cached-only
download the dependency - For third run I changed to
jsr:@std/io@^0.224.0
in the fileand it fails the same as with Quartoimport { format } from "jsr:@std/io@^0.224.0"
β― C:\Users\chris\scoop\apps\quarto-prerelease\current\bin\tools\x86_64\deno.exe run --cached-only test.ts error: Specifier not found in cache: "https://jsr.io/@std/io/0.224.9/mod.ts", --cached-only is specified. at file:///C:/Users/chris/Documents/DEV_OTHER/00-TESTS/test-quarto/test.ts:1:24
This is directly impacting tools like shinylive which needs to be updated anyway to be working with Quarto 1.6
This is blocking quarto-ext/shinylive#65