profile
viewpoint

Pull request review commentdenoland/deno

Add more dir api for Deno

 export function start(preserveDenoNamespace = true, source?: string): Start {  * Requires the `--allow-env` flag.  */ export function homeDir(): string {-  const path = sendSync(dispatch.OP_HOME_DIR);+  const path = sendSync(dispatch.OP_GET_DIR, { name: "home" });   if (!path) {     throw new Error("Could not get home directory.");   }   return path; } +/**+ * Returns the current user's cache directory.+ * If the directory does not exist, an exception is thrown+ * Requires the `--allow-env` flag.+ * |Platform | Value                               | Example                      |+ * | ------- | ----------------------------------- | ---------------------------- |+ * | Linux   | `$XDG_CACHE_HOME` or `$HOME`/.cache | /home/alice/.cache           |+ * | macOS   | `$HOME`/Library/Caches              | /Users/Alice/Library/Caches  |+ * | Windows | `{FOLDERID_LocalAppData}`           | C:\Users\Alice\AppData\Local |+ */+export function cacheDir(): string {+  const path = sendSync(dispatch.OP_GET_DIR, { name: "cache" });+  if (!path) {+    throw new Error("Could not get user cache directory.");+  }

All of these places where you throw new Error can be removed if you return the error from the op.

axetroy

comment created time in 2 hours

pull request commentdenoland/deno

Add more dir api for Deno

I think it’s better not to panic - because users can still trigger that by calling the op directly. Better to return Err(...)

I’m not at my computer to give a good example but you should be able to look through the other ops and find an example of returning an error.

axetroy

comment created time in 2 hours

push eventdenoland/deno

Axetroy

commit sha 83f95fb8dfaed42eee3e1e0cd3a6e9b94f05ef2d

fetch support URL instance as input (#3496)

view details

push time in 2 hours

PR merged denoland/deno

fetch support URL instance as input
const response = await fetch(new URL('http://www.example.com/démonstration.html'));

BTW, the URL implementation does not meet the specification

ref: https://url.spec.whatwg.org/#api https://w3c.github.io/FileAPI/#creating-revoking

+21 -13

2 comments

3 changed files

axetroy

pr closed time in 2 hours

push eventdenoland/deno

木杉

commit sha 7e116dd70d7c194f2967d64e7700aae0bb17100f

Support utf8 in file_server (#3495)

view details

push time in 7 hours

PR merged denoland/deno

(std/file_server): add utf8

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

+3 -3

0 comment

2 changed files

zhmushan

pr closed time in 7 hours

Pull request review commentdenoland/deno

Add more dir api for Deno

 fn op_start(   }))) } -fn op_home_dir(+#[derive(Deserialize)]+struct GetDirArgs {+  name: std::string::String,+}++fn op_get_dir(   state: &ThreadSafeState,-  _args: Value,+  args: Value,   _zero_copy: Option<PinnedBuf>, ) -> Result<JsonOp, ErrBox> {   state.check_env()?;-  let path = dirs::home_dir()-    .unwrap_or_default()-    .into_os_string()-    .into_string()-    .unwrap_or_default();+  let args: GetDirArgs = serde_json::from_value(args)?;++  let path = match args.name.as_str() {+    "home" => dirs::home_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "config" => dirs::config_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "cache" => dirs::cache_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "data" => dirs::data_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "data_local" => dirs::data_local_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "audio" => dirs::audio_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "desktop" => dirs::desktop_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "document" => dirs::document_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "download" => dirs::download_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "font" => dirs::font_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "picture" => dirs::picture_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "public" => dirs::public_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "template" => dirs::template_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),+    "video" => dirs::video_dir()+      .unwrap_or_default()+      .into_os_string()+      .into_string()+      .unwrap_or_default(),

It seems you could reduce code here by lifting the unwrap_or_default().into_os_string()... into the next statement.

axetroy

comment created time in 7 hours

push eventdenoland/rusty_v8

Andy Finch

commit sha f37085c370653440de6bd41913e4ce010734ed33

automatically convert from Local<T> to Local<Value> (#61)

view details

push time in 13 hours

PR merged denoland/rusty_v8

automatically convert from Local<T> to Local<Value>

This seems to work fine, but it's not exactly ideal. The rust compiler doesn't allow me to be more implicit here sadly.

ref #51

+25 -5

1 comment

3 changed files

afinch7

pr closed time in 13 hours

pull request commentdenoland/deno

(std/node): add qs

What if we land this PR but add a TODO to replace the implementation with URL.searchParams later? What do you think @justjavac ?

zhmushan

comment created time in 13 hours

push eventafinch7/rusty_v8

Ry Dahl

commit sha d7dd2eee7d5197548bd97cbebd92b73a701dda26

add todo

view details

push time in 13 hours

push eventdenoland/deno

木杉

commit sha d8e60309d2eed482a3a4c896e68a4a97e7f7b0d7

feat(file_server): add help & switch to flags (#3489)

view details

push time in 13 hours

PR merged denoland/deno

(std/file_server): add help & switch to flags

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

+48 -15

0 comment

2 changed files

zhmushan

pr closed time in 13 hours

push eventdenoland/deno

Axetroy

commit sha 8cf470474f34102871051e75ad5cb3bb457e74d1

flag: upgrade std to v0.26.0 (#3492)

view details

push time in 13 hours

PR merged denoland/deno

flag: upgrade std to v0.26.0

upgrade to v0.26.0 until there is a viable synchronization solution

+1 -1

0 comment

1 changed file

axetroy

pr closed time in 13 hours

issue commentdenoland/deno

Deno.openPlugin resolution is not inline with the rest of Deno

@lucacasonato that is the eventual goal. In fact the original patches from @afinch7 were doing something along those lines IIRC. However we need some foundational infrastructure - having basic dlopen functionality is important and close to the OS. We will add sugar on top of that.

lucacasonato

comment created time in 14 hours

push eventdenoland/rusty_v8

Bartek Iwańczuk

commit sha a6caa5a42d21aa8948d20e2c0b37aaf3ff6ea817

add v8::Promise (#56)

view details

push time in 14 hours

PR merged denoland/rusty_v8

add v8::Promise
+322 -0

0 comment

6 changed files

bartlomieju

pr closed time in 14 hours

push eventdenoland/rusty_v8

Andy Hayden

commit sha 7fd3bc56d64d2e7f135609d58b280a686f59449c

Exit with status 1 if build.rs fails (#62)

view details

push time in 14 hours

PR merged denoland/rusty_v8

Exit with status 1 if build.rs fails

Fixes #60.

(I had actually already run into this and changed it locally!)

+3 -2

1 comment

1 changed file

hayd

pr closed time in 14 hours

issue closeddenoland/rusty_v8

build: doesn't fail when missing submodules

When trying to build with missing submodules(I didn't add --recursive to the submodule init command) it will still give build success. This is on ubuntu 18.04 not sure if this can be replicated on other platforms.

closed time in 14 hours

afinch7

push eventdenoland/deno_install

Nayeem Rahman

commit sha f00e5a40a30a060761e03711e7225b65ec074888

feat: Support DENO_INSTALL in the powershell installer (#90)

view details

push time in 14 hours

pull request commentdenoland/deno

(std/node): add qs

I think what @justjavac is suggesting is that we first implement the query string part of the URL spec in Deno. Then std/node/qs can use that implementation, rather than having a completely separate one.

zhmushan

comment created time in 14 hours

issue commentdenoland/deno

Implement WHATWG Streams

Unfortunately you're probably right... I think the Stream API is unnecessarily complicated. I've presented my alternative version of streaming by porting Golang's I/O system, which include things like Deno.copy. That said, users don't care, they just want browser-like...

kitsonk

comment created time in 14 hours

Pull request review commentdenoland/rusty_v8

automatically convert from Local<T> to Local<Value>

 impl<'sc, T> DerefMut for Local<'sc, T> {     unsafe { self.0.as_mut() }   } }++impl<'sc, T> From<Local<'sc, T>> for Local<'sc, Value>

This is certainly an improvement - but please add a TODO to make it possible for targets other than Local<Value>.. For example Local<String> should be able to be down cast to Local<Name>.

afinch7

comment created time in 14 hours

push eventdenoland/deno_website2

Alex J Burke

commit sha cede1e29dbc8720a6ed502af6777e20651e39373

Repair the Unexpected entry and provide error fallback. (#142) The Unexpected entry was not being rendered because the type of the entry is "esm" not "github" and we provide no valid repo. Fix the repo/owner properties in the database but, since there are no useful files in the repo wire up displaying README.md in our index page. While here I also discovered that any missing type would actually cause an exception because it fell off the end of renderDir(). This case was actually covered in the older registry repo, so port that.

view details

push time in a day

PR merged denoland/deno_website2

Repair the Unexpected entry and provide error fallback.

The Unexpected entry was not being rendered because the type of the entry is "esm" not "github" and we provide no valid repo. Fix the repo/owner properties in the database but, since there are no useful files in the repo wire up displaying README.md in our index page.

While here I also discovered that any missing type would actually cause an exception because it fell off the end of renderDir(). This case was actually covered in the older registry repo, so port that.

+41 -9

1 comment

3 changed files

alexjeffburke

pr closed time in a day

push eventdenoland/deno

Axetroy

commit sha 8cf8a29d35d5832230034b3f9f6ce3cc67dba7c1

fix permission errors are swallowed by fs.exists (#3493)

view details

push time in a day

PR merged denoland/deno

fix permission errors are swallowed by fs.exists

ref: #3483

Make sure exists() doesn't swallow permissions errors

  • [x] test case
+132 -6

1 comment

4 changed files

axetroy

pr closed time in a day

push eventdenoland/deno_website2

Tilman Roeder

commit sha 5d75bc8a86b34e555b327ed160af50a9f05e5662

Add SQLite wrapper for Deno (#141) Add library for running SQLite from Deno: https://github.com/dyedgreen/deno-sqlite

view details

push time in 2 days

PR merged denoland/deno_website2

Add SQLite wrapper for Deno

Add library for running SQLite from Deno: https://github.com/dyedgreen/deno-sqlite

+5 -0

3 comments

1 changed file

dyedgreen

pr closed time in 2 days

push eventdenoland/deno

Weijia Wang

commit sha df7d8288d984f703722fae161b7d32fae9ab3149

file_server: get file and fileInfo concurrently (#3486)

view details

push time in 2 days

PR merged denoland/deno

Get `file` and `fileInfo` concurrently

Now we get the file and fileInfo sequentially. This change is to make it concurrently, which reduces time cost from open() + stat() to max(open(), stat())

+1 -2

1 comment

1 changed file

starkwang

pr closed time in 2 days

Pull request review commentdenoland/deno

(std/node): add qs

+import * as qs from "./querystring.ts";

Please maintain original copyright headers

zhmushan

comment created time in 2 days

Pull request review commentdenoland/rusty_v8

add v8::Promise

 inline static v8::MaybeLocal<T> ptr_to_maybe_local(T* ptr) {   return *reinterpret_cast<v8::MaybeLocal<T>*>(&ptr); } +template <class T>+inline static T maybe_to_value(v8::Maybe<T> maybe, T default_value) {+  return maybe.FromMaybe(default_value);+}+

Looks good to me...

bartlomieju

comment created time in 2 days

push eventdenoland/deno

木杉

commit sha 7f27f649cca0e928a422aaa6182988087338e435

fix: file_server swallowing permission errors (#3467)

view details

push time in 2 days

PR merged denoland/deno

file_server prints errors in console

<!-- Before submitting a PR read https://deno.land/manual.html#contributing --> cc @kitsonk close: #3465

+29 -5

4 comments

2 changed files

zhmushan

pr closed time in 2 days

issue closeddenoland/deno

http/file_server broken

/cc @zhmushan

$ deno --version
deno 0.26.0
$ deno --allow-net https://deno.land/std/http/file_server.ts
HTTP server listening on http://0.0.0.0:4500/

access server via browser or curl and got 500 error

$ curl http://0.0.0.0:4500/
Internal server error

closed time in 2 days

axetroy

push eventdenoland/deno

Kevin (Kun) "Kassimo" Qian

commit sha d146d45861708bcf1879563a545a2c8b8f96bd80

benchmark: align deno_http and node_http response (#3484)

view details

push time in 2 days

PR merged denoland/deno

benchmark: align deno_http and node_http response

Align deno_http and node_http test server response to have similar headers and sizes (s.t. benchmark reflects more correctly).

After this change: curl -i on Node:

HTTP/1.1 200 OK
Date: Thu, 12 Dec 2019 01:31:15 GMT
Connection: keep-alive
Content-Length: 11

Hello World

curl -i on Deno:

HTTP/1.1 200 OK
date: Thu, 12 Dec 2019 01:30:58 GMT
connection: keep-alive
content-length: 11

Hello World
+8 -2

0 comment

2 changed files

kevinkassimo

pr closed time in 2 days

push eventdenoland/deno

dnalborczyk

commit sha ef174883985d764d727002be004a113968922013

fix v8-flags example to manual (#3470)

view details

push time in 2 days

PR merged denoland/deno

Remove v8-options from manual, add v8-flags example

fixes the manual for: https://github.com/denoland/deno/pull/3389

removed the gist link https://gist.github.com/ry/a610ce48cba2f0225f9c81a5a833fc87 as it points to something else.

took me a while to figure out on how to apply an option or multiple options, since there is no feedback when applied wrong.

$ deno --v8-flags=foo-bar  # no error
$ deno --v8-flags=--foo-bar  # no error
+9 -3

2 comments

1 changed file

dnalborczyk

pr closed time in 2 days

pull request commentdenoland/deno

file_server prints errors in console

Hi @zhmushan - there's a conflict, could you please merge master? Otherwise looks good. Thank you!

zhmushan

comment created time in 3 days

push eventdenoland/deno

Kevin (Kun) "Kassimo" Qian

commit sha c3c69aff7e1df1a9480d2a5e9a0fa17cf3af6409

fix(std/http): close connection on .respond() error (#3475)

view details

push time in 3 days

PR merged denoland/deno

std/http: close connection on .respond() error

Previously we did not handle automatic connection closing on .respond() error. This leaves the supposedly dead connection not closed (CLOSE_WAIT) (since req.done is never resolved due to error), resulting in errors like Too many files open. (which might be the cause of https://github.com/denoland/deno/issues/3463#issuecomment-563056609)

A simple demonstration of what this patch fixes is with the following:

import { serve } from 'https://deno.land/std/http/server.ts';
const body = new TextEncoder().encode("Hello World\n");
const s = serve({ port: 8000 });

console.log("Listening on port 8000");

setInterval(() => {
  console.log(Object.keys(Deno.resources()).length);
}, 10000);

for await (const req of s) {
  req.respond({ body }).catch(() => {});
}

If you fire a few autocannon -c 100 -d 5 -p 10 http://localhost:8000 to this, you'll notice that Object.keys(Deno.resources()).length keeps growing. (likely due to autocannon closing conn on its side thus making .respond() fail (especially under pipelining))

With this patch, Object.keys(Deno.resources()).length should eventually return to a fixed amount.

+90 -6

3 comments

2 changed files

kevinkassimo

pr closed time in 3 days

pull request commentdenoland/deno

Remove v8-options from manual, add v8-flags example

Looks good - thank you! Sorry we had a problem with windows build being flaky - could you please merge master branch?

dnalborczyk

comment created time in 3 days

push eventdenoland/deno

Nayeem Rahman

commit sha 407195ea870a82f4341671d6718f813bd9a3b7ac

fix: Only swallow NotFound errors in std/fs/expandGlob() (#3479)

view details

push time in 3 days

PR merged denoland/deno

fix: Only swallow NotFound errors in std/fs/expandGlob()

Currently if you run deno https://deno.land/std@v0.26.0/testing/runner.ts without sufficient permissions it'll just report No matching test modules found..

+52 -23

1 comment

3 changed files

nayeemrmn

pr closed time in 3 days

Pull request review commentdenoland/deno

fix: Only swallow NotFound errors in std/fs/expandGlob()

 export function* expandGlobSync(     } else if (globSegment == "..") {       const parentPath = joinGlobs([walkInfo.filename, ".."], globOptions);       try {-        return yield* [-          { filename: parentPath, info: statSync(parentPath) }-        ].filter(shouldInclude);-      } catch {-        return;+        if (shouldInclude(parentPath)) {+          return yield { filename: parentPath, info: statSync(parentPath) };+        }+      } catch (error) {+        if (error.kind != ErrorKind.NotFound) {+          throw error;+        }

It seems this little 3 line bit of code is repeated many times. Should it be abstracted into a function?

nayeemrmn

comment created time in 3 days

pull request commentdenoland/deno

std/http: close connection on .respond() error

Kevin - yes that sounds good .. please leave a Todo comment explaining the situation

kevinkassimo

comment created time in 3 days

push eventdenoland/deno

Andy Hayden

commit sha c93ae0b05a4c4fe5b43a9bd2b6430637b17979d0

Fix release assets not being executable (#3480)

view details

push time in 3 days

PR merged denoland/deno

Fix release assets not being executable

For some reason when using stdout the permissions are stripped.

Fixes #3461.

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

+2 -2

0 comment

1 changed file

hayd

pr closed time in 3 days

issue closeddenoland/deno

release assets is not a executable file

$ ls -lh
-rw-r--r--@  1 axetroy  staff    43M 12  8 02:18 deno_osx_x64
-rw-r--r--@  1 axetroy  staff    11M 12  8 02:17 deno_osx_x64.gz
$ ./deno_osx_x64 --version
fish: The file './deno_osx_x64' is not executable by this user
$ chmod +x deno_osx_x64
$ ./deno_osx_x64 --version
deno 0.26.0
$ ls -lh
-rwxr-xr-x@  1 axetroy  staff    43M 12  8 02:18 deno_osx_x64
-rw-r--r--@  1 axetroy  staff    11M 12  8 02:17 deno_osx_x64.gz

closed time in 3 days

axetroy

push eventdenoland/rusty_v8

Bartek Iwańczuk

commit sha 2cfb80e174f377c471a25cce27eb6fd9609c4ecd

Add v8::Function (#57)

view details

push time in 3 days

PR merged denoland/rusty_v8

Add v8::Function
+237 -1

1 comment

7 changed files

bartlomieju

pr closed time in 3 days

issue commentdenoland/deno

release assets is not a executable file

@lucacasonato Oh - yes that's what I thought. I don't use Windows so based on the above comments I thought maybe tar support was added. I'm fine with switching to zip for everyone. It's annoying to have two types of packages.

axetroy

comment created time in 3 days

Pull request review commentdenoland/deno_install

feat: Support DENO_INSTALL in the powershell installer

 if (!(Get-Module PSScriptAnalyzer -ListAvailable)) { # Lint. Invoke-ScriptAnalyzer *.ps1 -EnableExit -Exclude PSAvoidAssignmentToAutomaticVariable -$BinDir = if ($IsWindows) {-  "$Home\.deno\bin"+# Test that we can install the latest version at the default location.+$env:DENO_INSTALL = ""+.\install.ps1+if ($IsWindows) {+  ~\.deno\bin\deno.exe --version } else {-  "$Home/.deno/bin"+  ~/.local/bin/deno --version } -# Test we can install a specific version.-Remove-Item $BinDir -Recurse -Force -ErrorAction SilentlyContinue+# Test that we can install a specific version at a custom location.+$env:DENO_INSTALL = if ($IsWindows) {+  "$Home\deno-0.13.0"+} else {+  "$Home/deno-0.13.0"+} .\install.ps1 v0.13.0 $DenoVersion = if ($IsWindows) {-  deno --version+  ~\deno-0.13.0\bin\deno.exe --version } else {-  ~/.deno/bin/deno --version+  ~/deno-0.13.0/bin/deno --version } if (!($DenoVersion -like '*0.13.0*')) {   throw $DenoVersion }--# Test we can install the latest version.

why remove this?

nayeemrmn

comment created time in 4 days

push eventdenoland/deno_install

木杉

commit sha 7bdb161ab57958adfb2410c38a2bdb44c0e7f611

Add documents to manage multiple versions on Windows with Scoop (#91)

view details

push time in 4 days

push eventdenoland/deno_website2

Rafał Pocztarski

commit sha 0f2ce2f34a08bcb2686dd302d8d688dae8f938a3

Add rand module (#139)

view details

push time in 4 days

PR merged denoland/deno_website2

Add rand module

This PR adds rand module for easy access to random numbers:

  • https://github.com/rsp/deno-rand
+5 -0

0 comment

1 changed file

rsp

pr closed time in 4 days

push eventdenoland/deno

AleksandrukTad

commit sha 31ddfd5a42d658b92e954e44d3326a8e37ac9198

fix: decoding uri in file_server (#3187)

view details

push time in 4 days

PR merged denoland/deno

Bug/decoding uri

Hey its my first pr to open source project, let me know if I have to do some additional stuff. Was not able to test it with actual files, but now if you go to 0.0.0.0:4500/test test.txt fsPath will be with space not %20.

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

+16 -2

14 comments

3 changed files

AleksandrukTad

pr closed time in 4 days

issue closeddenoland/deno

[std] File server example can not handle url encoded characters

https://deno.land/std/http/file_server.ts can not handle urls like /test%20file.txt - it does not seem to parse URL encoded characters like %20.

closed time in 4 days

lucacasonato

push eventdenoland/rusty_v8

Bartek Iwańczuk

commit sha b698e2fce339696ddd57fe08790f5e60d7969aa1

add v8::Object (#55)

view details

push time in 5 days

PR merged denoland/rusty_v8

add v8::Object
+136 -3

0 comment

6 changed files

bartlomieju

pr closed time in 5 days

issue commentdenoland/deno

Cannot work on Azure Web Apps (Windows Server 2016)

Hmm even FOLDERID_Profile isn't set Deno shouldn't panic.

horihiro

comment created time in 5 days

Pull request review commentdenoland/rusty_v8

add v8::Object

 fn exception() {   });   isolate.exit(); }++#[test]+fn object() {+  setup();+  let mut params = v8::Isolate::create_params();+  params.set_array_buffer_allocator(+    v8::array_buffer::Allocator::new_default_allocator(),+  );+  let mut isolate = v8::Isolate::new(params);+  let mut locker = v8::Locker::new(&mut isolate);+  v8::HandleScope::enter(&mut locker, |scope| {+    let mut context = v8::Context::new(scope);+    context.enter();+    let null = new_null(scope);+    // TODO: safer casts.+    let null: v8::Local<v8::Value> =+        unsafe { std::mem::transmute_copy(&null) };++    // TODO: safer casts.+    let n1: Local<v8::Name> = unsafe { std::mem::transmute_copy(&v8::String::new(scope, "a", v8::NewStringType::Normal).unwrap()) };+    let n2: Local<v8::Name> = unsafe { std::mem::transmute_copy(&v8::String::new(scope, "b", v8::NewStringType::Normal).unwrap()) };+    let names = vec![n1, n2];+    // TODO: safer casts.+    let v1: v8::Local<v8::Value> = unsafe { std::mem::transmute_copy(&v8::Number::new(scope, 1.0)) };+    let v2: v8::Local<v8::Value> = unsafe { std::mem::transmute_copy(&v8::Number::new(scope, 2.0)) };+    let values = vec![v1, v2];

Can you pull the constructors out of the unsafe block?

Also rather than // TODO: safer casts put

// TODO Safer casts https://github.com/denoland/rusty_v8/issues/51
bartlomieju

comment created time in 5 days

push eventdenoland/rusty_v8

Bartek Iwańczuk

commit sha 41e1f14ab5a5d4c4379f3f5b02f9d39419f49269

add v8::JSON (#54)

view details

push time in 5 days

PR merged denoland/rusty_v8

add v8::JSON
+88 -0

0 comment

5 changed files

bartlomieju

pr closed time in 5 days

PR opened denoland/deno

Disable flaky plugin test on windows

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

+2 -0

0 comment

1 changed file

pr created time in 5 days

create barnchry/deno

branch : disable_flaky

created branch time in 5 days

Pull request review commentdenoland/deno

file_server prints errors in console

 test(async function serveFallback(): Promise<void> {     killFileServer();   } });++test(async function servePermissionDenied(): Promise<void> {+  const deniedServer = Deno.run({+    args: [Deno.execPath(), "run", "--allow-net", "http/file_server.ts"],+    stdout: "null",+    stderr: "piped"+  });++  const curl = Deno.run({+    args: ["curl", "http://localhost:4500/"],+    stdout: "null"+  });

I don't think the tests should depend on curl. Can you use fetch instead?

zhmushan

comment created time in 5 days

issue commentdenoland/deno

Flag order error

We could require that script args are placed after -- so it would be

deno -A https://deno.land/std/http/file_server.ts -- /etc

This would allow for better error checking of the flags...

Soremwar

comment created time in 5 days

issue openeddenoland/deno

plugin test is flaky on windows?

https://github.com/denoland/deno/pull/3470/checks?check_run_id=340389213

2019-12-09T16:52:40.7820723Z test basic ... FAILED
2019-12-09T16:52:40.7820950Z 
2019-12-09T16:52:40.7821938Z failures:
2019-12-09T16:52:40.7822131Z 
2019-12-09T16:52:40.7822526Z ---- basic stdout ----
2019-12-09T16:52:40.7822888Z target_dir D:\a\deno\deno\target\release
2019-12-09T16:52:40.7823084Z target_dir D:\a\deno\deno\target\release
2019-12-09T16:52:40.7823290Z stdout Hello from plugin. data: test | zero_copy: test
2019-12-09T16:52:40.7823496Z Plugin Sync Response: test
2019-12-09T16:52:40.7824000Z 
2019-12-09T16:52:40.7824961Z stderr 
2019-12-09T16:52:40.7825174Z 
2019-12-09T16:52:40.7825352Z #
2019-12-09T16:52:40.7825549Z # Fatal error in , line 0
2019-12-09T16:52:40.7825745Z # ignored
2019-12-09T16:52:40.7825933Z #
2019-12-09T16:52:40.7826118Z #
2019-12-09T16:52:40.7826282Z #
2019-12-09T16:52:40.7826478Z #FailureMessage Object: 0000008B0EDFD330
2019-12-09T16:52:40.7826848Z ==== C stack trace ===============================
2019-12-09T16:52:40.7827031Z 
2019-12-09T16:52:40.7827264Z 	v8::base::debug::StackTrace::StackTrace [0x00007FF6C68D499B+27]
2019-12-09T16:52:40.7827511Z 	v8::platform::DefaultPlatform::GetStackTracePrinter [0x00007FF6C6726317+55]
2019-12-09T16:52:40.7827724Z 	V8_Fatal [0x00007FF6C6724DB9+217]
2019-12-09T16:52:40.7827936Z 	v8::internal::GlobalBackingStoreRegistry::Register [0x00007FF6C6832689+441]
2019-12-09T16:52:40.7828137Z 	v8::ArrayBuffer::GetBackingStore [0x00007FF6C6715636+262]
2019-12-09T16:52:40.7828350Z 	deno::Send [0x00007FF6C672110C+284]
2019-12-09T16:52:40.7828564Z 	v8::internal::FunctionCallbackArguments::Call [0x00007FF6C6AE557D+589]
2019-12-09T16:52:40.7828784Z 	v8::internal::Builtins::InvokeApiFunction [0x00007FF6C6AE49CA+2378]
2019-12-09T16:52:40.7829031Z 	v8::internal::Builtin_HandleApiCall [0x00007FF6C6AE3FFC+1020]
2019-12-09T16:52:40.7829248Z 	v8::internal::Builtin_HandleApiCall [0x00007FF6C6AE3C47+71]
2019-12-09T16:52:40.7829447Z 	Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [0x00007FF6C695559D+61]
2019-12-09T16:52:40.7829671Z 	Builtins_InterpreterEntryTrampoline [0x00007FF6C68E125B+187]
2019-12-09T16:52:40.7829888Z 	Builtins_InterpreterEntryTrampoline [0x00007FF6C68E125B+187]
2019-12-09T16:52:40.7830093Z 	Builtins_InterpreterEntryTrampoline [0x00007FF6C68E125B+187]
2019-12-09T16:52:40.7830297Z 	Builtins_InterpreterEntryTrampoline [0x00007FF6C68E125B+187]
2019-12-09T16:52:40.7830502Z 	Builtins_InterpreterEntryTrampoline [0x00007FF6C68E125B+187]
2019-12-09T16:52:40.7830685Z 	Builtins_GeneratorPrototypeNext [0x00007FF6C6913072+146]
2019-12-09T16:52:40.7830888Z 	Builtins_JSEntryTrampoline [0x00007FF6C68DEADE+94]
2019-12-09T16:52:40.7831220Z 	Builtins_JSEntry [0x00007FF6C68DE6CC+204]
2019-12-09T16:52:40.7831476Z 	v8::internal::Execution::Call [0x00007FF6C67C7AF6+1062]
2019-12-09T16:52:40.7831688Z 	v8::internal::Execution::Call [0x00007FF6C67C77C3+243]
2019-12-09T16:52:40.7831891Z 	v8::internal::SourceTextModule::ExecuteModule [0x00007FF6C67CFA3F+287]
2019-12-09T16:52:40.7832117Z 	v8::internal::SourceTextModule::InnerModuleEvaluation [0x00007FF6C67CF27F+1071]
2019-12-09T16:52:40.7832338Z 	v8::internal::SourceTextModule::Evaluate [0x00007FF6C67CEDB2+146]
2019-12-09T16:52:40.7832567Z 	v8::internal::SourceTextModule::EvaluateMaybeAsync [0x00007FF6C67CEB5E+302]
2019-12-09T16:52:40.7832785Z 	v8::internal::Module::Evaluate [0x00007FF6C67CA905+101]
2019-12-09T16:52:40.7832990Z 	v8::Module::Evaluate [0x00007FF6C6711226+486]
2019-12-09T16:52:40.7833169Z 	deno_mod_evaluate [0x00007FF6C670C206+230]
2019-12-09T16:52:40.7833381Z 	ZN4deno7isolate7Isolate12mod_evaluate17hcc2f0fdc8c14dcb6E [0x00007FF6C662899E+30]
2019-12-09T16:52:40.7833621Z 	ZN80_$LT$std..future..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h4a15c2b98a574942E [0x00007FF6C625DCDB+1963]
2019-12-09T16:52:40.7833877Z 	ZN80_$LT$std..future..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17hb38b650467cbede1E [0x00007FF6C625FE54+1044]
2019-12-09T16:52:40.7834127Z 	ZN97_$LT$futures_util..compat..compat03as01..Compat$LT$Fut$GT$$u20$as$u20$futures..future..Future$GT$4poll17h4d9b699aa4581661E [0x00007FF6C61A4F33+83]
2019-12-09T16:52:40.7834500Z 	ZN7futures6future5chain22Chain$LT$A$C$B$C$C$GT$4poll17hd679173e7149e6ecE [0x00007FF6C610EF11+97]
2019-12-09T16:52:40.7834722Z 	ZN7futures9task_impl3std3set17hc40a385e2375be91E [0x00007FF6C6602280+96]
2019-12-09T16:52:40.7834924Z 	ZN3std9panicking3try7do_call17hcb4923d650ed8541E.llvm.5887183077164218732 [0x00007FF6C6601F35+149]
2019-12-09T16:52:40.7835175Z 	panic_unwind::__rust_maybe_catch_panic [0x00007FF6C66F4272+34] (/rustc/4560ea788cb760f0a34127156c78e2552949f734\/src\libpanic_unwind\lib.rs:80)
2019-12-09T16:52:40.7835400Z 	ZN16tokio_threadpool4task4Task3run17hb52befe50050fc40E [0x00007FF6C660B8B5+245]
2019-12-09T16:52:40.7835623Z 	ZN16tokio_threadpool6worker6Worker3run17h62be210ba81dc782E [0x00007FF6C6600136+3366]
2019-12-09T16:52:40.7835913Z 	ZN16tokio_threadpool6worker6Worker3run17h62be210ba81dc782E [0x00007FF6C65FF813+1027]
2019-12-09T16:52:40.7836620Z 	ZN3std6thread5local17LocalKey$LT$T$GT$4with17h602f66a0b54c5d82E [0x00007FF6C65E10D9+153]
2019-12-09T16:52:40.7836991Z error: test failed, to rerun pass '-p test_plugin --test integration_tests'
2019-12-09T16:52:40.7837134Z 	ZN3std6thread5local17LocalKey$LT$T$GT$4with17h952ea0e63369e2c8E [0x00007FF6C65E1354+212]
2019-12-09T16:52:40.7837397Z 	ZN96_$LT$tokio_threadpool..park..boxed..BoxedPark$LT$T$GT$$u20$as$u20$tokio_executor..park..Park$GT$6unpark17ha9dd4ebec68c4809E [0x00007FF6C65E87E0+224]
2019-12-09T16:52:40.7837642Z 	ZN3std6thread5local17LocalKey$LT$T$GT$4with17h31781bbcad31b5fbE [0x00007FF6C6607CD3+147]
2019-12-09T16:52:40.7837871Z 	ZN3std6thread5local17LocalKey$LT$T$GT$4with17h9dd6dab994fa9906E [0x00007FF6C6608257+151]
2019-12-09T16:52:40.7838103Z 	ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h1bca0a7c71f16f26E [0x00007FF6C660AD21+241]
2019-12-09T16:52:40.7838317Z 	ZN3std9panicking3try7do_call17hc8e4e3ad30f41392E.llvm.5887183077164218732 [0x00007FF6C6601E8F+31]
2019-12-09T16:52:40.7838698Z 	panic_unwind::__rust_maybe_catch_panic [0x00007FF6C66F4272+34] (/rustc/4560ea788cb760f0a34127156c78e2552949f734\/src\libpanic_unwind\lib.rs:80)
2019-12-09T16:52:40.7838941Z 	ZN3std6thread7Builder5spawn17he4f870f7a6333807E [0x00007FF6C6602B90+992]
2019-12-09T16:52:40.7839191Z 	alloc::boxed::{{impl}}::call_once<(),FnOnce<()>> [0x00007FF6C66D0817+87] (/rustc/4560ea788cb760f0a34127156c78e2552949f734\src\liballoc\boxed.rs:922)
2019-12-09T16:52:40.7839448Z 	std::sys::windows::thread::{{impl}}::new::thread_start [0x00007FF6C66F22F7+119] (/rustc/4560ea788cb760f0a34127156c78e2552949f734\/src\libstd\sys\windows\thread.rs:47)
2019-12-09T16:52:40.7839671Z 	BaseThreadInitThunk [0x00007FFA68647974+20]
2019-12-09T16:52:40.7839872Z 	RtlUserThreadStart [0x00007FFA6B3AA271+33]
2019-12-09T16:52:40.7840014Z 
2019-12-09T16:52:40.7840238Z thread 'basic' panicked at 'assertion failed: output.status.success()', test_plugin\tests\integration_tests.rs:36:3
2019-12-09T16:52:40.7840478Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-09T16:52:40.7840639Z 
2019-12-09T16:52:40.7840810Z 
2019-12-09T16:52:40.7840986Z failures:
2019-12-09T16:52:40.7841181Z     basic
2019-12-09T16:52:40.7841340Z 
2019-12-09T16:52:40.7841528Z test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2019-12-09T16:52:40.7841702Z 
2019-12-09T16:52:41.0053770Z ##[error]Process completed with exit code 1.
2019-12-09T16:52:41.0106046Z Cleaning up orphan processes
2019-12-09T16:52:41.0892995Z Terminate orphan process: pid (3560) (sccache)

created time in 5 days

Pull request review commentdenoland/deno

std: add `pluginFilename` function

+import { test } from "../testing/mod.ts";

Please add

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
afinch7

comment created time in 5 days

issue commentdenoland/deno

release assets is not a executable file

Yeah - we can switch to tar for all platforms. I agree it’s probably better.

axetroy

comment created time in 5 days

delete branch ry/rusty_v8

delete branch : deref_string_value

delete time in 6 days

push eventdenoland/rusty_v8

Ryan Dahl

commit sha 774e34adf1e835d4a8cead2ec5efced4aef24329

Deref String to Value

view details

push time in 6 days

PR merged denoland/rusty_v8

Deref String to Value
+9 -0

0 comment

1 changed file

ry

pr closed time in 6 days

PR opened denoland/rusty_v8

Deref String to Value
+9 -0

0 comment

1 changed file

pr created time in 6 days

create barnchry/rusty_v8

branch : deref_string_value

created branch time in 6 days

issue openeddenoland/rusty_v8

Need automated conversion for Local<String> to Local<Value>

Here is an attempted solution which doesn't quite work.

/// For example, to allow automated conversion from Local<String> to
/// Local<Value>
impl<'sc, T, U> From<Local<'sc, T>> for Local<'sc, U>
where
  T: Deref<Target = U>,
{
  fn from(v: Local<'sc, T>) -> Local<'sc, U> {
    unsafe { std::mem::transmute(v) }
  }
}

In C++ this is done by this bit of code: https://github.com/v8/v8/blob/63da8397bc967232f91fea07b1861a50d20ca717/include/v8.h#L192-L201

created time in 6 days

push eventry/rusty_v8

Ryan Dahl

commit sha 03e2a011da80c7e21cfdb74e6a4820ba4a52a2af

fix

view details

push time in 6 days

push eventry/rusty_v8

Bert Belder

commit sha ada75e81d19320715c6a1534139d425c719c1e78

Turn 'symbol_level = 1' back on (#47)

view details

Ryan Dahl

commit sha 0c904167d3ba70cd7a87969b98c5f58fbe9291e5

WIP ScriptOrigin constructor

view details

Ryan Dahl

commit sha 7f4d108d31b05d1be0b38a1a6eab9b2f2cd02098

x

view details

Ryan Dahl

commit sha 8f66fedb034e8a0fbc31e26edfb78e7d446f59c7

wip

view details

push time in 6 days

push eventbartlomieju/deno

木杉

commit sha cfa4f540baac5beaf168de3e818c882ccbd95136

better html for file_server (#3423)

view details

Andy Finch

commit sha 00844b41428a73d3fb3fd06ba3e564b4e1e3c63c

fix some typos in permissions (#3436)

view details

Ry Dahl

commit sha ee013102ff4ce75c1068b6e771ed120fc32a849d

remove duplicated argv member from ThreadSafeGlobalState (#3433)

view details

Nayeem Rahman

commit sha 91da410fc3bfde76c3c8930c6f8bfd4d5f9b974e

feat: Add --no-remote, rename --no-fetch to --cached-only (#3417)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 32937251315493ef2c3b42dd29340e8a34501aa4

Timer/microtask ordering fix (#3439)

view details

Christian Moritz

commit sha 214b3eb29aa9cce8a55a247b4bd816cbd19bfe6b

fix depot_tools on macOS Catalina by upgrading it to 23247b9 (#3441) Fixes: #3440 Fixes: #3153

view details

Andy Finch

commit sha 7c3b9b4f4f2f4ec8fdeb0e77bb853fd22ffaa476

feat: first pass at native plugins (#3372)

view details

Ry Dahl

commit sha e6228bc3c4d974cf9e67b00e0a14a09f94d8ef5e

Revert "Synchronize deno and deno_std versions" (#3446) Preventing release v0.26.0 This reverts commit 81efa9d938aa169d16e67762d336d75738375cd6.

view details

Ryan Dahl

commit sha 0ce9011edc8ec53df47e3103ecca3069d385ce37

v0.26.0

view details

Bartek Iwańczuk

commit sha e02029c602cbef4c2c63d53a9d6bdab3ab2130fe

fix isolate tests (#3459) Some tests were silently failing after #3358 and #3434 because pool.spawn_ok was used which doesn't panic on errors. For reference, the failure looked like this: thread '<unnamed>' panicked at 'assertion failed: match isolate.poll_unpin(cx) { Poll::Ready(Ok(_)) => true, _ => false, }', core/isolate.rs:1408:7

view details

Luca Casonato

commit sha 7144bbed34ee3d867c76a88398e6d73843385b34

fix: plugin ops should change op count metrics (#3455)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 50b6907bc332315eeb13c05bf687b990bc8dd936

Replace deprecated GetContent with GetBackingStore (#3458)

view details

木杉

commit sha 90c5aadbca8b47fc43bd3ece80e007b1b546c402

fix(installer): installs to the wrong directory on Windows (#3462) Close: #3443

view details

Ryan Dahl

commit sha 2d5609844c72c798bbc470897241ea2916c17404

Merge branch 'master' into upgrade-tokio_deno_core_take2

view details

Ryan Dahl

commit sha 5426908e5b866613461748ddb79af54fde5e00b4

Use tokio 0.2

view details

push time in 6 days

push eventdenoland/deno_website2

迷渡

commit sha 963079ff9f470b0bd92ea600b913dfdb12a3df2c

module name must not contain dashes (#137)

view details

push time in 6 days

PR merged denoland/deno_website2

module name must not contain dashes

cc @paulmillr

+2 -2

1 comment

2 changed files

justjavac

pr closed time in 6 days

push eventdenoland/deno_website2

迷渡

commit sha 4308c36da5a0b4ae028e0f7ee5e573435ec408e7

sort database.json (#134)

view details

push time in 6 days

PR merged denoland/deno_website2

sort database.json
+35 -30

2 comments

2 changed files

justjavac

pr closed time in 6 days

delete branch denoland/rusty_v8

delete branch : gn

delete time in 7 days

PR closed denoland/rusty_v8

Undo all .gn changes
+24 -5

1 comment

1 changed file

ry

pr closed time in 7 days

pull request commentdenoland/rusty_v8

Undo all .gn changes

closed in favor of #47

ry

comment created time in 7 days

PR opened denoland/rusty_v8

Undo all .gn changes
+24 -5

0 comment

1 changed file

pr created time in 7 days

create barnchdenoland/rusty_v8

branch : gn

created branch time in 7 days

pull request commentdenoland/rusty_v8

Fix mac build

Let's just revert all the changes I made to .gn

They were arrived through much trial and error and I was hoping it could just be simplified - but apparently not. We can try to simplify in the future. It's really not so important right now.

ry

comment created time in 7 days

issue commentdenoland/deno

Rust crates cannot be published to crates.io

The problem is only with the windows crate... as a short term solution we could remove support for windows crate and publish 0.26

ry

comment created time in 7 days

PR opened denoland/rusty_v8

WIP ScriptOrigin constructor
+60 -2

0 comment

4 changed files

pr created time in 7 days

more