profile
viewpoint

Pull request review commentdenoland/deno

WIP Compiler refactor

 window.compilerMain = function compilerMain(): void {         data: JSON.parse(core.errorToJSON(e))       });     }++    // The compiler isolate exits after a single messsage.+    delete window.onmessage; // TODO(ry) Use close() instead?

close() should be fine

ry

comment created time in 11 hours

issue commentdenoland/deno

All of an op's code should live together

It might be a bit more manageable if we group ops together I.E. read, write, copy, etc.. in one crate. I still think the following things are going to be the most problematic:

Generating snapshots at compile time.

Exposing a list of required resources and respective source code would be easy to achieve after compile time I.E. some_op::code = include_bytes!("source/file.ts").

Exposing a complete list before compiling would be more difficult if we want to avoid arbitrary external definitions for these things.

In an ideal world including a op would be simple I.E. Worker::new([deno_op_read::op, deno_op_write::op]). In reality it might be a bit more complicated I.E. def_deno_op!(Worker, [deno_op_read::op, deno_op_write::op]).

Avoiding circular dependency structures when defining the dispatch function for a op.

I.E. deno_op_copy <- deno_cli (for ThreadSafeState) <- deno_op_copy

I'm not sure how rust handles circular dependencies, but if other languages are anything to go by it will be messy if it works at all.

We may need other crates to define capability specific traits for dispatch contexts and implement them for deno_cli::ThreadSafeState.

trait DenoDirContext {
  fn get_deno_dir(&self) -> DenoDir;
}
impl DenoDirContext for ThreadSafeState {
  fn get_deno_dir(&self) -> DenoDir {
    self.dir
  }
}

This would make deno more modular for embedding.

Maintaining type safety in the compiler.

This is really just a result of the first one. Getting what we need to generate types at compile will be harder without resorting to some arbitrary include list.

I figure it's already been thought about, but I figured I would mention how much this change looks like the stepping stones to modular bindings like node. @ry Any insight what you want to avoid in a binding system?

ry

comment created time in 13 hours

pull request commentCraneStation/lightbeam

Fix for ctz and clz

@Vurich Never worked on compilers much before, but I would say automatic resource allocation is the way to go here. I might give that one a try after I get this merged.

afinch7

comment created time in 6 days

push eventafinch7/lightbeam

afinch7

commit sha 6e9cff13a22d2b94626d2e90d59cacb1c0d19b63

revert .gitignore changes

view details

afinch7

commit sha 2563dc53a17e938f89a3ed4ac39e4a829f42a9b1

fixed registry leak and literal casts

view details

push time in 6 days

Pull request review commentCraneStation/lightbeam

Fix for ctz and clz

 rusty-tags.* docs/_build *~ \#*\#+.vscode

Didn't even know you could have a user .gitignore. 👍

afinch7

comment created time in 6 days

PR opened CraneStation/lightbeam

Fix for ctz and clz

Closes #21

Ideally we should detect if a machine supports tzcnt and lzcnt correctly and use those instead when possible.

+156 -4

0 comment

2 changed files

pr created time in 6 days

push eventafinch7/lightbeam

afinch7

commit sha a5fa03abb2727667a37a16fdcf1ef4b96afd6b2d

fix for ctz and clz

view details

push time in 6 days

create barnchafinch7/lightbeam

branch : ctz_clz_fix

created branch time in 6 days

fork afinch7/lightbeam

An experiment with translating wasm code to machine code in a single pass.

fork in 6 days

issue commentCraneStation/lightbeam

ctz and clz for 0 gives unexpected result on older cpus

In this case I was just running tests via cargo +nightly test.

failures:

---- tests::op32::clz::as_param stdout ----
thread 'tests::op32::clz::as_param' panicked at '[quickcheck] TEST FAILED. Arguments: (0)', /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.7.2/src/tester.rs:176:28
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

---- tests::op32::ctz::as_param stdout ----
thread 'tests::op32::ctz::as_param' panicked at '[quickcheck] TEST FAILED. Arguments: (0)', /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.7.2/src/tester.rs:176:28

---- tests::op64::clz::as_param stdout ----
thread 'tests::op64::clz::as_param' panicked at '[quickcheck] TEST FAILED. Arguments: (0)', /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.7.2/src/tester.rs:176:28

---- tests::op64::ctz::as_param stdout ----
thread 'tests::op64::ctz::as_param' panicked at '[quickcheck] TEST FAILED. Arguments: (0)', /home/andy/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.7.2/src/tester.rs:176:28


failures:
    tests::op32::clz::as_param
    tests::op32::ctz::as_param
    tests::op64::clz::as_param
    tests::op64::ctz::as_param

test result: FAILED. 268 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--lib'
afinch7

comment created time in 11 days

push eventafinch7/wasi-common

andy finch

commit sha 1a478e8eff9d0b44e37531094abe472e8bf72aa9

remove rustfmt file from .gitignore

view details

push time in 11 days

issue openedCraneStation/lightbeam

ctz and clz for 0 gives unexpected result on older cpus

Tests on fail on older cpus(intel sandy bridge and older). ctz and clz give 0 instead of bit width. Cpus tested: e5-2670 v1(fail), i7-3820(fail), i7-4790K(pass)

created time in 11 days

pull request commentCraneStation/wasi-common

add .gitignore

