mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
chore: use kqueue backend of notify on macOS (#21028)
Towards #20996 "macos_fsevent" feature of notify links us to CoreFoundation on macOS.
This commit is contained in:
parent
e4308aebc0
commit
646afdf259
5 changed files with 12 additions and 40 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
@ -725,11 +725,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e"
|
checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.10",
|
"cfg-if 0.1.10",
|
||||||
"crossbeam-channel 0.4.4",
|
"crossbeam-channel",
|
||||||
"crossbeam-deque",
|
"crossbeam-deque",
|
||||||
"crossbeam-epoch",
|
"crossbeam-epoch",
|
||||||
"crossbeam-queue",
|
"crossbeam-queue",
|
||||||
"crossbeam-utils 0.7.2",
|
"crossbeam-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -738,20 +738,10 @@ version = "0.4.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
|
checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-utils 0.7.2",
|
"crossbeam-utils",
|
||||||
"maybe-uninit",
|
"maybe-uninit",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crossbeam-channel"
|
|
||||||
version = "0.5.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"crossbeam-utils 0.8.16",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-deque"
|
name = "crossbeam-deque"
|
||||||
version = "0.7.4"
|
version = "0.7.4"
|
||||||
|
@ -759,7 +749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed"
|
checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-epoch",
|
"crossbeam-epoch",
|
||||||
"crossbeam-utils 0.7.2",
|
"crossbeam-utils",
|
||||||
"maybe-uninit",
|
"maybe-uninit",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -771,7 +761,7 @@ checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"cfg-if 0.1.10",
|
"cfg-if 0.1.10",
|
||||||
"crossbeam-utils 0.7.2",
|
"crossbeam-utils",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"maybe-uninit",
|
"maybe-uninit",
|
||||||
"memoffset 0.5.6",
|
"memoffset 0.5.6",
|
||||||
|
@ -785,7 +775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
|
checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.10",
|
"cfg-if 0.1.10",
|
||||||
"crossbeam-utils 0.7.2",
|
"crossbeam-utils",
|
||||||
"maybe-uninit",
|
"maybe-uninit",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -800,15 +790,6 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crossbeam-utils"
|
|
||||||
version = "0.8.16"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crunchy"
|
name = "crunchy"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
|
@ -2486,15 +2467,6 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "fsevent-sys"
|
|
||||||
version = "4.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fslock"
|
name = "fslock"
|
||||||
version = "0.1.8"
|
version = "0.1.8"
|
||||||
|
@ -3513,9 +3485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ed2c66da08abae1c024c01d635253e402341b4060a12e99b31c7594063bf490a"
|
checksum = "ed2c66da08abae1c024c01d635253e402341b4060a12e99b31c7594063bf490a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"crossbeam-channel 0.5.8",
|
|
||||||
"filetime",
|
"filetime",
|
||||||
"fsevent-sys",
|
|
||||||
"inotify",
|
"inotify",
|
||||||
"kqueue",
|
"kqueue",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
|
@ -110,7 +110,8 @@ log = "=0.4.20"
|
||||||
lsp-types = "=0.94.1" # used by tower-lsp and "proposed" feature is unstable in patch releases
|
lsp-types = "=0.94.1" # used by tower-lsp and "proposed" feature is unstable in patch releases
|
||||||
memmem = "0.1.1"
|
memmem = "0.1.1"
|
||||||
monch = "=0.4.3"
|
monch = "=0.4.3"
|
||||||
notify = "=5.0.0"
|
# Note: Do not use the "macos_fsevent" feature of notify, as it links us to CoreFoundation on macOS.
|
||||||
|
notify = { version = "=5.0.0", default-features = false, features = ["macos_kqueue"] }
|
||||||
num-bigint = { version = "0.4", features = ["rand"] }
|
num-bigint = { version = "0.4", features = ["rand"] }
|
||||||
once_cell = "1.17.1"
|
once_cell = "1.17.1"
|
||||||
os_pipe = "=1.1.4"
|
os_pipe = "=1.1.4"
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
"test-fs-open.js",
|
"test-fs-open.js",
|
||||||
"test-fs-opendir.js",
|
"test-fs-opendir.js",
|
||||||
"test-fs-rmdir-recursive.js",
|
"test-fs-rmdir-recursive.js",
|
||||||
|
"test-fs-watchfile.js",
|
||||||
"test-fs-write-file.js",
|
"test-fs-write-file.js",
|
||||||
"test-fs-write.js",
|
"test-fs-write.js",
|
||||||
"test-http-url.parse-https.request.js",
|
"test-http-url.parse-https.request.js",
|
||||||
|
|
|
@ -107,6 +107,6 @@ if (common.isLinux || common.isOSX || common.isWindows) {
|
||||||
fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => {
|
fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => {
|
||||||
if (err) assert.fail(err);
|
if (err) assert.fail(err);
|
||||||
}));
|
}));
|
||||||
}, 1);
|
}, 20);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ Deno.test({ permissions: { read: true } }, function watchFsInvalidPath() {
|
||||||
} else {
|
} else {
|
||||||
assertThrows(() => {
|
assertThrows(() => {
|
||||||
Deno.watchFs("non-existent.file");
|
Deno.watchFs("non-existent.file");
|
||||||
}, Deno.errors.NotFound);
|
}, Error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ async function getTwoEvents(
|
||||||
const events = [];
|
const events = [];
|
||||||
for await (const event of iter) {
|
for await (const event of iter) {
|
||||||
events.push(event);
|
events.push(event);
|
||||||
if (events.length > 2) break;
|
if (events.length == 2) break;
|
||||||
}
|
}
|
||||||
return events;
|
return events;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue