1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/cli
David Sherret ed20102713
fix: make writing to the deps cache more reliable (#24135)
I was able to reproduce this locally.

```
[error] Failed to execute snippet: 
import { validate } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";

assert(validate("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"));
assertFalse(validate("not a UUID"));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\2ae5bb614c7526d0876be0b76da1372fd51304ae27d6202ee94df720b3523d08')
 at file:///V:/deno_std/uuid/common.ts:43
[error] Failed to execute snippet:
import { v5, NAMESPACE_DNS, NIL_UUID } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";

const data = new TextEncoder().encode("deno.land");
const uuid = await v5.generate(NAMESPACE_DNS, data);

assert(v5.validate(uuid));
assertFalse(v5.validate(NIL_UUID));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\63dd818c5fc1ac39c04df9b42bd9dd4bbc07f7d1b174e405d003731125778da1')
    at https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts:30:15
 at file:///V:/deno_std/uuid/mod.ts:4
[error] Failed to execute snippet:
import { isNil } from "@std/uuid";
import { assert, assertFalse } from "@std/assert";

assert(isNil("00000000-0000-0000-0000-000000000000"));
assertFalse(isNil(crypto.randomUUID()));
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\fd3a12fc091d16ee29f10fa7a05eeeb8bd6c3cc014642e72478c757f00e7261e')
    at https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts:34:40
 at file:///V:/deno_std/uuid/common.ts:23
[error] Failed to execute snippet:
import { version } from "@std/uuid";
import { assertEquals } from "@std/assert/assert-equals";

assertEquals(version("d9428888-122b-11e1-b85c-61cd3cbb3210"), 1);
assertEquals(version("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b"), 4);
Download https://jsr.io/@std/uuid/meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1_meta.json
Download https://jsr.io/@std/uuid/1.0.0-rc.1/mod.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/common.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/constants.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v1.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v3.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v4.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/v5.ts
Download https://jsr.io/@std/uuid/1.0.0-rc.1/_common.ts
error: Access is denied. (os error 5) (for 'V:\.cache\deno\deps\https\jsr.io\2ae5bb614c7526d0876be0b76da1372fd51304ae27d6202ee94df720b3523d08')
 at file:///V:/deno_std/uuid/common.ts:66
4 errors found
```

It occurs when many Deno processes are writing to the deps cache at the
same time. Fix is to use `atomic_write_with_retries` which is much more
reliable (and the function that helped make the ecosystem tests more
reliable too). After this change I no longer have this issue.

Closes https://github.com/denoland/deno/issues/24073
2024-06-07 13:06:17 -04:00
..
args refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
bench chore: upgrade dlint to 0.60.0 (#24041) 2024-06-05 01:09:29 +02:00
cache fix: make writing to the deps cache more reliable (#24135) 2024-06-07 13:06:17 -04:00
js feat: Add Deno.exitCode API (#23609) 2024-05-29 23:16:27 +00:00
lsp refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
napi chore: forward v1.44.1 release commit to main (#24115) 2024-06-06 03:23:10 +00:00
npm fix: make writing to the deps cache more reliable (#24135) 2024-06-07 13:06:17 -04:00
ops refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
schemas feat(cli): add support for jsxImportSourceTypes (#23419) 2024-04-30 18:12:35 +00:00
standalone refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
tools fix: do not panic linting files with UTF-8 BOM (#24136) 2024-06-07 17:02:47 +00:00
tsc refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
util fix: make writing to the deps cache more reliable (#24135) 2024-06-07 13:06:17 -04:00
auth_tokens.rs fix(cli): Add IP address support to DENO_AUTH_TOKEN (#22297) 2024-02-06 19:45:40 +01:00
build.rs fix: upgrade TypeScript from 5.4.3 to 5.4.5 (#23740) 2024-05-08 13:54:56 -04:00
Cargo.toml refactor: NpmRegistryApi - #[async_trait(?Send)] (#24126) 2024-06-06 22:37:41 +00:00
cdp.rs refactor(tools/repl): reorganize code (#21810) 2024-01-05 16:14:58 +01:00
clippy.toml refactor: don't share reqwest::HttpClient across tokio runtimes (#24092) 2024-06-03 21:17:08 +00:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
emit.rs fix: better handling of npm resolution occurring on workers (#24094) 2024-06-05 17:04:16 +02:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) 2024-05-28 14:58:43 -04:00
factory.rs refactor: don't share reqwest::HttpClient across tokio runtimes (#24092) 2024-06-03 21:17:08 +00:00
file_fetcher.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
graph_container.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
graph_util.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
http_util.rs fix(npm): use configured auth for tarball urls instead of scope auth (#24111) 2024-06-05 21:24:52 +00:00
integration_tests_runner.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00
js.rs chore(cli): remove problematic snapshot test (#22722) 2024-03-05 19:11:33 -07:00
jsr.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
main.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
mainrt.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
module_loader.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
node.rs fix: better handling of npm resolution occurring on workers (#24094) 2024-06-05 17:04:16 +02:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
version.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
worker.rs refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.