I was looking at the .gitignore in wasmtime for reference. I wasn't sure why it was there either, but it looks like it was added a long time ago in wasmtime.

afinch7

comment created time in 11 days

push eventafinch7/wasi-common

andy finch

commit sha 3001a8b0784b6ecd87f1a3dff73f7b720524f73b

updated .gitignore to be compatible with cargo defaults

view details

push time in 11 days

push eventafinch7/wasi-common

afinch7

commit sha 2c681f31301fe645caeaa8f5d6a0716e5ac43b34

add .gitignore

view details

push time in 11 days

PR opened CraneStation/wasi-common

add .gitignore
+3 -0

0 comment

1 changed file

pr created time in 11 days

create barnchafinch7/wasi-common

branch : gitignore

created branch time in 11 days

fork afinch7/wasmtime

Standalone JIT-style runtime for WebAsssembly, using Cranelift

fork in 12 days

Pull request review commentdenoland/deno

fix: support relative path for whitelisting

 pub fn parse_flags(matches: ArgMatches) -> DenoFlags {     if run_matches.is_present("allow-read") {       if run_matches.value_of("allow-read").is_some() {         let read_wl = run_matches.values_of("allow-read").unwrap();-        flags.read_whitelist =+        let raw_read_whitelist: Vec<String> =           read_wl.map(std::string::ToString::to_string).collect();+        flags.read_whitelist = resolve_paths(raw_read_whitelist);+        debug!("read whitelist: {:#?}", &flags.read_whitelist);

👍 Nice to have some debug prints for this.

kevinkassimo

comment created time in 12 days

Pull request review commentdenoland/deno

[WIP] fix: whitelist symlink permission check

 def test(self):                       self.test_outside_test_and_js_dir, test_type)             wrap_test(test_name_base + "_inside_tests_and_js_dir",                       self.test_inside_test_and_js_dir, test_type)+            wrap_test(test_name_base + "_relative", self.test_relative,+                      test_type)+            wrap_test(test_name_base + "_no_prefix", self.test_no_prefix,+                      test_type)+            if os.name != "nt":

Not sure if this is needed, since this test isn't run on windows anyways. https://github.com/denoland/deno/blob/2edee3367dc9003b721cf87ca57e820c7acf7b25/tools/test.py#L105-L111

kevinkassimo

comment created time in 12 days

Pull request review commentdenoland/deno

[WIP] fix: whitelist symlink permission check

 impl ThreadSafeState {   }    #[inline]-  pub fn check_read(&self, filename: &str) -> DenoResult<()> {-    self.permissions.check_read(filename)+  pub fn check_read(+    &self,+    filename: &str,+    check_symlink: bool,

This could use a unit test.

kevinkassimo

comment created time in 12 days

push eventafinch7/deno

afinch7

commit sha 49cc718e3645b7863526b68fdbbc8ef42428b65e

add method check_net_url

view details

push time in 12 days

Pull request review commentdenoland/deno

Permissions whitelist

 impl DenoPermissions {   pub fn check_read(&self, filename: &str) -> DenoResult<()> {     match self.allow_read.get_state() {       PermissionAccessorState::Allow => Ok(()),-      PermissionAccessorState::Ask => match self-        .try_permissions_prompt(&format!("read access to \"{}\"", filename))-      {-        Err(e) => Err(e),-        Ok(v) => {-          self.allow_read.update_with_prompt_result(&v);-          v.check()?;+      state => {+        if check_path_white_list(filename, &self.read_whitelist) {           Ok(())+        } else {+          match state {+            PermissionAccessorState::Ask => match self.try_permissions_prompt(+              &format!("read access to \"{}\"", filename),+            ) {+              Err(e) => Err(e),+              Ok(v) => {+                self.allow_read.update_with_prompt_result(&v);+                v.check()?;+                Ok(())+              }+            },+            PermissionAccessorState::Deny => Err(permission_denied()),+            _ => unreachable!(),+          }         }-      },-      PermissionAccessorState::Deny => Err(permission_denied()),+      }     }   }    pub fn check_write(&self, filename: &str) -> DenoResult<()> {     match self.allow_write.get_state() {       PermissionAccessorState::Allow => Ok(()),-      PermissionAccessorState::Ask => match self-        .try_permissions_prompt(&format!("write access to \"{}\"", filename))-      {-        Err(e) => Err(e),-        Ok(v) => {-          self.allow_write.update_with_prompt_result(&v);-          v.check()?;+      state => {+        if check_path_white_list(filename, &self.write_whitelist) {           Ok(())+        } else {+          match state {+            PermissionAccessorState::Ask => match self.try_permissions_prompt(+              &format!("write access to \"{}\"", filename),+            ) {+              Err(e) => Err(e),+              Ok(v) => {+                self.allow_write.update_with_prompt_result(&v);+                v.check()?;+                Ok(())+              }+            },+            PermissionAccessorState::Deny => Err(permission_denied()),+            _ => unreachable!(),+          }         }-      },-      PermissionAccessorState::Deny => Err(permission_denied()),+      }     }   } -  pub fn check_net(&self, domain_name: &str) -> DenoResult<()> {+  pub fn check_net(&self, url_or_host_and_port: &str) -> DenoResult<()> {

URLs and host and port strings(like localhost:4545 or localhost) are both valid.

afinch7

comment created time in 12 days

push eventafinch7/deno

afinch7

commit sha d4180971c33e65166bdd5976c73be1bf2ce503bb

simplified path resolution code for ops a little more

view details

push time in 12 days

push eventafinch7/deno

afinch7

commit sha 39fd1b0cbcd01629ee800da073dfb333c452cbd8

simplified path resolution code for ops a little more

view details

push time in 12 days

push eventafinch7/deno

afinch7

commit sha 02dd3be90bfd69cddcec0b2554221f1d4c0a76d8

fixed clippy warnings

view details

push time in 12 days

push eventafinch7/deno

afinch7

commit sha 9ce9c2f15dd0a9281fde1af031550c9fbecde3df

requested changes and added command line tests

view details

push time in 12 days

issue commentdenoland/deno

Proposal: smarter TS compiled file management

I think a cleanup sub command would also be a welcome addition.

kevinkassimo

comment created time in 13 days

Pull request review commentdenoland/deno

Permissions whitelist

 function assertSameContent(files: FileInfo[]): void {     }      if (file.name === "002_hello.ts") {-      assertEquals(file.path, `tests/${file.name}`);+      if (isWin) {+        assert(file.path.endsWith(`tests\\${file.name}`));+      } else {+        assert(file.path.endsWith(`tests/${file.name}`));

Had to make some changes to file path parsing, so I could pass the same full absolute path to permissions checks. It turns out that there isn't a standard way to parse paths other canonicalize(), but that requires that the path exists and replaces symbolic links with their destination(making it impossible to stat a symbolic link directly).

afinch7

comment created time in 13 days

Pull request review commentdenoland/deno

Permissions whitelist

 impl DenoPermissions {   pub fn check_read(&self, filename: &str) -> DenoResult<()> {     match self.allow_read.get_state() {       PermissionAccessorState::Allow => Ok(()),-      PermissionAccessorState::Ask => match self-        .try_permissions_prompt(&format!("read access to \"{}\"", filename))-      {-        Err(e) => Err(e),-        Ok(v) => {-          self.allow_read.update_with_prompt_result(&v);-          v.check()?;+      state => {+        if check_path_white_list(filename, &self.read_whitelist) {           Ok(())+        } else {+          match state {+            // This shouldn't be possible but I guess rust doesn't realize.+            PermissionAccessorState::Allow => unreachable!(),+            PermissionAccessorState::Ask => match self.try_permissions_prompt(+              &format!("read access to \"{}\"", filename),+            ) {+              Err(e) => Err(e),+              Ok(v) => {+                self.allow_read.update_with_prompt_result(&v);+                v.check()?;+                Ok(())+              }+            },+            PermissionAccessorState::Deny => Err(permission_denied()),+          }         }-      },-      PermissionAccessorState::Deny => Err(permission_denied()),+      }     }   }    pub fn check_write(&self, filename: &str) -> DenoResult<()> {     match self.allow_write.get_state() {       PermissionAccessorState::Allow => Ok(()),-      PermissionAccessorState::Ask => match self-        .try_permissions_prompt(&format!("write access to \"{}\"", filename))-      {-        Err(e) => Err(e),-        Ok(v) => {-          self.allow_write.update_with_prompt_result(&v);-          v.check()?;+      state => {+        if check_path_white_list(filename, &self.write_whitelist) {           Ok(())+        } else {+          match state {+            // This shouldn't be possible but I guess rust doesn't realize.+            PermissionAccessorState::Allow => unreachable!(),+            PermissionAccessorState::Ask => match self.try_permissions_prompt(+              &format!("write access to \"{}\"", filename),+            ) {+              Err(e) => Err(e),+              Ok(v) => {+                self.allow_write.update_with_prompt_result(&v);+                v.check()?;+                Ok(())+              }+            },+            PermissionAccessorState::Deny => Err(permission_denied()),+          }         }-      },-      PermissionAccessorState::Deny => Err(permission_denied()),+      }     }   } -  pub fn check_net(&self, domain_name: &str) -> DenoResult<()> {+  pub fn check_net(&self, url_str: &str) -> DenoResult<()> {

I'm going to refactor this to origin(host/domain + optional port) for now. I still think we may want to move to full urls at some point for more parsing consistency, but I'll save that for another PR. For dial() it wouldn't be that hard to just add the protocol on for a full url I.E. tcp://localhost:1234.

afinch7

comment created time in 13 days

Pull request review commentdenoland/deno

Permissions whitelist

 impl DenoPermissions {   pub fn check_read(&self, filename: &str) -> DenoResult<()> {     match self.allow_read.get_state() {       PermissionAccessorState::Allow => Ok(()),-      PermissionAccessorState::Ask => match self-        .try_permissions_prompt(&format!("read access to \"{}\"", filename))-      {-        Err(e) => Err(e),-        Ok(v) => {-          self.allow_read.update_with_prompt_result(&v);-          v.check()?;+      state => {+        if check_path_white_list(filename, &self.read_whitelist) {           Ok(())+        } else {+          match state {+            // This shouldn't be possible but I guess rust doesn't realize.

Should I remove the type as well, and just replace with a _ => unreachable!()?

afinch7

comment created time in 13 days

push eventafinch7/deno

andy finch

commit sha bbc45344e1582c839f4e280f1d77b6b7fba7bd06

not sure why this didn't error on windows

view details

push time in 13 days

push eventafinch7/deno

afinch7

commit sha 734c0f2211b6c2f3f9167c1ef21abe5ed945a10e

consistent path resolution for all ops

view details

push time in 13 days

pull request commentdenoland/deno

Permissions whitelist

Got everything figured out. I had to make quite a few breaking changes to the way that file paths are resolved for file operations.

afinch7

comment created time in 13 days

push eventafinch7/deno

afinch7

commit sha b133fb462a942a360df19d001cc515d488c774e0

fixed windows unit test issues.

view details

push time in 13 days

issue commentdenoland/deno

Add support for 32-bit ARM processors

I would like to get builds for arm32+arm64 into the wild, but we had quite a few issues with testing last time.

jkdmyrs

comment created time in 14 days

push eventafinch7/deno

afinch7

commit sha a9ccef2877b4fc426b6dce25d4c52846a44f78fd

fixed clippy errors and warnings

view details

push time in 16 days

push eventafinch7/deno

afinch7

commit sha 209a875ae50cc9bd3bbc423b4f37543433ffd2e7

fmt

view details

push time in 16 days

push eventafinch7/deno

Bert Belder

commit sha 899951742100b83743ef9f65fbb161454ef4bfa7

core,cli: fix clippy warnings

view details

Bert Belder

commit sha cfff8a9c1bcf7406b5c597280cdfa34fcc68115e

ci: run clippy

view details

Ryan Dahl

commit sha 00ac871607a7aeff1f6ac90f10090f07be9ccf73

Optimize read and write ops (#2259)

view details

Kurt Mackey

commit sha 4d4dcafb96bdffa3050e863df0ef4ddd158ebf16

fixes body formData tests disabled in #2268 (#2274)

view details

Bartek Iwańczuk

commit sha bf9b0c8231d59bfcc79e55b6cde861b68975d5b4

Fix: deno --v8-options does not print v8 options (#2277)

view details

Bartek Iwańczuk

commit sha 459162fc6eeca5560e3b6a99fcd96d3246f8f4f3

add --no-fetch CLI flag to prevent remote downloads (#2213)

view details

Bert Belder

commit sha da428b52a1117dc260d52a752d01fafe9f0f165b

Bump required rustc version to 1.34.1

view details

Bert Belder

commit sha 52830414daa40b19ed8e06182bb2ea68cfd316af

ci: make the sanitize build fast again (#2280) sccache doesn't work for cache debug builds at the moment, because it doesn't support the `-Xclang -fdebug-compilation-dir` flag that has been added by the most recent V8 upgrade. This patch should make the asan/lsan job on Travis CI fast again.

view details

Kevin (Kun) "Kassimo" Qian

commit sha 6929aba71d5004f9d2ff1d6c2e6817b6dfb22c89

fix: display "-0" for -0 (#2281) Added special handling code in js/console.ts

view details

Ryan Dahl

commit sha 4648277fb4aa0f7258a316b8828a1175e3e2d132

Minor doc edits (#2231)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 401a5c021141d4ba5a71078b28f6daefcd1826a6

feat: support .mjs extension resolution (#2283) Removed `extmap` and added .mjs entry in `map_file_extension`. The assert in the compiler does not need to be updated, since it is resolving from the compiled cache instead of elsewhere (notice the .map is asserted next to it)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 36081171323e266760db8bed2f31a6e3be7d8839

feat(cli cmd): deno xeval (#2260)

view details

Bartek Iwańczuk

commit sha f6a9d7d7172df6422f895dcfe6f4267ad1b472da

add "deno run" subcommand (#2215)

view details

Ryan Dahl

commit sha 3b1e2f1ad42cfebb6f2568e54c82c5ac3c8fe3d4

v0.3.11

view details

Bartek Iwańczuk

commit sha 5824e55efa8312d6ce5f66741c7fb465c5d924e6

fix: deno version panic (#2286)

view details

Ryan Dahl

commit sha 2aae09c2b869bf5d0bc5fd269464e8ac504528ea

v0.4.0

view details

Vincent LE GOFF

commit sha 4861bb8aadf962bc9fe5093a13c3e08b77adeffd

add warning for adblockers (#2250)

view details

Bartek Iwańczuk

commit sha 482834ba1f9b33d12aab39e62d9e85b1ba2d63fb

update manual.md for deno v0.4.0 (#2291)

view details

afinch7

commit sha dbe0c1821b765c86bc748839a2239dffd680f0f5

Merge remote-tracking branch 'upstream/master' into permissions_whitelist

view details

push time in 16 days

push eventafinch7/deno

afinch7

commit sha ea7aa178b6cdd233c22acfa3096c5ea26377cecf

added port checking for network whitelist.

view details

push time in 16 days

push eventafinch7/deno

afinch7

commit sha 7af6ea4d8736ed94bdc9f82938bdeaa61f8a7fc7

fmt

view details

push time in 18 days

Pull request review commentdenoland/deno

[WIP] Permissions whitelist

 pub fn parse_flags(matches: ArgMatches) -> DenoFlags {   if matches.is_present("allow-read") {     flags.allow_read = true;   }+  if let Some(read_wl) = matches.values_of("read-wl") {+    flags.read_whitelist = read_wl.map(|s| s.to_string()).collect();+  }   if matches.is_present("allow-write") {     flags.allow_write = true;   }+  if let Some(write_wl) = matches.values_of("write-wl") {+    flags.write_whitelist = write_wl.map(|s| s.to_string()).collect();+  }   if matches.is_present("allow-net") {     flags.allow_net = true;   }+  if let Some(net_wl) = matches.values_of("net-wl") {

Going to go with @hayd suggestion on this one and use --allow-x=.

afinch7

comment created time in 18 days

push eventafinch7/deno

afinch7

commit sha c9495e38d7b8cbfd8026acde6f62dcf3315aadbe

fmt

view details

push time in 18 days

push eventafinch7/deno

Ryan Dahl

commit sha f77b112797ffd686958928818a1b6acfdda197fe

Remove dead code js/compiler_test.ts (#2160)

view details

Tomislav Fabeta

commit sha 6cded14bdf313762956d4d5361cfe8115628b535

Issue/2170 (#2175) * Consistency using requiredArguments method Replaced tuple length check in Headers class with requiredArguments method. * Consistency using requiredArguments method Replaced tuple length check in UrlSearchParams class with requiredArguments method. * fmt

view details

Ryan Dahl

commit sha 9dfebbc9496138efbeedc431068f41662c780f3e

Fix eslint warnings (#2151) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>

view details

Kevin (Kun) "Kassimo" Qian

commit sha 1d4b92ac85d8c850270ca859f928404c72c0a49a

Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177)

view details

Tomislav Fabeta

commit sha d9408017541ffe6c86f4904973c22f829ade1ac4

Simplify logic in URLSearchParams, Buffer, Console (#2174)

view details

Yingbo (Max) Wang

commit sha da64fba046e4f324bff62d71ae74906fa6e3421f

symlink: Ignore type parameter on non-Windows platforms (#2185) Fixes #2169

view details

Bert Belder

commit sha 6caf8655070211d9771d349492c18d56c03b12b8

third_party: upgrade rust crates

view details

Ryan Dahl

commit sha 675919e915650cd1c88a1cdb4f67310133b8a05e

Use tokio_threadpool's new panic_handler (#2188)

view details

Ryan Dahl

commit sha d68b44b6b2fad6c321aa01a039030bb98c5be88d

core: make Isolate concrete, remove Dispatch trait (#2183) Op dispatch is now dynamically dispatched, so slightly less efficient. The immeasurable perf hit is a reasonable trade for the API simplicity that is gained here.

view details

Ryan Dahl

commit sha 6bece270b2719a66b564a411fc28c3b32ae0b105

Upgrade CI to Node v12 (#2193)

view details

Ryan Dahl

commit sha f6948235079b1d6050a2d3c98891844cb97595f5

Fix symlinkSyncNotImplemented (#2198)

view details

Ryan Dahl

commit sha 7fc9d7d62a864d1e6af0e77291a105726f73279c

core: Add test for snapshotting from Rust (#2197)

view details

迷渡

commit sha 8578ed4e7fcbddcbfb87368529f629ce1aebfebb

`URLSearchParams` deleting appended multiple (#2201)

view details

Ryan Dahl

commit sha e725b26b289fbe96b679039ba4203f10f7229ab9

v0.3.9

view details

David Stone

commit sha 098d6fffabb85d102b3662dacf3173c47e551d34

Fix anchor links and add spinner to the benchmarks page (#2205)

view details

Bartek Iwańczuk

commit sha b7d8a0c6f6e90a65243264faa3f702d1a9471090

Rename deno prefetch to deno fetch (#2210)

view details

Ryan Dahl

commit sha b426ecce80a968ae77cde9e242a9014bff371f79

compile lib.deno_runtime.d.ts into executable (#2209)

view details

Bartek Iwańczuk

commit sha aa85a4d2884e7600e0f64c457e20cd7f02b811c6

Rename CLI flags to subcommands (#2212)

view details

Ryan Dahl

commit sha 40d8ef1ec9f5e50017c41af8bf3b9f8454f97544

v0.3.10

view details

Greg Altman

commit sha 1d4b14e306f6d5c6ef8ce6b4ad9e6dfecca95a0d

core: add Deps::to_json() (#2223)

view details

push time in 18 days

push eventafinch7/deno

afinch7

commit sha 735c0b6320d8876b74b56220353610c8f4bfbcb9

simplified flags and added path resolution before permissions checks.

view details

push time in 18 days

push eventafinch7/deno

afinch7

commit sha a4bf99847b624e2f4a917058e5b9dcabd34a06b1

added net tests and parsing for urls

view details

push time in 19 days

push eventafinch7/deno

afinch7

commit sha ee36b234d46e2f61bd8eea07d7419e6825bcf8f1

fixed linter issue

view details

push time in 19 days

push eventafinch7/deno

afinch7

commit sha 2a10fc085adbd691a0f86c5ecf9a5572dc99334f

added net tests and parsing for urls

view details

push time in 19 days

push eventafinch7/deno

afinch7

commit sha 9f02f059aa4ee6579c573e05d8d738fca6c05284

added net tests and parsing for urls

view details

push time in 19 days

Pull request review commentdenoland/deno

Async iterator for listener

 testPerm({ net: true }, async function netDialListen(): Promise<void> {   conn.close(); }); +testPerm({ net: true }, async function netListenAsyncIterator() {+  const listener = Deno.listen("tcp", ":4500");+  const runAsyncIterator = async (): Promise<void> => {+    for (let conn of listener) {

yes thanks

afinch7

comment created time in 19 days

push eventafinch7/deno

andy finch

commit sha 9c40ba726c8916450f0786545ca5aec8f84e15b7

Update net_test.ts

view details

push time in 19 days

push eventafinch7/deno

andy finch

commit sha c72ee6194ba4b89e6fe179e70e4ba8b31c04b2b6

added unit test

view details

push time in 19 days

PR opened denoland/

Async iterator for listener

Closes #2256

+14 -1

0 comment

1 changed file

pr created time in 19 days

PR opened denoland/

Async iterator for listener

Closes #2256

+14 -1

0 comment

1 changed file

pr created time in 19 days

create barnchafinch7/deno

branch : listen_async_iterator

created branch time in 19 days

PR opened denoland/deno

Make error in ast_util more informative.
+1 -1

0 comment

1 changed file

pr created time in 20 days

push eventafinch7/deno

andy finch

commit sha 89b48439439ddc1cc5b720f08916f55ec2641036

Make error in ast_util more informative.

view details

push time in 20 days

push eventafinch7/deno

afinch7

commit sha 7a6dc701ae254d185cfbe07799c53548cafed7f3

unit test and fixed some bugs

view details

push time in 20 days

push eventafinch7/deno

afinch7

commit sha bf63ae648b9a9c6cc88aaf98bfd4b0ff7358052e

moved path checking logic to function and refactored the path matching algorithim

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha df18869b734070789abf5ae2ee1b9b4d0c5c81ff

moved path checking logic to function and refactored the path matching algorithim

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha c638e668ce04232c7c22b55ffdf52a576e78bedd

moved path checking logic to function and refactored the path matching algorithim

view details

push time in a month

Pull request review commentdenoland/deno

[WIP] Add support for loading tsconfig.json

 interface CompilerLookup { interface Os {   fetchModuleMetaData: typeof os.fetchModuleMetaData;   exit: typeof os.exit;+  noColor: typeof os.noColor; }  /** Abstraction of the APIs required from the `typescript` module so they can  * be easily mocked.  */ interface Ts {+  convertCompilerOptionsFromJson: typeof ts.convertCompilerOptionsFromJson;   createLanguageService: typeof ts.createLanguageService;   formatDiagnosticsWithColorAndContext: typeof ts.formatDiagnosticsWithColorAndContext;   formatDiagnostics: typeof ts.formatDiagnostics;+  parseConfigFileTextToJson: typeof ts.parseConfigFileTextToJson; } +/** Options that either do nothing in Deno, or would cause undesired behavior+ * if modified. */+const ignoredCompilerOptions: ReadonlyArray<string> = [

It might be better to use a white list here, so any new compiler options are ignored by default.

kitsonk

comment created time in a month

Pull request review commentdenoland/deno

[WIP] Add support for loading tsconfig.json

 pub struct State {   pub argv: Vec<String>,   pub permissions: DenoPermissions,   pub flags: flags::DenoFlags,+  pub config: Option<Vec<u8>>,+  pub config_file_name: Option<String>,

Is there any reason not to combine these two in a tuple I.E. pub config_file: Option<(String, Vec<u8>)>?

kitsonk

comment created time in a month

push eventafinch7/deno

Dmitry Sharshakov

commit sha 0c463582206881b6461742633a67f51632db614e

Add max memory benchmark (#2061)

view details

Ryan Dahl

commit sha 1bfb44336914a775cd01120165517394d30aec23

Implement async module loading in CLI (#2084)

view details

Bert Belder

commit sha 2719631038918577c66db2558bbba457c8f4cfd9

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha dd595220abed9e4f9dd88e14110eb67f4f5e77be

core: run isolate tests within a task This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.

view details

Bert Belder

commit sha 7807afa97274d3b0645d70475fecb37f5dc8ba14

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

Ryan Dahl

commit sha 79a974229ad533bc8880a5ce067b4310002c9572

Move deno_core_http_bench into examples dir (#2127)

view details

Bert Belder

commit sha 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000

Add cli dependency on tokio-rustls

view details

Bert Belder

commit sha 8477daa8b970ae8ef042a5242aee705003b63fc1

Fix clippy warnings

view details

Ryan Dahl

commit sha f20b05af24a5e1308e240f2c9af0fa75eefb131f

benchmarks: fix max_memory and clean up (#2137)

view details

Ryan Dahl

commit sha 1a69df4a051b9407ab341a82d65d4355f77ad16b

Fix flaky tests (#2139)

view details

Ryan Dahl

commit sha f03280ead1bec16b2c0c33fb980e2db7f58a5933

benchmarks: improve syscall and thread count (#2140)

view details

Kevin (Kun) "Kassimo" Qian

commit sha afabb3f833c80af380432193881769b8a6c1c88d

Fix redirects under async load (#2133)

view details

Yoshiya Hinosawa

commit sha 2be7e4440339f616a37b9535cc38936f80efc0e1

chore: update eslint plugin (#2146)

view details

迷渡

commit sha d0cd7a39a2d05343c5501dc286bb59096659654f

avoid prototype builtin hasOwnProperty (#2144)

view details

Ryan Dahl

commit sha e026320c73fa419b852f00e79e0c602c622d92c3

Improve test slow_never_ready_modules (#2145)

view details

Ryan Dahl

commit sha 5e5c8553e70cfd092cb5ce8a1c77a29fbba770bf

core: test Modules::deps and handle error cases better (#2141)

view details

Ryan Dahl

commit sha 0796a8f2f75005df95ef6115a4bdf6dd66e58dc3

v0.3.8

view details

Kevin (Kun) "Kassimo" Qian

commit sha c8db224efed08d7722c9951cde048d731db050d3

Make Deno/Deno.core not deletable/writable (#2153)

view details

Maxim Mazurok

commit sha 8dc8f227603831513b2d4afc62261908665e6a2f

Exclude .png files from git auto-EOL (#2161) Fix #1995 for users with the old git version

view details

Jonathon Orsi

commit sha 648d2f3ba8e4677ce2e9440e05a165927e982f05

fix typo in permissions explanation (#2162)

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 20d8e10d944c999f1b4ca583e46fb72704884bd4

subpath matching for read/write

view details

push time in a month

issue commentdenoland/deno

Deno hangs in Ubuntu

I would say it's an issue in my changes to the compile process, but I doesn't look like we even get to compile. Hence the lack of ">>>>> compile_sync START". We do get found local source, so we must get stuck right after get_source_code_aync completes. Anything here that looks problematic: https://github.com/denoland/deno/blob/97f0fe7437ad4277afbdabf6cac214a40b637cd1/cli/deno_dir.rs#L166-L223

pietvanzoen

comment created time in a month

PR opened denoland/deno

permissions whitelist

Figured I would get the ball rolling on #2128 still needs tests and some pattern matching.

+109 -31

0 comment

2 changed files

pr created time in a month

create barnchafinch7/deno

branch : permissions_whitelist

created branch time in a month

issue commentdenoland/deno

Deno hangs in Ubuntu

@jeromegn do you remember how you resolved this? Also hang is somewhere in this async https://github.com/denoland/deno/blob/97f0fe7437ad4277afbdabf6cac214a40b637cd1/cli/worker.rs#L215

pietvanzoen

comment created time in a month

issue commentdenoland/deno

Replace flatbuffers

I think the zero-copy parameter solves the problem of variable length. The read operation currently looks like this:

function read(
  rid: number,
  zeroCopy: Uint8Array
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset, Uint8Array] {
  const builder = flatbuffers.createBuilder();
  const inner = msg.Read.createRead(builder, rid);
  return [builder, msg.Any.Read, inner, p];
}

export async function read(rid: number, zeroCopy: Uint8Array): Promise<ReadResult> {
  // dispatch.sendAsync sends our serialized flatbuffers int8Array with a "zeroCopy" handle
  // to c++ v8 bindings that then pass it along to rust land via ffi. zeroCopy is used as a fixed
  // length buffer in this case the length being the number of bytes you want to read from a file. 
  // We never have to copy "zeroCopy" we can just write directly to it from the other side hence the
  // name "zeroCopy".
  return resRead(await dispatch.sendAsync(...reqRead(rid, p)));
}

We don't perform any serialization on the zero copy parameter, so It can be any length it needs.

ry

comment created time in a month

pull request commentdenoland/deno

better wait for removed_from_resource_table_on_close test

no

afinch7

comment created time in a month

PR opened denoland/deno

better wait for removed_from_resource_table_on_close test
+7 -8

0 comment

1 changed file

pr created time in a month

push eventafinch7/deno

andy finch

commit sha c86a1b680c2f91403614d35bd02999cc24322f1a

better wait for removed_from_resource_table_on_close test

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 3eeb58bbee787b07530e55fd5771d7f62a0189b7

requested changes

view details

push time in a month

push eventafinch7/deno

afinch7

commit sha 0bd43841ceff602f36b466feea23b7a9ea822344

requested changes

view details

push time in a month

Pull request review commentdenoland/deno

dispatch selector

 pub fn dispatch_all(   (base.sync(), boxed_op) } +pub fn op_selector_compiler(inner_type: msg::Any) -> Option<OpCreator> {+  match inner_type {+    msg::Any::FetchModuleMetaData => Some(op_fetch_module_meta_data),+    _ => op_selector_std(inner_type),

also start

afinch7

comment created time in a month

Pull request review commentdenoland/deno

dispatch selector

 pub fn dispatch_all(   (base.sync(), boxed_op) } +pub fn op_selector_compiler(inner_type: msg::Any) -> Option<OpCreator> {+  match inner_type {+    msg::Any::FetchModuleMetaData => Some(op_fetch_module_meta_data),+    _ => op_selector_std(inner_type),

We also need WorkerGetMessage and WorkerPostMessage

afinch7

comment created time in a month

PR opened denoland/deno

dispatch selector
+25 -10

0 comment

5 changed files

pr created time in a month

create barnchafinch7/deno

branch : dispatch_selector

created branch time in a month

push eventafinch7/deno

afinch7

commit sha 3371ec43048fcd28d3fb1a3ad571105c781c37c5

updated benchmark description

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha a58b84d67cdb94d677bf18102c5328242183a64a

updated benchmark description

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 983d189e9686807ac2d9ddb98a54beac50f7b81e

updated benchmark description

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 4f576583d8124ccdc3e4d814aa64b7df27501552

fmt

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 4de813cda60a2d39f31b1467d41ccf600442d981

summary comments

view details

push time in 2 months

Pull request review commentdenoland/deno

worker benchmarks

+const data = "HTTP/1.1 200 OK\r\nContent-Length: 12\r\n\r\nHello World\n";+const workerCount = 4;+const cmdsPerWorker = 400;++export interface ResolvableMethods<T> {+  resolve: (value?: T | PromiseLike<T>) => void;+  // eslint-disable-next-line @typescript-eslint/no-explicit-any+  reject: (reason?: any) => void;+}++export type Resolvable<T> = Promise<T> & ResolvableMethods<T>;

It only exists within //js/util.ts. Maybe std needs some tools for implementing async messaging channels like this.

afinch7

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha 6167787058406e205a7c0d2c0c2ca0f562d595f9

wait for all workers to be started

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha e72ff9f7f6c738ef804a569a957e046422c5173f

even more benchmark

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 1482b4c6ede2c9e56579261e8544132a0b9dd7ce

more workers and messages for benchmarks

view details

push time in 2 months

push eventafinch7/deno

andy finch

commit sha 862636f06b44f8ed5d7a4bcc07414b4a76a0b01c

forgot to uncomment this

view details

push time in 2 months

PR opened denoland/deno

worker benchmarks
+127 -2

0 comment

5 changed files

pr created time in 2 months

create barnchafinch7/deno

branch : worker_benchmarks

created branch time in 2 months

push eventafinch7/deno

afinch7

commit sha fd62c61d91350a9259042d786af48b21a087a575

simplified compile_async return logic

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 941d2bb2e265764b61f3de7af4de573e9b17772d

simplified compile_async return logic

view details

push time in 2 months

Pull request review commentdenoland/deno

compile_async

 pub fn compile_sync(   let union =     futures::future::select_all(vec![worker_receiver, local_receiver.shared()]); -  match union.wait() {-    Ok((result, i, rest)) => {-      // We got a sucessful finish before any recivers where canceled-      let mut rest_mut = rest;-      match ((*result.deref()).clone(), i) {-        // Either receiver was completed with success.-        (Ok(v), _) => Ok(v),-        // Either receiver was completed with a valid error-        // this should be fatal for now since it is not intended-        // to be possible to recover from a uncaught error in a isolate-        (Err(Some(err)), _) => Err(err),-        // local_receiver finished first with a none error. This is intended-        // to catch when the local logic can't complete because it is unable-        // to send and/or receive messages from the compiler worker.-        // Due to the way that scheduling works it is very likely that the-        // compiler worker future has already or will in the near future-        // complete with a valid JSError or a None.-        (Err(None), 1) => {-          debug!("Compiler local exited with None error!");-          // While technically possible to get stuck here indefinately-          // in theory it is highly unlikely.-          debug!(-            "Waiting on compiler worker result specifier: {} referrer: {}!",-            specifier, referrer-          );-          let worker_result =-            (*rest_mut.remove(0).wait().unwrap().deref()).clone();-          debug!(-            "Finished waiting on worker result specifier: {} referrer: {}!",-            specifier, referrer-          );-          match worker_result {-            Err(Some(err)) => Err(err),-            Err(None) => panic!("Compiler exit for an unknown reason!"),-            Ok(v) => Ok(v),+  let specifier_ = specifier.to_string().clone();+  let referrer_ = specifier.to_string().clone();++  union.then(move |result| {+    match result {+      Ok((result, i, rest)) => {+        // We got a sucessful finish before any recivers where canceled+        let mut rest_mut = rest;+        match ((*result.deref()).clone(), i) {+          // Either receiver was completed with success.+          (Ok(v), _) => Either::A(futures::future::result(Ok(v))),+          // Either receiver was completed with a valid error+          // this should be fatal for now since it is not intended+          // to be possible to recover from a uncaught error in a isolate+          (Err(Some(err)), _) => Either::A(futures::future::result(Err(err))),+          // local_receiver finished first with a none error. This is intended+          // to catch when the local logic can't complete because it is unable+          // to send and/or receive messages from the compiler worker.+          // Due to the way that scheduling works it is very likely that the+          // compiler worker future has already or will in the near future+          // complete with a valid JSError or a None.

After having a moment to think about this one, I realized the compiler worker shouldn't have any reason to exit anymore in normal execution. The new logic here should be a lot easier to wrap your head around.

afinch7

comment created time in 2 months

push eventafinch7/deno

afinch7

commit sha 4471768d7ed1e9a73a30c08ad13d8fc27042544e

simplified compile_async return logic

view details

push time in 2 months

push eventafinch7/deno

afinch7

commit sha 8e1c2d2ad55b6d3392c8f31afc8f3ce66ee43517

true asyncs for return in compile_sync

view details

push time in 2 months

PR opened denoland/deno

compile_async
+115 -86

0 comment

2 changed files

pr created time in 2 months

create barnchafinch7/deno

branch : compile_async

created branch time in 2 months

push eventafinch7/deno

afinch7

commit sha e5074c1a7fbcd837d69736afe1f54864dd84f5a2

improved some comments and moved parsing for cmd id into it's own function

view details

push time in 2 months

more