profile
viewpoint

pull request commentdenoland/deno

fix: ModuleSpecifier resolution algo from cwd

There are a handful more "path formats" that exist on windows, some of which we maybe shouldn't ever try to support. But I think it would be good to explicitly reject them when the user passes them in.

  • d:foo\bar.txt = drive-relative path that we probably should never support.
  • \\server\share or //server/share = UNC local network path
  • \\.\c:\foo\bar.txt or //./c:/foo/bar.txt = Local device path
  • \\?\c:\foo\bar or \??\something\something = NT object tree path
bartlomieju

comment created time in 3 hours

Pull request review commentdenoland/deno

fix: ModuleSpecifier resolution algo from cwd

 impl PartialEq<String> for ModuleSpecifier {     &self.to_string() == other   } }++#[cfg(test)]+mod tests {+  use super::*;++  #[test]+  fn test_resolve_from_cwd() {+    if cfg!(target_os = "windows") {+      let expected_url = "file:///C:/deno/tests/006_url_imports.ts";++      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        expected_url,+      );+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:\deno\tests\006_url_imports.ts")+          .unwrap()+          .to_string(),+        expected_url,+      );+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        expected_url+      );+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"\tests\006_url_imports.ts")

This of course only works if the cwd is somewhere on the C: drive when the tests are run. For me this isn't the case, my deno working directory is on D:. So maybe chdir to c: before running this test?

bartlomieju

comment created time in 3 hours

create barnchpiscisaureus/deno

branch : anyerrtest

created branch time in 18 hours

push eventpiscisaureus/deno

Bert Belder

commit sha 6c2d0cb204591aa785850f6fa99c0444b2de922a

wip

view details

push time in 18 hours

push eventpiscisaureus/deno

Bert Belder

commit sha 2982a2ec9aa184fe9b104a613e09b193a6433d9f

wip

view details

push time in a day

push eventpiscisaureus/deno

Bert Belder

commit sha 91a976262c07a550f8328b1e056cb874f132c3d5

fix

view details

push time in a day

push eventpiscisaureus/deno

Bert Belder

commit sha ca97c80b6b56682f016802a2edfba263b30786c4

fix

view details

push time in a day

push eventpiscisaureus/deno

Bert Belder

commit sha f219838c8d7ec3c6c504c84298bca268d525542c

wip

view details

push time in a day

create barnchpiscisaureus/deno

branch : any-error

created branch time in a day

CommitCommentEvent

create barnchpiscisaureus/iocp-traits

branch : master

created branch time in 2 days

created repositorypiscisaureus/iocp-traits

created time in 2 days

issue commentFXTi/iocp-wrapper

[Concept] Encapsualtion

There are a number of things from the C version of wepoll that we won't need in our sock state. I believe we don't need tree_node since each socket value tracks its own state.

Agreed. (Even if we did allow for looking up mio state for a raw std::os::windows::raw::SOCKET, I think we should just use a HashMap for that). In similar vain, we won't need queue_node as the "update queue" can live in de VecDeque. Rust has all these advanced data structures built in, we might as well use them.

FXTi

comment created time in 2 days

Pull request review commentFXTi/iocp-wrapper

