summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-06npm: ensure runtime exceptions are surfaced when debugger is attached (#16943)Bartek Iwańczuk
Currently runtime exception are only displayed at the program end in terminal, which makes it only a partial fix, as a full fix requires https://github.com/denoland/rusty_v8/pull/1149 which adds new bindings to the inspector that allows to notify it about thrown exceptions. This will be handled in a follow up commit.
2022-12-05fix(task): improve word parsing (#16911)David Sherret
Ref https://github.com/denoland/deno_task_shell/pull/67
2022-12-05chore: move/remove some repo top level files (#16951)David Sherret
2022-12-05fix(test): improve how `--fail-fast` shuts down when hitting limit (#16956)David Sherret
Closes #15650
2022-12-05refactor: remove references to Deno.core in bootstrap code (#16937)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/16881
2022-12-05fix(ops): disallow auto-borrowing OpState across potential await point (#16952)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16934 Example compiler error: ``` error: mutable opstate is not supported in async ops --> core/ops_builtin.rs:122:1 | 122 | #[op] | ^^^^^ | = note: this error originates in the attribute macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) ```
2022-12-05fix(windows): support special key presses in raw mode (#16904)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-12-05napi: respect --quiet flag in unimplemented warnings (#16935)Bartek Iwańczuk
2022-12-04revert: Inspector changes (#16939)Bartek Iwańczuk
Reverts 66dc54a7f and e2a0c3f0 Closes https://github.com/denoland/deno/issues/16926
2022-12-03feat(ext/ffi): better type hints for Deno.dlopen (#16874)阿豪
2022-12-03test: reenable inspector_break_on_first_line_in_test test (#16908)Bartek Iwańczuk
2022-12-03fix(inspector): even if already woken, always schedule an interrupt (#16910)Bert Belder
2022-12-02fix(inspector): allow to poll session with reentry (#16863)Bartek Iwańczuk
This commit completely rewrites inspector session polling. Until now, there was a single function responsible for polling inspector sessions which could have been called when polling the "JsRuntime" as well as from internal inspector functions. There are some cases where it's required to have reentrant polling of sessions (eg. when "debugger" statement is run) which should be blocking until inspector sends appropriate message to continue execution. This was not possible before, because polling of sessions didn't have reentry ability. As a consequence, session polling was split into two separate functions: a) one to be used when polling from async context (on each tick of event loop in "JsRuntime") b) one to be used when polling synchronously and potentially blocking (used by various inspector methods). There are further cleanups and simplifications to be made in inspector code, but this rewrite solves the problem at hand (being able to evaluate "debugger" JS statement and continue inspector functionality). Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-12-02chore(windows): fix flaky pty_complete_imports (#16905)David Sherret
2022-12-02fix(upgrade/windows): show informative message on access denied error (#16887)David Sherret
Closes #16886
2022-12-02chore(build): bump textwrap to 0.15.2 (#16906)Rui Chen
As [textwrap 0.15.1 got yanked](https://github.com/mgeisler/textwrap/issues/484), it caused some build issue [in the homebrew side](https://github.com/Homebrew/homebrew-core/pull/116662), bumping the dependency to 0.15.2. Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-12-02chore: fix flaky netListenUnrefAndRef (#16892)David Sherret
Closes #16890
2022-12-02fix(task): support redirects in pipe sequences (#16903)David Sherret
Categorizing this as a fix because it currently fails silently.
2022-12-02chore: rewrite tests and utils to use Deno.Command API (#16895)Bartek Iwańczuk
Since "Deno.spawn()", "Deno.spawnSync()" and "Deno.spawnChild" are getting deprecated, this commits rewrites all tests and utilities to use "Deno.Command" API instead.
2022-12-02perf: use fast api for io read/write sync (#15863)Divy Srivastava
``` $ dd if=/dev/zero bs=65536 count=500000 | ./stdio # C baseline 500000+0 records in 500000+0 records out 32768000000 bytes transferred in 4.126087 secs (7941664827 bytes/sec) c: size 32768000000 reads 500000 blocksize 65536 ``` ``` $ dd if=/dev/zero bs=65536 count=500000 | deno run stdio.js # Deno 500000+0 records in 500000+0 records out 32768000000 bytes transferred in 4.279032 secs (7657806719 bytes/sec) deno: size 32768000000 reads 500000 blocksize 65536 ```
2022-12-02feat(ops): Fast zero copy string arguments (#16777)Divy Srivastava
Uses SeqOneByteString optimization to do zero-copy `&str` arguments in fast calls. - [x] Depends on https://github.com/denoland/rusty_v8/pull/1129 - [x] Depends on https://chromium-review.googlesource.com/c/v8/v8/+/4036884 - [x] Disable in async ops - [x] Make it work with owned `String` with an extra alloc in fast path. - [x] Support `Cow<'_, str>`. Owned for slow case, Borrowed for fast case ```rust #[op] fn op_string_len(s: &str) -> u32 { str.len() as u32 } ```
2022-12-02chore: update std submodule to 0.167.0 (#16894)Bartek Iwańczuk
2022-12-01fix(upgrade): respect the `--quiet` flag (#16888)David Sherret
Also, use `ProgressBar` for upgrading.
2022-12-01chore(npm): fix types tests (#16882)David Sherret
2022-12-01fix(vendor): properly handle bare specifiers that start with http (#16885)David Sherret
2022-12-01chore(tools): update deprecated commands in format and lint tool (#16864)Geert-Jan Zwiers
Updates tools/format.js and tools/lint.js from Deno.spawn to Deno.Command API.
2022-12-01perf(ext/websocket): skip Events constructor checks (#16365)Divy Srivastava
WebSocket internal events can bypass Event's webidl checks and `ReflectDefineProperty` on the object value. Note, this intentionally makes websocket events `isTrusted` configurable (not spec-compliant) which hurts performance a lot. Before: ``` Msg/sec: 167627.750000 Msg/sec: 168239.250000 Msg/sec: 169690.000000 ``` After: ``` Msg/sec: 191065.500000 Msg/sec: 194745.250000 Msg/sec: 194746.000000 ```
2022-12-01chore: forward v1.28.3 release commit to main (#16884)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-30fix(repl): respect --quiet flag (#16875)Bartek Iwańczuk
This commit changes REPL behavior to respect --quiet flag. Once this flag is present REPL will not print a banner at the start.
2022-11-30chore: upgrade rusty_v8 to 0.58.0 (#16879)Bartek Iwańczuk
2022-11-30chore: remove unnecessary lifetimes (#16878)David Sherret
It seems we don't really need to allow these clippy rules.
2022-11-30fix(ext/web): fix typings for readable stream readers (#16191)ud2
* Introduces `ReadableStreamDefaultReadResult` and modifies `ReadableStreamDefaultReader.read` to return this type (closes #15269). * Adds the missing `ReadableStreamBYOBReader` constructor. * Removes the nonexistent `ReadableStreamReader` class.
2022-11-30chore: upgrade rusty_v8 to 0.57.0 (#16871)Bartek Iwańczuk
2022-11-30fix(fmt/markdown): fix emoji width calculation in tables (#16870)David Sherret
https://github.com/dprint/dprint-plugin-markdown/pull/67
2022-11-30fix(lsp): analyze fs dependencies of dependencies to find npm package ↵David Sherret
requirements (#16866) Closes #16867
2022-11-29fix(coverage): Error if the emit cache is invalid (#16850)sigmaSd
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-28refactor: create util folder, move nap_sym to napi/sym, move http_cache to ↵David Sherret
cache folder (#16857)
2022-11-28feat(core): show unresolved promise origin (#16650)Bartek Iwańczuk
This commit updates unhelpful messages that are raised when event loop stalls on unresolved top-level promises. Instead of "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises." and "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises." we are now printing a message like: error: Top-level await promise never resolved [SOURCE LINE] ^ at [FUNCTION NAME] ([FILENAME]) eg: error: Top-level await promise never resolved await new Promise((_resolve, _reject) => {}); ^ at <anonymous> (file:///Users/ib/dev/deno/cli/tests/testdata/test/unresolved_promise.ts:1:1) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2022-11-28fix(npm): allow to inspect npm modules with --inspect-brk (#16841)Bartek Iwańczuk
2022-11-28fix(runtime): feature-flag snapshot from snapshot (#16843)Leo Kettmeir
2022-11-28feat(unstable): rework Deno.Command (#16812)Leo Kettmeir
Refactors the `Deno.Command` class to not handle any state, but only being an intermediary to calling its methods, and as such any methods and properties besides `output`, `outputSync` & `spawn` have been removed. Interracting with a `spawn`ed subprocess now works by using the methods and properties on the returned class of the `spawn` method.
2022-11-27fix(npm): ensure npm package downloaded once per run when using `--reload` ↵David Sherret
(#16842)
2022-11-27fix(ext/ffi): Null buffer pointer value is inconsistent (#16625)Aapo Alasuutari
Currently, slow call path will always create a dangling pointer to replace a null pointer when called with eg. a `new Uint8Array()` parameter, which V8 initialises as a null pointer backed buffer. However, the fast call path will never change the pointer value and will thus expose a null pointer. Thus, it's possible that the pointer value that a native call sees coming from Deno changes between two sequential invocations of the same function with the exact same parameters. Since null pointers can be quite important, and `Uint8Array` is the chosen fast path for Deno FFI `"buffer"` parameters, I think it is fairly important that the null pointer be properly exposed to the native code. Thus this PR. ### `*mut c_void` While here, I also changed the type of our pointer values to `*mut c_void`. This is mainly due to JS buffers always being `*mut`, and because we offer a way to turn a pointer into a JS `ArrayBuffer` (`op_ffi_get_buf`) which is read-write. I'm not exactly sure which way we should really go here, we have pointers that are definitely mut but we also cannot assume all of our pointers are. So, do we go with the maxima or the minima? ### `optimisedCall(new Uint8Array())` V8 seems to have a bug where calling an optimised function with a newly created empty `Uint8Array` (no argument or 0) will not see the data pointer being null but instead it's some stable pointer, perhaps pointing to some internal null-backing-store. The pointer value is also an odd (not even) number, so it might specifically be a tagged pointer. This will probably be an issue for some users, if they try to use eg. `method(cstr("something"), new Uint8Array())` as a way to do a fast call to `method` with a null pointer as the second parameter. If instead of a `new Uint8Array()` the user instead uses some `const NULL = new Uint8Array()` where the `NULL` buffer has been passed to a slow call previously, then the fast call will properly see a null pointer. I'll take this up with some V8 engineers to see if this couldn't be fixed.
2022-11-27feat(ops): fast calls for Wasm (#16776)Divy Srivastava
This PR introduces Wasm ops. These calls are optimized for entry from Wasm land. The `#[op(wasm)]` attribute is opt-in. Last parameter `Option<&mut [u8]>` is the memory slice of the Wasm module *when entered from a Fast API call*. Otherwise, the user is expected to implement logic to obtain the memory if `None` ```rust #[op(wasm)] pub fn op_args_get( offset: i32, buffer_offset: i32, memory: Option<&mut [u8]>, ) { // ... } ```
2022-11-27perf(ops): Reenable fast unit result optimization (#16827)Divy Srivastava
The optimization was missed in the optimizer rewrite https://github.com/denoland/deno/pull/16514
2022-11-27Revert "fix(ext/flash): graceful server startup/shutdown with unsettl… ↵Bartek Iwańczuk
(#16839) …ed promises in mind (#16616)" This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c. There are reports saying that Vite is often hanging in 1.28.2 and this is the only PR that changed something with HTTP server. I think we should hold off on trying to fix this and instead focus on #16787 CC @magurotuna
2022-11-27chore(ops): increase codegen tests coverage (#16834)Divy Srivastava
Upgrade fast_call tests to full (both tier) codegen tests.