profile
viewpoint

afinch7/deno_in_deno 1

Create custom deno based runtimes in a deno runtime.

afinch7/boa 0

Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.

afinch7/cargo_gn 0

Cargo GN integration

afinch7/charts 0

Curated applications for Kubernetes

afinch7/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

afinch7/deno 0

A browser-like command line runtime

afinch7/deno-permissions-bypass 0

Just a proof of concept for a security issue in deno.

afinch7/deno_install 0

Deno Binary Installer

afinch7/deno_std 0

deno standard modules

push eventafinch7/deno

afinch7

commit sha 3b16faa18e7c92a4635b115a3cfe8533895e9053

remove `Send` trait requirement from the `Resource` trait

view details

push time in 2 hours

PR opened denoland/deno

remove `Send` trait requirement from the `Resource` trait

Pretty sure this isn't needed anymore.

+2 -2

0 comment

1 changed file

pr created time in 3 hours

create barnchafinch7/deno

branch : remove_send_resource

created branch time in 3 hours

create barnchafinch7/deno_in_deno

branch : update_0_38_0

created branch time in 6 hours

push eventafinch7/deno

afinch7

commit sha 39309d47ed336f4246ef58d7b38797c11c71aae4

added core example

view details

push time in 2 days

push eventafinch7/deno

afinch7

commit sha 67bdd57a5ed2219fcacf4cb6f09a1ef0e4042ac2

remove ts file replace with js and d.ts, add more testing to plugins

view details

push time in 2 days

push eventafinch7/deno

afinch7

commit sha f0ea28a788e3bfbac4da2bcc2ef4d77af040459c

remove ts file replace with js and d.ts, add more testing to plugins

view details

push time in 2 days

push eventafinch7/deno

Nayeem Rahman

commit sha b7e6a31a425901c089f4b524774b985906982fae