The first minimal test

 fn main() {     let r = afd_poll(afd_helper_handle, &mut poll_info, &mut overlapped);     println!("{:?}", r); -    //GetQueuedCompletionStatusEx+    let mut completion_count: DWORD = 0;+    let mut iocp_events: [OVERLAPPED_ENTRY; 256] = [OVERLAPPED_ENTRY::default(); 256];+    let r = unsafe {+        GetQueuedCompletionStatusEx(+            iocp,+            iocp_events.as_mut_ptr(),+            iocp_events.len() as ULONG,+            &mut completion_count as *mut _,+            INFINITE,+            FALSE,+        )+    };++    println!("Return value: {:?}", r);+    println!("completion_count: {:?}", completion_count);+    println!("iocp_events: ");+    for ele in iocp_events[0..completion_count as usize].iter() {+        println!("  Event: ");+        println!("    lpCompletionKey: {:?}", ele.lpCompletionKey);+        println!("    lpOverlapped: {:?}", ele.lpOverlapped);+        /* ignore it for now+        if NULL as _ != ele.lpOverlapped {+            println!("      *lpOverlapped: {:?}", *ele.lpOverlapped);+        }+        */+        println!("    Internal: {:?}", ele.Internal);+        println!(+            "    dwNumberOfBytesTransferred: {:?}",+            ele.dwNumberOfBytesTransferred+        );+    }++    //WSACleanup is used to terminate the use of the WS2_32 DLL.+    unsafe {+        WSACleanup();

This is only (minimally) relevant when building a shared library, not when building an executable. Also, nobody ever unloads winsock, just like nobody ever "unloads" libc. Don't waste your time with it.

FXTi

comment created time in 2 days

issue commentFXTi/iocp-wrapper

NtDeviceIoControlFile vs DeviceIoControl

@carllerche I think "deprecated" here means "we added a win32 wrapper, please use that from now on". NtDeviceIoControlFile isn't going away anytime soon (or ever). Use whatever is easier.

carllerche

comment created time in 2 days

CommitCommentEvent

create barnchpiscisaureus/deno

branch : v8bindings

created branch time in 2 days

create barnchpiscisaureus/deno

branch : v8gen3

created branch time in 2 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 4761bbe4427b458325a86d0bea8f8e32e706d2c3

build: refactor config infrastructure and test build setup * Configuration is now done with files, instead of through command line switches specified in CMakeLists.txt. * Link tests with a static library instead of compiling individual wepoll source files as part of the test executable. This should make the CI run significantly faster.

view details

push time in 2 days

create barnchpiscisaureus/wepoll

branch : try

created branch time in 2 days

Pull request review commentdenoland/deno

Loader refactor

 impl<L: Loader> RecursiveLoad<L> {      Ok(module_name)   }++  pub fn get_future(

Eventually this should go. I added it to make porting over the tests easier.

piscisaureus

comment created time in 11 days

push eventpiscisaureus/deno

Bartek Iwańczuk

commit sha 061f6dd4832320ff654ee2a7a07901852b702639

fix deno install (#2529)

view details

Ryan Dahl

commit sha 9142a7df46fd1335c9ee007edcc4e83eb589a794

Upgrade INSTALLER_URL to include fixes (#2532) denoland/deno_std#492

view details

Ryan Dahl

commit sha 7b06aa37342c021f9f1fac99125847d134e67001

v0.9.0

view details

Bert Belder

commit sha 01b98def096471101df8e32f0c974b9d397952f9

Dynamic import

view details

push time in 11 days

push eventpiscisaureus/deno

Bartek Iwańczuk

commit sha bca5cc5041172e22ad1851c8510d6521bf70ec22

Move ModuleSpecifier to //core (#2509)

view details

迷渡

commit sha 42d1024cd98811a4ce9eaaa73c84970d271628a6

forbidden to set `this` for setTimeout (#2511)

view details

Bartek Iwańczuk

commit sha fdd2eb538327ee3f50fe2869320411191830c985

expose window.Response (#2515)

view details

andy finch

commit sha dc60fe9f300043f191286ef804a365e16e455f87

Refactor dispatch handling (#2452) Promise id is now created in core and passed back to JS.

view details

迷渡

commit sha 52448f351d7b0882ac67e2974b93c1e730f5dbb3

feat: URLSearchParams should work with custom iterator (#2512)

view details

Bartek Iwańczuk

commit sha 3dff147d0ca1a2cd8d264d20a178d71cb38b1c4e

feat: add deno install command (#2522)

view details

Ryan Dahl

commit sha 1361e302234b17ab8079107b134dfd0ddf288439

Revert "Refactor dispatch handling (#2452)" Due to performance regression: https://github.com/denoland/deno/commit/dc60fe9f300043f191286ef804a365e16e455f87#commitcomment-33943711 This reverts commit dc60fe9f300043f191286ef804a365e16e455f87.

view details

Bert Belder

commit sha 77737707e4e07d7421d9a4f813d6dcd27ecf54fe

third_party: upgrade rust crates

view details

Bert Belder

commit sha 43fd625f05249a69021014c137c5f0bb6786267b

Dynamic import

view details

push time in 11 days

push eventdenoland/deno_third_party

Bert Belder

commit sha c29d758cd2ca6fd275f141239d59560157ac4535

Upgrade rust crates

view details

push time in 11 days

push eventdenoland/deno

Bert Belder

commit sha 77737707e4e07d7421d9a4f813d6dcd27ecf54fe

third_party: upgrade rust crates

view details

push time in 11 days

PR merged denoland/deno

third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+165 -153

0 comment

5 changed files

piscisaureus

pr closed time in 11 days

push eventpiscisaureus/deno

Bert Belder

commit sha 77737707e4e07d7421d9a4f813d6dcd27ecf54fe

third_party: upgrade rust crates

view details

push time in 11 days

PR opened denoland/deno

Reviewers
third_part: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+165 -153

0 comment

5 changed files

pr created time in 11 days

create barnchpiscisaureus/deno

branch : upgrade_crates

created branch time in 11 days

create barnchdenoland/deno_third_party

branch : 20190615_upgrade_crates

created branch time in 11 days

push eventpiscisaureus/deno

Bert Belder

commit sha 00cba7148d3493cea2018be2084e1a718531b96e

oops

view details

push time in 13 days

pull request commentdenoland/deno

Loader refactor

The core point of the fix is here: https://github.com/denoland/deno/pull/2516/files#diff-7170d073ffb6b76573055a7aaba20d7fR568

piscisaureus

comment created time in 13 days

PR opened denoland/deno

Loader refactor

My attempt at fixing #2510. The scope went a little overboard. cc @ry

+415 -253

0 comment

5 changed files

pr created time in 13 days

create barnchpiscisaureus/deno

branch : loader_refactor

created branch time in 13 days

push eventpiscisaureus/deno

Bert Belder

commit sha 561b3cd159b470c594581ce5ad08ac8fcee18395

work

view details

push time in 13 days

push eventpiscisaureus/deno

Bert Belder

commit sha 84360ff731e2183ab8c1e7589c16686e6e32085e

style: add clang-format configuration

view details

Bert Belder

commit sha f7397fb98e6a3772a92a7fdd6542841f86954dd3

build: make cmake setup actually work

view details

Bert Belder

commit sha 1fa7d28ee97a3970bb587b7ceb5fe79b66e54810

Add v8 submodule

view details

Bert Belder

commit sha 79f18fa8bc1a99f24e2ea9c39fe037f0995c9ccd

Begin implementation

view details

Bert Belder

commit sha 0faea02aceb34eb2874552d2b99dc300fbdd3d2e

Begin figuring out type info

view details

push time in 14 days

create barnchpiscisaureus/deno

branch : gen8

created branch time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 06dd355e33424c11acda92b449204eb8628cbd49

tools: use prettier to format javascript files

view details

Bert Belder

commit sha 017fa62aac683998eb80a71c87964a3c4a93ee3f

tools/combine: fold identical 'typedef struct' declarations

view details

Bert Belder

commit sha 7080d540e21ebd8d5df78fa6abd686c7e0c261f3

build: do not force-include wepoll.h using a command line switch

view details

Bert Belder

commit sha 027fb4a419991fa72c113a35824fafa2b10552ee

util,test: remove definition and usage of type 'ssize_t'

view details

Bert Belder

commit sha a627f365fd784c29df90172d255ec712a578e30a

src,test: clean up #include directives

view details

Bert Belder

commit sha d5f8f5f1b1be1a4ba8adb51eb4ee4de7a305a9c8

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

delete branch piscisaureus/wepoll

delete branch : try

delete time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 017fa62aac683998eb80a71c87964a3c4a93ee3f

tools/combine: fold identical 'typedef struct' declarations

view details

Bert Belder

commit sha 7080d540e21ebd8d5df78fa6abd686c7e0c261f3

build: do not force-include wepoll.h using a command line switch

view details

Bert Belder

commit sha 027fb4a419991fa72c113a35824fafa2b10552ee

util,test: remove definition and usage of type 'ssize_t'

view details

Bert Belder

commit sha a627f365fd784c29df90172d255ec712a578e30a

src,test: clean up #include directives

view details

Bert Belder

commit sha d5f8f5f1b1be1a4ba8adb51eb4ee4de7a305a9c8

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha f2755f5eb27f6b71ac971d7643cdfa7779e200af

tools/combine: fold identical 'typedef struct' declarations

view details

Bert Belder

commit sha 2e974212a4d507f063610445aa2e5a0fa9cc20db

build: do not force-include wepoll.h using a command line switch

view details

Bert Belder

commit sha 4f6adc2d7e80a3163cde9b470ccee6097c66bd77

util,test: remove definition and usage of type 'ssize_t'

view details

Bert Belder

commit sha 524410a7c5e8640061fb863f351c4c5df52a1b16

src,test: clean up #include directives

view details

Bert Belder

commit sha 2c92f9fa4b38eddf95636c4343b019310a2c314a

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 0d680ac43fe39a295de2ec6547bb38bdc4dc380d

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 8eacd482cb339a0f476b163aac71e0672236d17b

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 0abe2e05682fd92b2a13cccc0867f5076230a0d0

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 644e0727bcc8cef198faaed1b1422251afa1ad0b

afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha 06dd355e33424c11acda92b449204eb8628cbd49

tools: use prettier to format javascript files

view details

Bert Belder

commit sha 74fb25515bcefa6ac42346a3d881ee317764d3cd

tools/combine: merge equivalent 'typedef struct' declarations

view details

Bert Belder

commit sha 11c32aee9e7af94eb146fd5a6a62edaccb80d039

build: do not force-include wepoll.h using a command line switch

view details

Bert Belder

commit sha 8814b649a3db41b08c46eb4869896a3c2d887527

util,test: remove definition and usage of type 'ssize_t'

view details

Bert Belder

commit sha fee813a428033b6cd29b35af29d281dad50d1d8d

src,test: clean up #include directives

view details

Bert Belder

commit sha 196e8c9167f231bda7a73b430e8bf09310e1a6b1

wip: use IO_STATUS_BLOCK instead of OVERLAPPED to track async i/o This reduces per-socket memory usage, as the OVERLAPPED structure contains some fields that are never used.

view details

push time in 14 days

push eventpiscisaureus/wepoll

Bert Belder

commit sha ead5e2eb1b8f2ac2d77584c5b7104f7c06f4f03d

fix headers

view details

push time in 14 days

create barnchpiscisaureus/wepoll

branch : try

created branch time in 14 days

delete branch piscisaureus/deno

delete branch : revert_v8_fix

delete time in 15 days

push eventdenoland/deno

Bert Belder

commit sha 878d092df9cc89ad92e571e2422ffb1ed488dd0e

Revert "Work around Windows-only V8 concurrent initialization crash" This fix is no longer necessary as the underlying V8 bug has been fixed upstream. This reverts commit 48bcfce09e11901244447617be2eb7789427eab0.

view details

push time in 15 days

PR merged denoland/deno

Revert "Work around Windows-only V8 concurrent initialization crash"

This fix is no longer necessary as the underlying V8 bug has been fixed upstream.

This reverts commit 48bcfce09e11901244447617be2eb7789427eab0.

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+1 -18

0 comment

1 changed file

piscisaureus

pr closed time in 15 days

PR opened denoland/deno

Reviewers
Revert "Work around Windows-only V8 concurrent initialization crash"

This fix is no longer necessary as the underlying V8 bug has been fixed upstream.

This reverts commit 48bcfce09e11901244447617be2eb7789427eab0.

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+1 -18

0 comment

1 changed file

pr created time in 15 days

create barnchpiscisaureus/deno

branch : revert_v8_fix

created branch time in 15 days

Pull request review commentdenoland/deno

Move Modules to ThreadSafeState

 pub struct ThreadSafeState(Arc<State>);  #[cfg_attr(feature = "cargo-clippy", allow(stutter))] pub struct State {+  pub modules: Arc<Mutex<deno::Modules>>,

Agreed it's not very nice.

ry

comment created time in 15 days

Pull request review commentdenoland/deno

Surface dynamic import in core

 impl Isolate {     }   } +  extern "C" fn dyn_import(+    user_data: *mut c_void,+    specifier: *const c_char,+    referrer: *const c_char,+    id: deno_dyn_import_id,+  ) {+    assert_ne!(user_data, std::ptr::null_mut());+    let isolate = unsafe { Isolate::from_raw_ptr(user_data) };+    let specifier = unsafe { CStr::from_ptr(specifier).to_str().unwrap() };+    let referrer = unsafe { CStr::from_ptr(referrer).to_str().unwrap() };+    debug!("dyn_import specifier {} referrer {} ", specifier, referrer);++    if let Some(ref f) = isolate.config.dyn_import {+      let inner = f(specifier, referrer);+      let fut = DynImport { inner, id };+      isolate.pending_dyn_imports.push(fut);

That works.

ry

comment created time in 16 days

Pull request review commentdenoland/deno

Surface dynamic import in core

 impl Isolate {     }   } +  extern "C" fn dyn_import(+    user_data: *mut c_void,+    specifier: *const c_char,+    referrer: *const c_char,+    id: deno_dyn_import_id,+  ) {+    assert_ne!(user_data, std::ptr::null_mut());+    let isolate = unsafe { Isolate::from_raw_ptr(user_data) };+    let specifier = unsafe { CStr::from_ptr(specifier).to_str().unwrap() };+    let referrer = unsafe { CStr::from_ptr(referrer).to_str().unwrap() };+    debug!("dyn_import specifier {} referrer {} ", specifier, referrer);++    if let Some(ref f) = isolate.config.dyn_import {+      let inner = f(specifier, referrer);+      let fut = DynImport { inner, id };+      isolate.pending_dyn_imports.push(fut);

You need to poll the freshly created future, otherwise the task won't be woken up and you rely on the event look ticking coincidentally because of other ops. See the logic regarding have_unpolled_ops.

ry

comment created time in 16 days

push eventpiscisaureus/deno

Bert Belder

commit sha fb2531481a66fba8124bc65a7052c6975fbab815

clean up

view details

push time in 18 days

Pull request review commentdenoland/deno_std

upgrade: deno to v0.8.0

 export class Untar {       (key): void => {         const arr = trim(header[key]);         if (arr.byteLength > 0) {-          meta[key as keyof UntarOptions] = parseInt(decoder.decode(arr), 8);

The error you're trying to solve here is a bit misleading. The real problem is that UntarOptions has a property (fileName) which has type string. So typescript reasons that key might be a fileName, and refuses to assign an integer to a string-typed property

ry

comment created time in 18 days

Pull request review commentdenoland/deno

feat: Import maps

 fn fetch_module_meta_data_and_maybe_compile_async(   let state_ = state.clone();   let specifier = specifier.to_string();   let referrer = referrer.to_string();+  let is_root = referrer == ".";

I'm cool wit it.

bartlomieju

comment created time in 18 days

Pull request review commentdenoland/deno

feat: Import maps

 fn op_fetch_module_meta_data(   let use_cache = !state.flags.reload;   let no_fetch = state.flags.no_fetch; +  // TODO(bartlomieju): I feel this is wrong - specifier is only resolved if there's an

What does the spec say about modules that don't appear in the import map? Is there some default behavior to fall back to?

bartlomieju

comment created time in 18 days

Pull request review commentdenoland/deno

feat: Import maps

+use indexmap::IndexMap;+use serde_json::Map;+use serde_json::Value;+use std::cmp::Ordering;+use std::fs;+use url::Url;++#[derive(Debug)]+pub struct ImportMapError {+  pub msg: String,+}++impl ImportMapError {+  pub fn new(msg: &str) -> Self {+    ImportMapError {+      msg: msg.to_string(),+    }+  }+}++// NOTE: here is difference between deno and reference implementation - deno currently+//  can't resolve URL with other schemes (eg. data:, about:, blob:)+const SUPPORTED_FETCH_SCHEMES: [&str; 3] = ["http", "https", "file"];++type SpecifierMap = IndexMap<String, Vec<String>>;+type ScopesMap = IndexMap<String, SpecifierMap>;++#[derive(Debug)]+pub struct ImportMap {+  base_url: String,+  imports: SpecifierMap,+  scopes: ScopesMap,+}++impl ImportMap {+  pub fn load(base_url: &str, file_name: &str) -> Result<Self, ImportMapError> {+    let cwd = std::env::current_dir().unwrap();+    let resolved_path = cwd.join(file_name);+    debug!(+      "Attempt to load import map: {}",+      resolved_path.to_str().unwrap()+    );++    // Load the contents of import map+    match fs::read_to_string(&resolved_path) {+      Ok(json_string) => ImportMap::from_json(base_url, &json_string),+      _ => panic!(+        "Error retrieving import map file at \"{}\"",+        resolved_path.to_str().unwrap()+      ),+    }+  }++  pub fn from_json(

I wonder if it would be easier to use serde_derive to automatically generate a parser for this. Might be a lot less code and reduce risk of bugs.

bartlomieju

comment created time in 18 days

Pull request review commentdenoland/deno

feat: Import maps

 rust_proc_macro("serde_derive") { rust_rlib("serde_json") {   edition = "2015"   source_root = "$cargo_home/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.39/src/lib.rs"-  features = [ "default" ]+  features = [+    "default",+    "preserve_order",

Is this feature implicitly enabled by the indexmap crate? If we rely on it, shouldn't it be explicitly enabled in Cargo.toml?

bartlomieju

comment created time in 18 days

Pull request review commentdenoland/deno

WIP surface dynamic import in core

 v8::MaybeLocal<v8::Promise> HostImportModuleDynamicallyCallback(                              std::make_tuple(import_id),                              std::make_tuple(d->isolate_, resolver)); -  d->dyn_import_cb_(d->user_data_, *specifier_str, *referrer_name_str,-                    import_id);-  return resolver->GetPromise();+  printf("BEFORE dyn_import_cb_ %s \n", *specifier_str);+  {+    // deno::UserDataScope user_data_scope(d, d->user_data_);

Unnecessary?

ry

comment created time in 18 days

Pull request review commentdenoland/deno

WIP surface dynamic import in core

 pub enum StartupData<'a> {  type DispatchFn = Fn(&[u8], Option<PinnedBuf>) -> Op; +pub type DynImportFuture = Box<dyn Future<Item = deno_mod, Error = ()> + Send>;+type DynImportFn = Fn(&str, &str) -> DynImportFuture;++/// Wraps DynImportFuture to include the deno_dyn_import_id, so that it doesn't+/// need to be exposed.+struct DynImport {+  id: deno_dyn_import_id,+  inner: DynImportFuture,+}++impl Future for DynImport {+  type Item = (deno_dyn_import_id, deno_mod);+  type Error = ();+  fn poll(&mut self) -> Poll<Self::Item, ()> {

A little unfortunate that this is necessary, since this is just a complicated way of writing dyn_import_inner(...).map(|mod_id| (id, mod_id)).or_else(|_| Ok(id, 0)). I guess it's necessary to give the T in FuturesUnordered<T> a concrete type?

ry

comment created time in 18 days

Pull request review commentdenoland/deno

WIP surface dynamic import in core

 pub struct Isolate {   needs_init: bool,   shared: SharedQueue,   pending_ops: FuturesUnordered<OpAsyncFuture>,+  pending_dyn_imports: FuturesUnordered<DynImport>,

Yes! This is the right way to do it!

ry

comment created time in 18 days

push eventpiscisaureus/deno

Bert Belder

commit sha cc3a3db158502e16e8d36f4ba76200a821881c73

fixes

view details

push time in 19 days

Pull request review commentdenoland/deno

Loader improvements

 impl ThreadSafeState {   } } +fn fetch_module_meta_data_and_maybe_compile_async(+  state: &ThreadSafeState,+  specifier: &str,+  referrer: &str,+) -> impl Future<Item = ModuleMetaData, Error = DenoError> {+  let state_ = state.clone();+  let specifier = specifier.to_string();+  let referrer = referrer.to_string();++  let f =+    futures::future::result(ThreadSafeState::resolve(&specifier, &referrer));

This is ok, but here's a tip: Result has an IntoFuture impl so you can do ThreadSafeState::resolve(&specifier, &referrer).into_future().and_then(...).

ry

comment created time in 21 days

delete branch piscisaureus/deno_std

delete branch : bufio2

delete time in a month

push eventdenoland/deno_std

Bert Belder

commit sha 679b2030534c01b8938b34066b127119614eb2d5

io: make port BufReader.readByte() return `number | EOF`

view details

push time in a month

push eventpiscisaureus/deno_std

Bert Belder

commit sha 679b2030534c01b8938b34066b127119614eb2d5

io: make port BufReader.readByte() return `number | EOF`

view details

push time in a month

pull request commentdenoland/deno_std

io: make port BufReader.readByte() return `number | EOF`

Note that the readShort(), readInt() and readLong() APIs currently are incredibly inefficient. This patch doesn't change that.

piscisaureus

comment created time in a month

push eventpiscisaureus/deno_std

Bert Belder

commit sha 20a991e11f8292374eaab802864a3689a0845f34

io: make port BufReader.readByte() return `number | EOF`

view details

push time in a month

PR opened denoland/deno_std

Reviewers
io: make port BufReader.readByte() return `number | EOF`
+39 -26

0 comment

5 changed files

pr created time in a month

create barnchpiscisaureus/deno_std

branch : bufio2

created branch time in a month

pull request commentdenoland/deno_std

[Testing] Pretty output + Silent mode

I think this is generally a nice feature and it worked when I tested it, but I have two needs:

  • Is there a way I can run the tests with the console enabled, without hacking the test runner? Preferrably it would be easy to discover this feature, e.g. when I run deno run -A test.ts --help or something it should show up. I don't want to have to change the test runner when to debug tests.

  • Can you round down test times to 2 decimal places. Now it prints 3.2564999999995052ms. That's bonkers.

zekth

comment created time in a month

delete branch piscisaureus/deno

delete branch : upgrade_crates

delete time in a month

push eventdenoland/deno_third_party

Bert Belder

commit sha 7ad9fa3dac6d1bc64a242902f7d10357d3c97647

Upgrade rust crates

view details

push time in a month

push eventdenoland/deno

Bert Belder

commit sha 1540b36ce7a4740f4a87c564becca65ed8d97255

third_party: upgrade rust crates

view details

push time in a month

PR merged denoland/deno

third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+148 -82

0 comment

5 changed files

piscisaureus

pr closed time in a month

push eventpiscisaureus/deno

Christian Moritz

commit sha 15dadf812c95c3dd2b93b1ba41ef488baeeac0c1

tools/third_party: add DENO_GN_PATH and DENO_NINJA_PATH env vars

view details

Christian Moritz

commit sha 0e780e894854cada1244aa3f465c226593187edc

tools/setup: don't download sccache if --no-binary-download is passed

view details

Bert Belder

commit sha 1540b36ce7a4740f4a87c564becca65ed8d97255

third_party: upgrade rust crates

view details

push time in a month

push eventpiscisaureus/deno

Christian Moritz

commit sha 15dadf812c95c3dd2b93b1ba41ef488baeeac0c1

tools/third_party: add DENO_GN_PATH and DENO_NINJA_PATH env vars

view details

Christian Moritz

commit sha 0e780e894854cada1244aa3f465c226593187edc

tools/setup: don't download sccache if --no-binary-download is passed

view details

Bert Belder

commit sha 1540b36ce7a4740f4a87c564becca65ed8d97255

third_party: upgrade rust crates

view details

Bert Belder

commit sha 33f4acf3aa2fbfe8354dc3289b82815b762c81d6

third_party: add rust crate 'termcolor'

view details

push time in a month

push eventpiscisaureus/deno

Axetroy

commit sha 4c80394f54bf68e8e961fbc6275cd536717bc7f6

bump std/prettier@0.5.0 to std/prettier@0.7.0 (#2425)

view details

Bert Belder

commit sha 3cb35db9aa9e384c955dc32e42444af06bec37b6

third_party: upgrade rust crates

view details

push time in a month

push eventpiscisaureus/deno

Axetroy

commit sha 4c80394f54bf68e8e961fbc6275cd536717bc7f6

bump std/prettier@0.5.0 to std/prettier@0.7.0 (#2425)

view details

Bert Belder

commit sha 3cb35db9aa9e384c955dc32e42444af06bec37b6

third_party: upgrade rust crates

view details

Bert Belder

commit sha 5f79bb716b74e9a4afb62b70d146527f9a1427f2

third_party: add rust crate 'termcolor'

view details

push time in a month

PR opened denoland/deno

Reviewers
Add rust crate 'termcolor'

Depends on #2424

+214 -82

0 comment

6 changed files

pr created time in a month

push eventpiscisaureus/deno

Bert Belder

commit sha 4d6ccb2a6ba60624e83992cdd13c3299a6ff79a3

third_party: upgrade rust crates

view details

Bert Belder

commit sha 3a21cce486373eae889d4b06e48faeb7bd0705ea

third_party: add rust crate 'termcolor'

view details

push time in a month

push eventdenoland/deno_third_party

Bert Belder

commit sha 7ad9fa3dac6d1bc64a242902f7d10357d3c97647

Upgrade rust crates

view details

Bert Belder

commit sha ce1d12fb709b5fd59ac8c8fb0abe12755644ff4f

Add rust crate 'termcolor'

view details

push time in a month

push eventpiscisaureus/deno

Bert Belder

commit sha 4d6ccb2a6ba60624e83992cdd13c3299a6ff79a3

third_party: upgrade rust crates

view details

push time in a month

push eventdenoland/deno_third_party

Bert Belder

commit sha 7ad9fa3dac6d1bc64a242902f7d10357d3c97647

Upgrade rust crates

view details

push time in a month

push eventpiscisaureus/deno

Bert Belder

commit sha 40ccc366e389a29b0aece9d984d310d8979d0893

third_party: add rust crate 'termcolor'

view details

push time in a month

create barnchpiscisaureus/deno

branch : add_termcolor

created branch time in a month

create barnchdenoland/deno_third_party

branch : 20190529_add_termcolor

created branch time in a month

push eventpiscisaureus/gnargo

Bert Belder

commit sha 537edeeb659d960c3e697ac03001b78a20f1e0c3

overrides: use latest version of 'dirs'

view details

push time in a month

PR opened denoland/deno

Reviewers
third_party: upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+193 -85

0 comment

5 changed files

pr created time in a month

create barnchpiscisaureus/deno

branch : upgrade_crates

created branch time in a month

delete branch piscisaureus/deno

delete branch : upgrade_crates

delete time in a month

create barnchdenoland/deno_third_party

branch : 20190529_upgrade_crates

created branch time in a month

pull request commentdenoland/deno

WIP steals progress bar code from cargo

I can't build this locally.

   --> cli\cargo_shell.rs:293:11
    |
293 |         ::fwdansi::write_ansi(stream, message)?;
    |           ^^^^^^^ could not find `fwdansi` in `{{root}}`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: Could not compile `deno_cli`.
ry

comment created time in a month

CommitCommentEvent

push eventdenoland/deno_std

Vincent LE GOFF

commit sha 1db594d5b0fd377ee6c749041b7265101f92eef1

http: add rfc7230 handling (#451)

view details

push time in a month

more