fix(std/http): Fix respond error test on Windows (#4408)

view details

Nayeem Rahman

commit sha 35f6e2e45ddb96524a6bdf54b0a6155caa88d5e0

fix(std/http): Properly await ops in a server test (#4436)

view details

Samrith Shankar

commit sha 798904b0f2ed0c7284b67bba2f125f406b5850de

Add require-await lint rule (#4401)

view details

dubiousjim

commit sha 69303e21495a14a2c6709f96af364682a485ac21

refactor: move code from fs.rs into ops/fs.rs (#4428) This a complex boring PR that shifts around code (primarily) in cli/fs.rs and cli/ops/fs.rs. The gain of this refactoring is to ease the way for #4188 and #4017, and also to avoid some future development pain. Mostly there is no change in functionality. Except: * squashed bugs where op_utime and op_chown weren't using `resolve_from_cwd` * eliminated the use of the external `remove_dir_all` crate. * op_chmod now only queries metadata to verify file/dir exists on Windows (it will already fail on Unix if it doesn't) * op_chown now verifies the file/dir's existence on Windows like chmod does.

view details

dubiousjim

commit sha 1c6f177d198cb4abe7a126dc543b733fa95376d1

use prebuilt "not implemented" error (#4442)

view details

Nayeem Rahman

commit sha b22f48970fc18c4e5fd72df15ac798477fbe49cb

refactor(std/http/server): Remove bad error handling (#4435)

view details

dubiousjim

commit sha 77a44163fb22139a8269eb216014640aaf7a7fa8

chmod should throw on Windows (#4446)

view details

Ryan Dahl

commit sha 0adc86f105204b2475126c36dfc10e678f67df56

Remove DENO_BUILD_MODE and DENO_BUILD_PATH (#4431) * Remove DENO_BUILD_MODE and DENO_BUILD_PATH Also remove outdated docs related to ninja/gn. * fix * remove parameter to build_mode() * remove arg parsing from benchmark.py

view details

Yusuke Sakurai

commit sha 60cee4f045778777a16b6fffd6d5b9a1400d7246

avoid using same port number for test (#4147)

view details

Bert Belder

commit sha b191c919f3bde46fe7e0112a33f060715b50b9a4

Optimize github cache usage, remove sccache (#4452)

view details

Akshat Agarwal

commit sha b8a5c29bf8e04bb6210080a05ce34e9a8d1d1496

BREAKING CHANGE Rename Deno.run's args to cmd (#4444) This is to avoid confusion with Deno.args which does not include the executable to be run.

view details

Ryan Dahl

commit sha 12ff78ed4cdf05a27348079c5af259ab2492423e

Remove @url comments from d.ts files (#4449) These have no function and are not tested, probably incorrect in many situations.

view details

uki00a

commit sha 07ea145ec4d1defe4481035432bb63234560ba8d

re-enable a test (#4461)

view details

Yusuke Sakurai

commit sha c337d2c4349abd710b1ab0d4de3f1041cd02715c

clean up textproto code in std (#4458) - moved and renamed append() into bytes from ws and textproto - renamed textproto/readder_tests.ts -> textproto/test.ts

view details

Ryan Dahl

commit sha 3e74309798513c5238cef9aa1c6907c1173fec49

ci: releases should all use zip and LLVM target triples (#4460) Old release files are left around until we are able to update deno_install.

view details

Chris Knight

commit sha a0ba476feef9dcc1b3bbd5144d2e48ef5053ee09

doc: API improvements to chown, close, compile and connect (#4463)

view details

bartOssh

commit sha ec0738606753b34525988fd9f58a23cb300b7bc0

feat: first pass at "deno upgrade" (#4328)

view details

Ryan Dahl

commit sha d143fe61bc61030c0874c091aa0dd8bf5141b5fa

v0.37.0

view details

Bert Belder

commit sha 449dbe5272aef429067abe3226d30f640fd3bac3

Statically link the C runtime library on Windows (#4469)

view details

Ryan Dahl

commit sha b924e5ab7e69eab4d3b6d9a863a8fc2974f33b5d

v0.37.1

view details

push time in 2 days

push eventafinch7/deno

afinch7

commit sha 6818fb67967b590c876bd63108e4ef6e7b5e9dc1

remove ts file replace with js and d.ts, add more testing to plugins

view details

push time in 2 days

push eventafinch7/deno

afinch7

commit sha c89624341a707f2e7857a9952916494a5dd97390

revert cli implementation and reorganize dispatch_json.rs

view details

push time in 3 days

Pull request review commentdenoland/deno

[WIP] feat: `dispatch_json` in core

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+use crate::isolate::ZeroCopyBuf;+use crate::ops::Buf;+use crate::ops::CoreOp;+use futures::future::FutureExt;+pub use serde_derive::{Deserialize, Serialize};+use serde_json::json;+pub use serde_json::Value;+use std::fmt::Debug;+use std::future::Future;+use std::pin::Pin;++/// Error kind representation for all errors.+/// For encoding kinds are split into three distinct regions:+/// internal(<0), external(>0), and UnKind/other(==0).+///  ========================================================================+///  i64 Min <--- Internal Kinds ---< -1|0|1 >--- External Kinds ---> i64 Max+///                                      ^+///                                UnKind/Other+#[derive(Clone, Copy, PartialEq, Debug)]+pub enum JsonErrorKind {+  /// Normal error kind.+  /// This value should always be greater than 0!+  /// These values are meaningless outside of their respective implementation+  /// of dispatch json(see full explanation in JsonError::kind).+  Kind(u32),+  /// No kind/not implemented. Corresponds to kind = 0.+  UnKind,+}++impl From<u32> for JsonErrorKind {+  fn from(kind: u32) -> Self {+    if kind == 0 {+      return Self::UnKind;+    }+    Self::Kind(kind)+  }+}++/// Object that can be encoded to json and sent back to represent rust errors to TS/JS.+pub trait JsonError: Sync + Send {+  /// Returns kind represented as a JsonErrorKind. The numeric values assoiacted+  /// to each kind are arbitrary(see explaination below).+  ///+  /// Their isn't a simple way to driectly share kind types between TS and rust.+  /// It is up to the implementation to control how error kinds are mapped to+  /// u32 values on the rust side and then converted back on the TS/JS side.+  /// On the rust side this is pretty much free form, but I recommend using+  /// a enum with discriminant values(see `InternalErrorKinds`). For the ts side+  /// this is controlled by the "errorFactory":+  /// (kind as u32, message) -> errorFactory -> Error+  fn kind(&self) -> JsonErrorKind;+  /// Error message as string value.+  fn msg(&self) -> String;+}++/// Internal error kinds for json dispatch system+/// These values are serialized as negative(x * -1)!+// Warning! The values in this enum are duplicated in dispatch_json.ts+// Update carefully+#[derive(Clone, Copy, PartialEq, Debug)]+enum InternalErrorKinds {+  JsonIoError = 1,+  JsonSyntaxError = 2,+  JsonDataError = 3,+  JsonEofError = 4,+}++/// Internal error expression and conversion implementation.+trait InternalError {+  /// Kind is specific to implementation.+  fn kind(&self) -> JsonErrorKind;+  /// Error message as string value.+  fn msg(&self) -> String;+  /// Make InternalJsonError from this object+  fn to_final_json_error(&self) -> FinalJsonError {+    let kind = match self.kind() {+      JsonErrorKind::Kind(k) => {+        assert!(k != 0, "kind = 0 is reserved for UnKind");+        k as i64 * -1+      }+      JsonErrorKind::UnKind => 0,+    };+    FinalJsonError {+      kind,+      message: self.msg(),+    }+  }+}++impl InternalError for serde_json::error::Error {+  fn kind(&self) -> JsonErrorKind {+    use serde_json::error::Category::*;+    JsonErrorKind::Kind(match self.classify() {+      Io => InternalErrorKinds::JsonIoError,+      Syntax => InternalErrorKinds::JsonSyntaxError,+      Data => InternalErrorKinds::JsonDataError,+      Eof => InternalErrorKinds::JsonEofError,+    } as u32)+  }++  fn msg(&self) -> String {+    self.to_string()+  }+}++/// Internal representation of an error from inside or outside of json dispatch.+/// All errors get converted to this format before being serialized.+#[derive(Debug, Clone, Serialize)]+struct FinalJsonError {+  pub kind: i64,+  pub message: String,+}++impl<E: JsonError + Send + Sync> From<E> for FinalJsonError {+  fn from(e: E) -> FinalJsonError {+    let kind = match e.kind() {+      JsonErrorKind::Kind(k) => {+        assert!(k != 0, "kind = 0 is reserved for UnKind");+        k as i64+      }+      JsonErrorKind::UnKind => 0,+    };+    FinalJsonError {+      kind,+      message: e.msg(),+    }+  }+}++pub type JsonResult<E> = Result<Value, E>;++pub type AsyncJsonOp<E> = Pin<Box<dyn Future<Output = JsonResult<E>>>>;++pub enum JsonOp<E: JsonError> {+  Sync(Value),+  Async(AsyncJsonOp<E>),+  /// AsyncUnref is the variation of Async, which doesn't block the program+  /// exiting.+  AsyncUnref(AsyncJsonOp<E>),+}

This doesn't really simplify anything afaik.

  • Can't implement Into directly for foreign error kinds I.E. impl Into<JsonSerializableError> for url::ParseError
  • Into is a trait therefore it isn't sized(would need to be boxed)
  • From is required for use of the ? operator
afinch7

comment created time in 3 days

Pull request review commentdenoland/deno

[WIP] feat: `dispatch_json` in core

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+use crate::isolate::ZeroCopyBuf;+use crate::ops::Buf;+use crate::ops::CoreOp;+use futures::future::FutureExt;+pub use serde_derive::{Deserialize, Serialize};+use serde_json::json;+pub use serde_json::Value;+use std::fmt::Debug;+use std::future::Future;+use std::pin::Pin;++/// Error kind representation for all errors.+/// For encoding kinds are split into three distinct regions:+/// internal(<0), external(>0), and UnKind/other(==0).+///  ========================================================================+///  i64 Min <--- Internal Kinds ---< -1|0|1 >--- External Kinds ---> i64 Max+///                                      ^+///                                UnKind/Other+#[derive(Clone, Copy, PartialEq, Debug)]+pub enum JsonErrorKind {+  /// Normal error kind.+  /// This value should always be greater than 0!+  /// These values are meaningless outside of their respective implementation+  /// of dispatch json(see full explanation in JsonError::kind).+  Kind(u32),+  /// No kind/not implemented. Corresponds to kind = 0.+  UnKind,+}++impl From<u32> for JsonErrorKind {+  fn from(kind: u32) -> Self {+    if kind == 0 {+      return Self::UnKind;+    }+    Self::Kind(kind)+  }+}++/// Object that can be encoded to json and sent back to represent rust errors to TS/JS.+pub trait JsonError: Sync + Send {+  /// Returns kind represented as a JsonErrorKind. The numeric values assoiacted+  /// to each kind are arbitrary(see explaination below).+  ///+  /// Their isn't a simple way to driectly share kind types between TS and rust.+  /// It is up to the implementation to control how error kinds are mapped to+  /// u32 values on the rust side and then converted back on the TS/JS side.+  /// On the rust side this is pretty much free form, but I recommend using+  /// a enum with discriminant values(see `InternalErrorKinds`). For the ts side+  /// this is controlled by the "errorFactory":+  /// (kind as u32, message) -> errorFactory -> Error+  fn kind(&self) -> JsonErrorKind;+  /// Error message as string value.+  fn msg(&self) -> String;+}++/// Internal error kinds for json dispatch system+/// These values are serialized as negative(x * -1)!+// Warning! The values in this enum are duplicated in dispatch_json.ts+// Update carefully+#[derive(Clone, Copy, PartialEq, Debug)]+enum InternalErrorKinds {+  JsonIoError = 1,+  JsonSyntaxError = 2,+  JsonDataError = 3,+  JsonEofError = 4,+}++/// Internal error expression and conversion implementation.+trait InternalError {+  /// Kind is specific to implementation.+  fn kind(&self) -> JsonErrorKind;+  /// Error message as string value.+  fn msg(&self) -> String;+  /// Make InternalJsonError from this object+  fn to_final_json_error(&self) -> FinalJsonError {+    let kind = match self.kind() {+      JsonErrorKind::Kind(k) => {+        assert!(k != 0, "kind = 0 is reserved for UnKind");+        k as i64 * -1+      }+      JsonErrorKind::UnKind => 0,+    };+    FinalJsonError {+      kind,+      message: self.msg(),+    }+  }+}++impl InternalError for serde_json::error::Error {+  fn kind(&self) -> JsonErrorKind {+    use serde_json::error::Category::*;+    JsonErrorKind::Kind(match self.classify() {+      Io => InternalErrorKinds::JsonIoError,+      Syntax => InternalErrorKinds::JsonSyntaxError,+      Data => InternalErrorKinds::JsonDataError,+      Eof => InternalErrorKinds::JsonEofError,+    } as u32)+  }++  fn msg(&self) -> String {+    self.to_string()+  }+}++/// Internal representation of an error from inside or outside of json dispatch.+/// All errors get converted to this format before being serialized.+#[derive(Debug, Clone, Serialize)]+struct FinalJsonError {+  pub kind: i64,+  pub message: String,+}++impl<E: JsonError + Send + Sync> From<E> for FinalJsonError {+  fn from(e: E) -> FinalJsonError {+    let kind = match e.kind() {+      JsonErrorKind::Kind(k) => {+        assert!(k != 0, "kind = 0 is reserved for UnKind");+        k as i64+      }+      JsonErrorKind::UnKind => 0,+    };+    FinalJsonError {+      kind,+      message: e.msg(),+    }+  }+}

This is internal only. Not relevant to implementations of dispatch_json. The existing implementation in cli only requires a single trait implementation for OpError:

impl JsonError for OpError {
  fn kind(&self) -> JsonErrorKind {
    (self.kind as u32).into()
  }

  fn msg(&self) -> String {
    self.msg.clone()
  }
}
afinch7

comment created time in 3 days

push eventafinch7/deno

afinch7

commit sha 6612fcb814842fbbc187029a09b59a62d60631e8

fixes

view details

push time in 13 days

push eventafinch7/deno

afinch7

commit sha 1998d2cd010cfd5ac22d6539ec08d8f85c289be0

fixes

view details

push time in 14 days

push eventafinch7/deno

Bartek Iwańczuk

commit sha 4a4894532e9ffe0066038783b4178c7dd770ba24

try to handle ConnectionReset error in windows CI for unit tests (#4407)

view details

Bert Belder

commit sha a2b285158242b86a002e353776d52742ea35a496

Upgrade rust crates (#4412)

view details

Bert Belder

commit sha 0ef99ac970729dac0de8ccb78eed8c1c74fcd350

Set environment variables correctly in Github Actions (#4412)

view details

Bert Belder

commit sha 67ab201e2653dfbda1a3277317ed182e99d494c2

Use V8 binary build in Github Actions (#4412)

view details

Ryan Dahl

commit sha 6bd940abfd0319d8d432970e63215090b700a936

Update manual (#4412)

view details

Ryan Dahl

commit sha fb27e71c01983cd1a51802b2517815de39239a3c

Fix benchmarks (#4416)

view details

Ryan Dahl

commit sha 83f49161953c0c79056a56a19754fbf298f53f21

ci: Use github action's cache in addition to sccache (#4417)

view details

Kitson Kelly

commit sha da8cb408c878aa6e90542e26173f1f14b5254d29

Provide compiled JSON to TypeScript compiler. (#4404) Fixes #4101 Previously, we would just provide the raw JSON to the TypeScript compiler worker, but TypeScript does not transform JSON. This caused a problem when emitting a bundle, that the JSON would just be "inlined" into the output, instead of being transformed into a module. This fixes this problem by providing the compiled JSON to the TypeScript compiler, so TypeScript just sees JSON as a "normal" TypeScript module.

view details

Bert Belder

commit sha 070464e2cc617ecbd2c63dc5c4ac0432a77a29fd

Fix unit test runner ConnectionReset bug (#4424) Fixes: #4373

view details

Bartek Iwańczuk

commit sha 6e2df8c64feb92653077a5494d2c64a9f6fd2f48

feat: Deno.test() sanitizes ops and resources (#4399) This PR brings assertOps and assertResources sanitizers to Deno.test() API. assertOps checks that test doesn't leak async ops, ie. there are no unresolved promises originating from Deno APIs. Enabled by default, can be disabled using Deno.TestDefinition.disableOpSanitizer. assertResources checks that test doesn't leak resources, ie. all resources used in test are closed. For example; if a file is opened during a test case it must be explicitly closed before test case finishes. It's most useful for asynchronous generators. Enabled by default, can be disabled using Deno.TestDefinition.disableResourceSanitizer. We've used those sanitizers in internal runtime tests and it proved very useful in surfacing incorrect tests which resulted in interference between the tests. All tests have been sanitized. Closes #4208

view details

Chris Knight

commit sha 2a34cbfaf9530e86f5c049f82f8e35c086e22263

Improve API docs for Deno.bundle and Deno.chdir (#4426)

view details

Chris Knight

commit sha 54d1f299dc774c695056f04cfe1013287b53b86a

Chmod API documentation improvements (#4427)

view details

Bartek Iwańczuk

commit sha b0b27c43100bf4a7303174b9765c853d2f76f207

refactor: rename Deno.TestDefinition.skip to ignore (#4400)

view details

Kitson Kelly

commit sha 5b10ab0984fd762c14caf524d59ec8b6940d2bfb

feat: Add helper functions for permissions to std (#4258)

view details

Bartek Iwańczuk

commit sha 8de4a05f2a93f194f71b959f4d47a1b4fc61aa41

fix: std/testing/runner.ts and deno test (#4392) After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1. * fixed argument value passed to Deno.runTests() in deno test * fixed argument value passed to Deno.runTests() in std/testing/runner.ts * added integration tests for deno test to ensure failFast and exitOnFail work as expected * don't write test file to file system, but keep it in memory

view details

Bartek Iwańczuk

commit sha 74c37e759ac03267975309c1425223289ebc925f

remove std/testing/runner.ts, use deno test for std/ tests (#4397) This introduces BREAKING CHANGE by removing "std/testing/runner.ts". Std tests are now run using "deno test" subcommand.

view details

Nikolai Vavilov

commit sha 8c1c929034d46101b6a51ec5cf5e2f307ed0c271

fix: stack traces for modules imported via std/node's require (#4035)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 2f3de4b4252b933ac1161ba099feaed9103ab149

Simplify timer with macrotask callback (#4385)

view details

Bartek Iwańczuk

commit sha 3ef34673c9b92aa3c54dfccb37c06b82d6fb3eab

std(http/server): close open connections on server close (#3679) Due to structure of "Server" for each open connection there's a pending "read" op. Because connection owned by "Server" are not tracked, calling "Server.close()" doesn't close open connections. This commit introduces simple tracking of connections for server and ensures owned connections are closed on "Server.close()".

view details

Ryan Dahl

commit sha 392d2c11182332b8d3c168169b1585e3419cb1eb

Fix cafile_install_remote_module test (#4429)

view details

push time in 14 days

push eventafinch7/deno

afinch7

commit sha abced8ea5dbe2bcada54118bf69ff8b7fb6bee88

update docs/comments and fix issue internal error kind mapping

view details

push time in 14 days

PR opened denoland/deno

[WIP] feat: `dispatch_json` in core

heavily based on #3692 This should be mostly working other than plugin support(maybe save that for a follow up).

+689 -348

0 comment

42 changed files

pr created time in 14 days

push eventafinch7/deno

afinch7

commit sha 125c4b8de097194d12fabd402bd85f05b6187ed4

update TypeScript implementation

view details

push time in 14 days

push eventafinch7/deno

afinch7

commit sha 686b9e5c8f072c9d6af653b67a4ef4aea63d5360

feat: `dispatch_json` in core

view details

afinch7

commit sha 4c2017038dddb548257e604cba0090476a1f2853

implement in cli rust side

view details

push time in 14 days

push eventafinch7/deno

afinch7

commit sha 9db7c12d21b8724f8c930e2764c71ea2ea102aef

feat: `dispatch_json` in core

view details

push time in 15 days

issue openedrust-lang/rust

ICE when casting negative discriminant enum values to anything less than bit width

Compiling this code on playground:

enum Nums {
    NegOne = -1,
}

fn main() {
    let kind = Nums::NegOne;
    let _v = kind as i32;
}

results in ICE. Casting to anything smaller than usize/isize(u32, u16, i16, u8, i8, etc) also results in ICE. Casting to anything same size or larger(u128, i128, u64, i64, etc) works fine. Positive discriminant values also work fine. Version of rustc: rustc 1.42.0 (b8cedc004 2020-03-09) running on x86_64-unknown-linux-gnu(on rust playground) Compiler flags listed as used: -C codegen-units=1 -C debuginfo=2 --crate-type bin

created time in 15 days

push eventafinch7/deno

Bartek Iwańczuk

commit sha e1687c0a4616e90d4bbde42b13a0356a7f6a1e7d

rename Deno.Err -> Deno.errors (#4093)

view details

Ryan Dahl

commit sha f4fd433e1aa6c8c086c38df39c39bec23c56a29c

Add Deno.Err change missing from previous commit (#4113)

view details

Suguru Motegi

commit sha 79c6e052ed29b9b78c31f2e01da3b91f76b6a017

fix: createSecKey logic (#4063)

view details

Ryan Dahl

commit sha 4005174f6c584fd5200dbe450b269a7f0de487ce

Revert "Remove ansi_term dependency" Broke colors https://github.com/denoland/deno/issues/4112#issuecomment-590545385 This reverts commit c250778704a4e0065e54e6bf6ca6c39d556a6d8d.

view details

João Souto

commit sha ac933dd1b89a20b2e63b5d6edc5b3d0c549335bc

port tools/repl_test.py to Rust (#4096) ref #2988

view details

João Souto

commit sha 5c1ab080cd8989c3ac2b3a8c919fe14052feac79

Remove ansi_term dependency (#4116)

view details

Yusuke Sakurai

commit sha 22f88b9f37b7e233fd4f15b73d5a2096224e56dc

fix: [http] Consume unread body and trailers before reading next request (#3990) - Added `ServerRequest.finalize()`: consuming all unread body stream and trailers. - This is cleanup method for reading next request from same keep-alive connection. - Needed when handler didn't consume all body and trailers even after responding. - refactor: `ServerRequest._bodyStream()`, `ServerRequestBody` are removed. - Now using `bodyReader()` and `chunkedBodyReader()` instead. - fix: Trailers should only be read `transfer-encoding` is `chunked` and `trailer` header is set and its value is valid. - fix: use `Headers.append()` on reading trailers. - fix: delete `trailer` field from headers after reading trailers. - reorg: Several functions related to IO are moved into `http/io.ts`

view details

Kitson Kelly

commit sha 805992b14a65a6dbfb857dea6d9b657477de043d

Fix issues with JavaScript importing JavaScript. (#4120) Fixes #3852 Fixes #4117

view details

Ryan Dahl

commit sha 91b606aaae23bcb790b55adc5fe70a182a37d564

Clean up how we use opIds (#4118)

view details

Nayeem Rahman

commit sha 14e7e1e3af43b2322a26fcc542428c8f1af4460d

fix: Resolve makeTemp* paths from CWD (#4104)

view details

Ryan Dahl

commit sha fe181e2b4850a83344f0aa5840fffe97c8cb8839

ci: Use fetch-depth: 5 (#4127)

view details

Ryan Dahl

commit sha f47f3f96726a94dd2df5d68e3c786b5079089dd4

Remove _async from method names since _sync are gone (#4128)

view details

Kitson Kelly

commit sha be787d09d537d6c1a6846168613dd0defe069448

upgrade: TypeScript 3.8 (#4100)

view details

João Souto

commit sha e53064c4f22efeb8a4eda2712e15c77d2699a686

Port permission_prompt_tests to Rust (#4129)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 5946808f66aab1983ade3db2541734bb43626a72

tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)

view details

Bartek Iwańczuk

commit sha 0e37184ca8084c257948d466c066fdb875ee44f3

add window.self read-only property (#4131)

view details

Ryan Dahl

commit sha 3d03d7e83b855a0eaef083f9ba249b1927eba51c

Fix flaky tests (#4134)

view details

Ryan Dahl

commit sha 3eebef39c55ead92d17bdf8016c3c58118b49936

upgrade: dprint 0.7.0 (#4130) * upgrade: dprint 0.7.0 Also make deno fmt less verbose (like cargo fmt)

view details

Ryan Dahl

commit sha 9a8d6fbd984d2c0f9775d90af64b3e95231dd21d

DenoFlags -> Flags (#4136)

view details

Yusuke Sakurai

commit sha 942e67c00b8ebdf6671fc8bb2e6c78c3ad8b3ff8

refactor(std/http): move io functions to http/io.ts (#4126)

view details

push time in 16 days

pull request commentjasonwilliams/boa

feat: import parsing

This isn't really spec compliant, but it works fine for the time being. Things like multiple default imports are parsed without error. This example isn't supposed to be valid, but it parses fine:

import default, defaultTwo from "./somefile.js";

I'm not to concerned with this currently. I would prefer to move on to export parsing and revisit this once module execution works.

afinch7

comment created time in 16 days

push eventafinch7/boa

afinch7

commit sha 163e95b33862f3c198bf4fcb9d7259954c93f65c

feat: import parsing Not perfectly spec compliant yet, but should be close enough until import execution is implemented.

view details

push time in 16 days

push eventafinch7/boa

Iban Eguia

commit sha 86052d6d75d7ac321e9b6b83dbf3bf2f2377437f

Moved test modules to their own files (#258)

view details

Iban Eguia

commit sha f628f4cc8cd5be5af3430339be25086ee2975c2c

Fixed empty returns (#251) (#257)

view details

John Doneth

commit sha d92da39299e8eb5810b2274eab9ab10dae2cbbe3

Add print & REPL functionality to CLI (#267) * Add basic REPL functionality * Add utility function to Realm * Rework flow to allow files to be loaded as well as open a shell * Remove shell option (not needed now its the default) * Update README.md & docs/debugging.md

view details

Jason Williams

commit sha 9766409c521af12f93ec53b68169fdafd5bd5b21

Addition of forEach() (#268) * Addition of forEach() * fixing LLDB launcher for windows (it needs .exe to work for windows)

view details

Nick Vernij

commit sha 6fa8d484a9a3d73cec1a30eeb941fb3b5f7df917

Implement Array.prototype.filter (#262)

view details

Nick Vernij

commit sha 2d5bf5595665d65c25ffb7fcde8047819745acba

Fix parsing of floats that start with a zero (#272)

view details

afinch7

commit sha 630ec440ac364c561fbd306925dcb64531322e78

wip: import parsing

view details

push time in 16 days

PR opened denoland/deno

fix: deno_tcp bench segfault on exit

Fixes segfault that occurs on exit of deno_tcp bench sometimes. This issue may actually be a bug in v8, so this fix may be temporary. ref #4149

cc @bartlomieju @piscisaureus

+5 -0

0 comment

1 changed file

pr created time in a month

create barnchafinch7/deno

branch : fix_pending_ops_segfault

created branch time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

I gave that a try and got a segfault on the first try:

impl Drop for Isolate {
  fn drop(&mut self) {
    if let Some(creator) = self.snapshot_creator.take() {
      // TODO(ry): in rusty_v8, `SnapShotCreator::get_owned_isolate()` returns
      // a `struct OwnedIsolate` which is not actually owned, hence the need
      // here to leak the `OwnedIsolate` in order to avoid a double free and
      // the segfault that it causes.
      let v8_isolate = self.v8_isolate.take().unwrap();
      forget(v8_isolate);

      // TODO(ry) V8 has a strange assert which prevents a SnapshotCreator from
      // being deallocated if it hasn't created a snapshot yet.
      // https://github.com/v8/v8/blob/73212783fbd534fac76cc4b66aac899c13f71fc8/src/api.cc#L603
      // If that assert is removed, this if guard could be removed.
      // WARNING: There may be false positive LSAN errors here.
      if self.has_snapshotted {
        drop(creator);
      }
    }
    let v8_isolate = self.v8_isolate.take();
    drop(v8_isolate);
    let ops = std::mem::take(&mut self.pending_ops);
    drop(ops);
  

> }

}

The v8 docs don't mention this one directly, but it kinda makes sense now that I think about it.

  /**
   * Disposes the isolate.  The isolate must not be entered by any
   * thread to be disposable.
   */
  void Dispose();
bartlomieju

comment created time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

That should be easy to test. Just drop isolate before pending ops. It should fault almost every time.

bartlomieju

comment created time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

This change the drop implementation for Isolate seems to fix the issue, but still not sure why:

impl Drop for Isolate {
  fn drop(&mut self) {
    if let Some(creator) = self.snapshot_creator.take() {
      // TODO(ry): in rusty_v8, `SnapShotCreator::get_owned_isolate()` returns
      // a `struct OwnedIsolate` which is not actually owned, hence the need
      // here to leak the `OwnedIsolate` in order to avoid a double free and
      // the segfault that it causes.
      let v8_isolate = self.v8_isolate.take().unwrap();
      forget(v8_isolate);

      // TODO(ry) V8 has a strange assert which prevents a SnapshotCreator from
      // being deallocated if it hasn't created a snapshot yet.
      // https://github.com/v8/v8/blob/73212783fbd534fac76cc4b66aac899c13f71fc8/src/api.cc#L603
      // If that assert is removed, this if guard could be removed.
      // WARNING: There may be false positive LSAN errors here.
      if self.has_snapshotted {
        drop(creator);
      }
    }
    std::mem::take(&mut self.pending_ops);
  }
}

I tried to drop shared_ab(and shared) before pending_ops, but I couldn't get it to segfault anymore.

bartlomieju

comment created time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

I ran it again with added debug code, and I got a segfault.

bartlomieju

comment created time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

I think this happens when the connection is closed, but we still have future with a SharedRef in the form of ZeroCopyBuf. When we drop the deno_core::Isolate, the field shared_ab is dropped first followed by pending_ops(which contains our future that contains a ZeroCopyBuf). SharedRef isn't safe by rust's standards. Ideally SharedRef should be re-implemented as a reference counting pointer.

bartlomieju

comment created time in a month

issue commentdenoland/deno

segfault running tools/deno_tcp.ts

I have this one mostly figured out. Here is a patch for rusty v8 that resolves it:

diff --git a/src/binding.cc b/src/binding.cc
index d37b660..1bdfa9e 100644
--- a/src/binding.cc
+++ b/src/binding.cc
@@ -620,7 +620,9 @@ v8::BackingStore* std__shared_ptr__v8__BackingStore__get(
 
 void std__shared_ptr__v8__BackingStore__reset(
     std::shared_ptr<v8::BackingStore>& ptr) {
-  ptr.reset();
+  if(ptr != NULL){
+    ptr.reset();
+  }
 }
 
 long std__shared_ptr__v8__BackingStore__use_count(
bartlomieju

comment created time in a month

push eventafinch7/boa

afinch7

commit sha bc205c589df5ec13fdb11689e17911170dd7178c

wip: import parsing

view details

push time in a month

push eventafinch7/boa

afinch7

commit sha 5372370d3c5401c8c438bd08cdaefd94297ca4f7

wip: import parsing

view details

push time in a month

push eventafinch7/boa

afinch7

commit sha cad83df7ce7027ff7c553168aac494dccf11f134

wip: import parsing

view details

push time in a month

issue openedjasonwilliams/boa

Support destructuring assignment

Support destructuring assignment syntax:

const object = {
  name: "text",
  size: 4,
};

const { name, size } = object;

created time in a month

push eventafinch7/boa

afinch7

commit sha 07283e54f0763a00075029134428986034e83c71

wip: import parsing

view details

push time in a month

push eventafinch7/boa

afinch7

commit sha 9e34ca5bdd164efda45250f406f4a9ca31d23cfc

wip: import parsing

view details

push time in a month

push eventafinch7/boa

afinch7

commit sha 10043e6e3007530374b68036b1a68581991f0d80

wip: import parsing

view details

push time in a month

PR opened jasonwilliams/boa

[wip] feat: import parsing

Simple import statement parsing. I intend to follow this up with some execution implementation.

+52 -19

0 comment

6 changed files

pr created time in a month

create barnchafinch7/boa

branch : import_parsing

created branch time in a month

fork afinch7/boa

Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.

fork in a month

pull request commentdenoland/deno

[WIP] feat: `dispatch_json` in core

@bartlomieju Main blocker is still ErrorKind/OpError. It either needs to be moved to core or ErrorKind needs to be represented by a string value.

afinch7

comment created time in a month

push eventafinch7/deno

Bartek Iwańczuk

commit sha c824eb5817db675be4d9966a0d1a43d90dfa61fd

refactor: Modules and Loader trait (#3791) * move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions. * change argument type from &str to &ModuleSpecifier where applicable

view details

Ben Noordhuis

commit sha 97ed0c954d2ae2237bc4aa69ef053f41f99762eb

feat: make eval support --v8-flags=... (#3797) Closes #3796

view details

Ben Noordhuis

commit sha ba78ba69b010ec2dfb07456801f3393d96c17457

fix clippy warnings (#3798)

view details

Ryan Dahl

commit sha 9d98f0126c5e19704b273579acf40132a38ce43b

Remove dead code in cli/shell.rs (#3792)

view details

Kevin (Kun) "Kassimo" Qian

commit sha ec44be0760d647b3d005387d2f44ad0336d01024

lock: support lock-write for fetch command (#3787)

view details

Kitson Kelly

commit sha f604becaba0c747fdf8dd9d0d744c7bd19322e41

Improve support of type definitions (#3755)

view details

Bartek Iwańczuk

commit sha ac10d79d231d3b66b918764b9706597321850687

refactor: isomorphic snapshot for CLI (#3728)

view details

Bartek Iwańczuk

commit sha f32c31a0eba90b6b1f711a2d5dfe182157d3ecb5

dx: descriptive permission errors (#3808) Before: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ``` After: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ```

view details

Ryan Dahl

commit sha d14864c57cebbd1d5bc18b8a9e05e522eb9987b0

Upgrade rusty_v8 (#3816)

view details

Bartek Iwańczuk

commit sha 161adfc51b750a7c8c62a898ea9948c2ad5b6cd9

workers: proper TS libs, more spec-compliant APIs (#3812) * split lib.deno_main.d.ts into: - lib.deno.shared_globals.d.ts - lib.deno.window.d.ts - lib.deno.worker.d.ts * remove no longer used libs: - lib.deno_main.d.ts - lib.deno_worker.d.ts * change module loading to use proper TS library for compilation * align to Worker API spec: - Worker.terminate() - self.close() - self.name

view details

cknight

commit sha f0a6062012c4e09553877c9feedb3fbc3d4625b9

Partial implementation of node os polyfill based on currently available Deno functionality (#3821)

view details

Bartek Iwańczuk

commit sha 73a3cc21d0e7ceec1275078db125f57ce97725fb

feat: dprint formatter (#3820) * rewrite fmt_test in Rust, remove tools/fmt_test.py * remove //std/prettier

view details

EnokMan

commit sha 1c6c6c6d7f85c7f9a7c77489abba669d5dff22ab

Deno.makeTempDir() check permissions (#3810)

view details

Ryan Dahl

commit sha e1b3a0769a09458855aeaedfc78176b90a1e0788

Try to fix docs.rs for cli crate (#3823)

view details

Ryan Dahl

commit sha 8e3bc774f73ba4736c1fa1d32d1d66d66f8af95e

Adjust dprint configuration to be closer to prettier (#3824)

view details

Ryan Dahl

commit sha 51089836eb835d6b4cc03653dcb0b7a281017157

Upgrade Rust crates (#3829)

view details

Ryan Dahl

commit sha 2338e7679c8840314642dbf3ea838908f5f35d3c

Remove --current-thread flag (#3830) This flag was added to evaluate performance relative to tokio's threaded runtime. Although it's faster in the HTTP benchmark, it's clear the runtime is not the only perf problem. Removing this flag will simplify further refactors, in particular adopting the #[tokio::main] macro. This will be done in a follow up. Ultimately we expect to move to the current thread runtime with Isolates pinned to specific threads, but that will be a much larger refactor. The --current-thread just complicates that effort.

view details

Ryan Dahl

commit sha 25b13c8917061c569e8f92da124b1b446dc223f0

Use tokio::main (#3831)

view details

Bartek Iwańczuk

commit sha de5c099b47bd1d2e528f1a10179f130a02f26f86

feat: deno install in Rust (#3806) //std/installer couldn't be removed due to bug, but it's now deprecated.

view details

Chris Knight

commit sha 3de9540ac6ae5ce051ccd9be69c1d6ef64663a26

feat(std/node) Endianness (#3833)

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 1332176d42127af648308188e118750ed2383f09

feat: in core

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha dab928036648801103b9b60530e3af599e432e64

feat: `dispatch_json` in core

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 6400823c325fb4e7cafe6fcbf01415b8078e1c47

feat: plugin resources

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 0ff5f22952121f1998326ce64dc0a0cfb713b4da

feat: plugin resources

view details

push time in a month

push eventafinch7/deno

木杉

commit sha 6dd964384509e71598d08ae09c59f5f2c035a135

upgrade: dprint 0.6.1 (#4061)

view details

Bartek Iwańczuk

commit sha d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b

fix: add io ops to worker to fix fetch (#4054)

view details

Bartek Iwańczuk

commit sha dd8a10948195f231a6a9eb652e3f208813904ad6

refactor: remove unneeded ErrorKinds (#3936)

view details

hazæ41

commit sha 08686cbc3ae63008837ee45b2c4f41d6674c57dd

feat: support UDP sockets (#3946)

view details

ecyrbe

commit sha 754b8c65ad5adda2961c667a6b64ab59c130111d

feat(std/node) : add os.platform (#4064)

view details

Bartek Iwańczuk

commit sha bd640bc7e6a946dec4477afc64d8083e372660f6

feat: Deno.fsEvents() (#3452)

view details

afinch7

commit sha 978d723fb216a8717af60151eaafabc7f8cf35b6

support shared resource table

view details

afinch7

commit sha e6f82c85f2b282095b71226f87edc55443f89e91

feat: plugin resources

view details

push time in a month

push eventafinch7/deno

木杉

commit sha 6dd964384509e71598d08ae09c59f5f2c035a135

upgrade: dprint 0.6.1 (#4061)

view details

Bartek Iwańczuk

commit sha d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b

fix: add io ops to worker to fix fetch (#4054)

view details

Bartek Iwańczuk

commit sha dd8a10948195f231a6a9eb652e3f208813904ad6

refactor: remove unneeded ErrorKinds (#3936)

view details

hazæ41

commit sha 08686cbc3ae63008837ee45b2c4f41d6674c57dd

feat: support UDP sockets (#3946)

view details

ecyrbe

commit sha 754b8c65ad5adda2961c667a6b64ab59c130111d

feat(std/node) : add os.platform (#4064)

view details

Bartek Iwańczuk

commit sha bd640bc7e6a946dec4477afc64d8083e372660f6

feat: Deno.fsEvents() (#3452)

view details

afinch7

commit sha 978d723fb216a8717af60151eaafabc7f8cf35b6

support shared resource table

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 63e2394ec92c13deca3015594eafbec380004ef3

feat: plugin resources

view details

push time in a month

PR opened denoland/deno

feat: support sharing resource table

Prerequisite for #3637

+89 -89

0 comment

12 changed files

pr created time in a month

push eventafinch7/deno

afinch7

commit sha 5cbde5c921c98e30bec9829a1dc2aabda82849a3

support shared resource table

view details

afinch7

commit sha 997aadf46a225f7d28fae849af7ede829c6ebe16

feat: plugin resources

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 3f322c2ea5b7c40b4eb6f7a3290a41577eea2465

support plugin resources

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 5cbde5c921c98e30bec9829a1dc2aabda82849a3

support shared resource table

view details

push time in a month

push eventafinch7/deno

Bartek Iwańczuk

commit sha de5c099b47bd1d2e528f1a10179f130a02f26f86

feat: deno install in Rust (#3806) //std/installer couldn't be removed due to bug, but it's now deprecated.

view details

Chris Knight

commit sha 3de9540ac6ae5ce051ccd9be69c1d6ef64663a26

feat(std/node) Endianness (#3833)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 97b2a0bb958549e298cd137778053210a05d85d8

bring back std/examples/xeval.ts (#3822)

view details

Ryan Dahl

commit sha af081d7449d73ff023b817a30c99236527567aac

upgrade: Rust 1.41.0 (#3838)

view details

Bartek Iwańczuk

commit sha c7a2a33ea1a3245bfc1b9af1db2282ef8e3f7ab3

chore: upgrade dprint (#3842)

view details

Bartek Iwańczuk

commit sha e1697421e2c00508cd78976b6ec586e056530c30

chore: remove std/installer, port installer tests to Rust (#3843)

view details

Ryan Dahl

commit sha 1dc8afe3afc483703641c907075e2d8aa7396cfd

Add NO_BUILD_SNAPSHOTS to speed up incremental builds (#3847)

view details

Tim Ermilov

commit sha 2cd3994902fb6a4d4d0603c839a78503d792b96a

Add support for multiple files in fetch command (#3845)

view details

Andy Finch

commit sha 4f8a5c0239cd633ea3fd15a27046da3edee2b2f2

feat: support crate imports in deno_typescript (#3814) Co-authored-by: Ryan Dahl <ry@tinyclouds.org>

view details

Chris Knight

commit sha 77f4df40f3d5a9456118dc0c296ee2a465b6033a

Fixed month reference in documented output of parseDate and parseDateTime function calls (#3859)

view details

Kevin (Kun) "Kassimo" Qian

commit sha e8df66c12cbb3e51f8776aa91e6db41bbfdcae5e

std/encoding: add base32 support (#3855)

view details

Luka Hartwig

commit sha f168597b7ab81afda3bf4749a81c360d364e7cf1

Remove //tests symlink (#3849)

view details

Rafael Vargas

commit sha 55063dd8e8e3ae52eb90bdf42e36d979dcbb5010

fix: Deno.remove() to properly remove dangling symlinks (#3860) For some reason, the unit tests for Deno.remove() were not being imported to unit_tests.ts and, consequently, not being executed. Thus, I imported them, refactored some existent ones and wrote new ones for the symlink removal case. Since the creation of a symlink is not implemented for Windows yet, assertions that consider this state were added when the tests are executed in this OS.

view details

Ryan Dahl

commit sha fba40d86c4cbb8ff406175820ea9a2d9eb2b40cd

Use tokio::test for some of cli's unit tests (#3868)

view details

serverhiccups

commit sha 2b0cf74a8f6335ae4e8ef2dfe1010d2695b1c518

Make fetch API more standards compliant (#3667)

view details

Bartek Iwańczuk

commit sha f4cc08c4fc97f86d82b860ac11a134dad75dfdca

v0.32.0

view details

Ryan Dahl

commit sha 0471243334ac1aeb76dcaadbc3f0b8114d188fb8

upgrade: dprint 0.3.0-alpha.6

view details

Ryan Dahl

commit sha 161cf7cdfd44ace8937fb7940727984990742d18

refactor: Use Tokio's single-threaded runtime (#3844) This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers

view details

Bartek Iwańczuk

commit sha 70eccff7f1b82a726e22753716faeb4bdc1d2823

reenable some tests (#3882)

view details

Kitson Kelly

commit sha 145188bcf73e614e2df375b9d0a64540aa70f7b3

std/http/server::serve aligned to std/http/server::serveTLS (#3881)

view details

push time in a month

create barnchafinch7/deno

branch : allow_shared_resource_table

created branch time in a month

issue commentdenoland/deno

File.writeSync(buf) - does not write buffer more than 16384 bytes

If this is considered a bug then should writeSync always write the entire buf no matter how long. This might cause issues if the length of the buf overflows the shared queue. This would also seem to make the return of number of bytes written kinda pointless. If we expect we may have to call write multiple times to write the entire buf implementations might look something like this instead:

const buf_size = 40960 //4096 - standard value //16384 - max allowed value !!!
const buf = new Uint8Array(buf_size)
buf.fill(0x31)

const fn = './deno_file_write_bug.txt'
const f = Deno.openSync(fn, 'w')
let bytesWritten = 0;
let bytesView = new Uint8Array(buf.buffer, bytesWritten, buf.buffer.byteLength - bytesWritten);
while (true) {
  console.log("Bytes left at cycle start: ", buf.byteLength - bytesWritten);
  const written = f.writeSync(bytesView)
  console.log("Write cycle written: ", written);
  bytesWritten = bytesWritten + written;
  if (bytesWritten == buf.byteLength) {
    break;
  }
  bytesView = new Uint8Array(buf.buffer, bytesWritten, buf.buffer.byteLength - bytesWritten);
}
console.log("Bytes written: ", bytesWritten);
f.close()

const fi = Deno.lstatSync(fn)
console.log(fi.len === buf_size ? true : fi.len)

I may be wrong, but I believe this is a limitation of the implementation of rust's std::fs::File.

balajahe

comment created time in 2 months

Pull request review commentdenoland/rusty_v8

aarch64/arm64 builds and tests

 jobs:           echo "::set-env name=RUSTC_WRAPPER::sccache"        - name: Test-        run: cargo test -vv --locked --all-targets+        run: cargo test -vv --locked --all-targets --target ${{ matrix.config.TARGET }}

No. This relies on binfmt_misc(kernel module) which reads file headers and executes with the correct interpreter. Works sorta like a shebang.

afinch7

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha a7c697d3757326fe5896b89204836e24699e1172

add test

view details

push time in 2 months

PR opened denoland/deno

no longer require aligned buffer for shared queue

fixes #3925

+16 -29

0 comment

3 changed files

pr created time in 2 months

push eventafinch7/deno

afinch7

commit sha d81353e8f3f6e2b0959c4a3ffe9903d12bca5909

remove divisibility check from shared queue push

view details

push time in 2 months

create barnchafinch7/deno

branch : remove_shared_queue_check

created branch time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha d51c6d8c7a1747ac3cdbf89dce8916bc34cf5eb6

wip: arm64 builds

view details

push time in 2 months

issue commentdenoland/deno

Getting panic error when try to run deno

@mattlennon3 I known I've run into this error some times, but I can't remember if this is caused/fixed it. I would try cargo clean and run again.

sh4hids

comment created time in 2 months

issue commentdenoland/deno

Getting panic error when try to run deno

@mattlennon3 Try running clean and running again(cargo clean).

sh4hids

comment created time in 2 months

Pull request review commentdenoland/rusty_v8

[WIP] aarch64/arm64 builds and tests

 jobs:         with:           python-version: "2.7.x"           architecture: x64+        +      - name: Install cross compile deps

Would it be possible to compile on a Raspberry Pi 4 (I'm mostly concerned about it having only 4GB of RAM).

It might be I got some versions of v8 to compile fine on a Pi 3, but it's really slow(2-3 hours). Not sure about the Pi 4 though.

afinch7

comment created time in 2 months

Pull request review commentdenoland/rusty_v8

[WIP] aarch64/arm64 builds and tests

 jobs:         with:           python-version: "2.7.x"           architecture: x64+        +      - name: Install cross compile deps

Haven't really tried since I added arm64 builds last time. Last time it was problem of missing build tool binaries on these platforms. It would also be very slow. Without setting up our own github actions runners the only way to build on arm is qemu emulation.

afinch7

comment created time in 2 months

issue openeddenoland/deno

replace/remove `GetErrorKind`

In order to move dispatch_json to core we need either build error kinds into core or remove them completely.

created time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha a5c011467b6af017ea55c33c7a78817e67fc1cbd

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 666b689619a895e14dd438ae40dd0089db246999

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha f58b9e7153f024af5558a35d77f33130b62a9c9b

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 9599b8a3cc4cfe94d5885318b1176b83aaf9ea90

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 08873e99ca1bd1b5bd82f379e74b7caabfff63b8

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha b90f0a4fe7ad11d7c4dea28d11a78e4c24e6a6ca

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 1040932629b0c8320beab2ebef5ec77d3fb05756

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha ebd0a77c1c5525a6d80e9815794c3f9a3da1eb88

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 3ae47e53110a14057b982a082c5095094ffad66b

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 800441c1ce700584f18aeaf38cc01646e7150a43

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 88e78b5bf22c78930b7e1248eddde21ab849359e

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 0158eac7a7f3fd389b2cfd1623ad0fb65baedb91

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 82201de8feb53aaa7da6fd2573b4a116f3aa66f6

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 1efa31f9389bbf34bda524bb24d6b1801e7ce078

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha c426cd07a59aa3333997b9f6c39af48fc84de963

wip: arm64 builds

view details

push time in 2 months

push eventafinch7/rusty_v8

afinch7

commit sha 863ed9dc0f737d30493c9c5f6c6d4149ab7345a8

wip: arm64 builds

view details

push time in 2 months

PR opened denoland/rusty_v8

[WIP] aarch64/arm64 builds and tests

ref #265

+28 -1

0 comment

2 changed files

pr created time in 2 months

create barnchafinch7/rusty_v8

branch : aarch64_builds

created branch time in 2 months

issue openeddenoland/rusty_v8

support arm platforms

I've done a little research on this. It looks like cross compiling to arm64 works fine, but it requires some setup and small changes:

  • Sysroot usage is required (need to remove use_sysroot = false from gn options when compiling to arm)
  • target_cpu needs to be set correctly (and maybe v8_target_cpu not sure yet)

Other than these and installing the correct toolchain it's not to hard to compile for arm64 successfully. I would like to get a build with tests running in CI for at least arm64 and maybe other arm platforms if possible.

created time in 2 months

pull request commentdenoland/deno

feat: plugin resource table access

I really want to get this landed. What is still holding this one up?

afinch7

comment created time in 2 months

pull request commentdenoland/deno

[WIP] feat: support crate imports in deno_typescript

@bartlomieju I'm going to refactor #3692 to use this one it lands.

afinch7

comment created time in 2 months

Pull request review commentdenoland/deno

[WIP] feat: support crate imports in deno_typescript

 export let pid: number; export let noColor: boolean;  export { symbols } from "./symbols.ts";+export { testFunction } from "crate://deno_core/test_file.ts";

Seems to work fine as well, but I will remove it now that I know that it works.

./target/debug/deno                                                                                                            ░▒▓ ✔  1m 24s 
> Deno.testFunction("test");
Hello from testFunction: test
afinch7

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha 5455b514dc61f34e60ea4b74dbee4df31b3a1c52

feat: support crate imports in deno_typescript

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha c25f2eff8e59424b79eb810afbbced080374de02

wip: support crate imports in deno_typescript

view details

push time in 2 months

PR closed denoland/deno

std: add `dispatch_stateful` (plugin resources)

depends on #3471 This adds a wrapper for plugin ops that functions like state in cli and provides a single resource table per instance. Example usage:

#[macro_use]
extern crate deno_core;

use deno_core::*;
use deno_dispatch_stateful::PluginState;

pub fn init(cx: &mut dyn PluginInitContext) {
  // Create new PluginState
  let state = PluginState::new();
  // Register new "stateful op" using the state from above.
  cx.register_op(
    "someStatefulOp",
    state.stateful_op(Box::new(op_some_stateful_op)),
  );
}

init_fn!(init);

fn op_some_stateful_op(
  state: &PluginState,
  control: &[u8],
  zero_copy: Option<PinnedBuf>
) -> CoreOp {
  // Lock resource table as mutable
  let mut table = state.lock_resources_mut();
  // Create our new resource
  let new_resource = some_lib::ResourceType::new();
  // Insert it into the resource table
  let rid = table.add("some_resource_type", Box::new(new_resource));
  // Return new rid(u32) encoded to [u8; 4]
  CoreOp::Sync(Box::new(rid.to_ne_bytes()));
}

This should work pretty well, but some things like Deno.close won't work with this solution(see #3453).

+126 -2

0 comment

8 changed files

afinch7

pr closed time in 2 months

Pull request review commentdenoland/deno

[WIP] feat: support crate imports in deno_typescript

 pub fn v8_version() -> &'static str { fn test_v8_version() {   assert!(v8_version().len() > 3); }++crate_modules!["test_file.ts"];

@bartlomieju 👍 I like that better. Still don't think it's perfect, but it makes things much simpler.

afinch7

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha 5474367cc7bae573bd772ee31778c0b52e5d4bbe

wip: support crate imports in deno_typescript

view details

push time in 2 months

push eventafinch7/deno

Bartek Iwańczuk

commit sha c824eb5817db675be4d9966a0d1a43d90dfa61fd

refactor: Modules and Loader trait (#3791) * move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions. * change argument type from &str to &ModuleSpecifier where applicable

view details

Ben Noordhuis

commit sha 97ed0c954d2ae2237bc4aa69ef053f41f99762eb

feat: make eval support --v8-flags=... (#3797) Closes #3796

view details

Ben Noordhuis

commit sha ba78ba69b010ec2dfb07456801f3393d96c17457

fix clippy warnings (#3798)

view details

Ryan Dahl

commit sha 9d98f0126c5e19704b273579acf40132a38ce43b

Remove dead code in cli/shell.rs (#3792)

view details

Kevin (Kun) "Kassimo" Qian

commit sha ec44be0760d647b3d005387d2f44ad0336d01024

lock: support lock-write for fetch command (#3787)

view details

Kitson Kelly

commit sha f604becaba0c747fdf8dd9d0d744c7bd19322e41

Improve support of type definitions (#3755)

view details

Bartek Iwańczuk

commit sha ac10d79d231d3b66b918764b9706597321850687

refactor: isomorphic snapshot for CLI (#3728)

view details

Bartek Iwańczuk

commit sha f32c31a0eba90b6b1f711a2d5dfe182157d3ecb5

dx: descriptive permission errors (#3808) Before: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ``` After: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ```

view details

Ryan Dahl

commit sha d14864c57cebbd1d5bc18b8a9e05e522eb9987b0

Upgrade rusty_v8 (#3816)

view details

Bartek Iwańczuk

commit sha 161adfc51b750a7c8c62a898ea9948c2ad5b6cd9

workers: proper TS libs, more spec-compliant APIs (#3812) * split lib.deno_main.d.ts into: - lib.deno.shared_globals.d.ts - lib.deno.window.d.ts - lib.deno.worker.d.ts * remove no longer used libs: - lib.deno_main.d.ts - lib.deno_worker.d.ts * change module loading to use proper TS library for compilation * align to Worker API spec: - Worker.terminate() - self.close() - self.name

view details

cknight

commit sha f0a6062012c4e09553877c9feedb3fbc3d4625b9

Partial implementation of node os polyfill based on currently available Deno functionality (#3821)

view details

Bartek Iwańczuk

commit sha 73a3cc21d0e7ceec1275078db125f57ce97725fb

feat: dprint formatter (#3820) * rewrite fmt_test in Rust, remove tools/fmt_test.py * remove //std/prettier

view details

EnokMan

commit sha 1c6c6c6d7f85c7f9a7c77489abba669d5dff22ab

Deno.makeTempDir() check permissions (#3810)

view details

Ryan Dahl

commit sha e1b3a0769a09458855aeaedfc78176b90a1e0788

Try to fix docs.rs for cli crate (#3823)

view details

Ryan Dahl

commit sha 8e3bc774f73ba4736c1fa1d32d1d66d66f8af95e

Adjust dprint configuration to be closer to prettier (#3824)

view details

Ryan Dahl

commit sha 51089836eb835d6b4cc03653dcb0b7a281017157

Upgrade Rust crates (#3829)

view details

Ryan Dahl

commit sha 2338e7679c8840314642dbf3ea838908f5f35d3c

Remove --current-thread flag (#3830) This flag was added to evaluate performance relative to tokio's threaded runtime. Although it's faster in the HTTP benchmark, it's clear the runtime is not the only perf problem. Removing this flag will simplify further refactors, in particular adopting the #[tokio::main] macro. This will be done in a follow up. Ultimately we expect to move to the current thread runtime with Isolates pinned to specific threads, but that will be a much larger refactor. The --current-thread just complicates that effort.

view details

Ryan Dahl

commit sha 25b13c8917061c569e8f92da124b1b446dc223f0

Use tokio::main (#3831)

view details

afinch7

commit sha 855349b87fc51c1f8c6d76a6baf3b85c1942a159

feat: plugin resource table access

view details

afinch7

commit sha 4938de222cc32b61c7fcd90ee83af9602a3714e1

add tests for some features(see full msg) Added a test for creating custom resources in plugins, making sure they show up in `Deno.resources()`, and Using `Deno.close()` with plugin resources.

view details

push time in 2 months

issue commentdenoland/deno

Getting panic error when try to run deno

For some reason tokio thinks you have more than 512 threads. What is the output of cat /proc/cpuinfo | grep "physical id"?

sh4hids

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha c62cc26439995b291e3c856abfc891d9c7d05b38

wip: support crate imports in deno_typescript

view details

push time in 2 months

more