profile
viewpoint
Casper Beyer caspervonb Sponsor me via GitHub Sponsors https://medium.com/commitlog Currently contributing to Deno and WebAssembly System Interface things.

amokjs/amok 1175

Development on hold, playing around with different approaches at the moment

caspervonb/deno-wasi 131

A (WIP) WebAssembly System Interface implementation for Deno

caspervonb/8192px 57

A collaborative pixel art experiment

caspervonb/bitty 5

Use amok instead

caspervonb/dotfiles 2

My personal configuration for unix environments.

caspervonb/6to5-mocha 1

6to5 mocha guide

create barnchcaspervonb/deno

branch : bert-deadlock-example

created branch time in 17 hours

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 1ab5903018775af9f14c58b4862c72cca2c81360

Build with wasm32-wasi as the build target This changes the CI invocation to use wasm32-wasi as the build target.

view details

Casper Beyer

commit sha f50b8d2be2eb7694e6c93dc5a85c0963745569d5

Add wasi crate to dependencies This adds a dependency on the wasi crate allowing for tests to be written against the ABI.

view details

Casper Beyer

commit sha 849624d805e48a68592733d3cff25a0eecb4d171

Add wasi::clock_time_get tests This adds a couple of tests for validating the behavior of wasi::clock_time_get.

view details

Casper Beyer

commit sha 9f801b4e89983ed9d6080e3c5772a6b5bb41e198

Add wasi::clock_res_get tests This adds a couple of tests for validating the behavior of wasi::clock_res_get.

view details

Casper Beyer

commit sha f40f24faef879c771cecd8b5eb04fa8d5fb3fc13

Add wasi::proc_exit tests This adds a couple of tests validating the behavior wasi::proc_exit.

view details

Casper Beyer

commit sha 24bc7836f3159ae5202e53ea8f51e87fcdea8398

Add wasi::random_get test This adds a test validating that wasi::random_get succeeds and doesn't return a zero filled buffer.

view details

Casper Beyer

commit sha d2a2fa2364add1c0ab28e449e41d576c71f18af0

Add wasi::fd_write tests This adds a couple of tests validating the behavior of wasi::fd_write with stdout, stderr and stdio and a file.

view details

push time in 19 hours

pull request commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

Running into some issues trying to clean up the inspector command calls, they need to be in sequence, error checked etc.

Got stuck forever trying to figure out what the deadlock was, turns out that the worker, well inspector through the worker to be exact will block indefinitely until a runIfWaitingForDebugger is sent.

Picked it apart and it seems to block because sessions.handshake.is_some() is always true unless the previously mentioned command is sent.

In practice, this seems to be behaving as I'd expect --inspect-brk to behave, but this is being passed --inspect.

cc @piscisaureus @bartlomieju

caspervonb

comment created time in 20 hours

issue commentdenoland/deno

Deno.iter async HTTP request bug

See the documentation.

It is not guaranteed that the full buffer will be written in a single call.

Basically the same semantics as write(2) applies.

write() writes up to count bytes from the buffer pointed buf to the file referred to by the file descriptor fd. The number of bytes written may be less than count if, for example, there is insufficient space on the underlying physical medium, or the RLIMIT_FSIZE resource limit is encountered (see setrlimit(2)), or the call was interrupted by a signal handler after having written less than count bytes. (See also pipe(7).)

trgwii

comment created time in a day

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 23215efaf49b345f18f1560320c028dba7ff66cc

Add wasi::fd_write tests

view details

push time in 2 days

pull request commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

Could the report be made a bit more detailed, eg. showing distinct percentages for branches and statements?

Hmm, I'll clean this up first but it's doable, just have to walk the AST checking if node ranges are inside covered ranges to to calculate that.

caspervonb

comment created time in 2 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 73f5f2d58ed8470dcc55226a3d19d7fec513cd25

Add wasi::fd_write tests

view details

push time in 3 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 00a98b5745481874e4424f645d56271bd124f659

Use wasm32-wasi as the build target

view details

Casper Beyer

commit sha 9d029c21a4524e7b8d7a5e841f73fd2a77beb726

Add wasi to dependencies

view details

Casper Beyer

commit sha 6ddf393e18a3d6099f82c34a1ac588da572eed37

Add wasi::clock_time_get tests

view details

Casper Beyer

commit sha 36ca3c87e0d7b4593f76aebe2d708975750cd322

Add wasi::clock_res_get tests

view details

Casper Beyer

commit sha 5c391cce45f94291ac6052f0e97201f718a2e041

Add wasi::proc_exit tests

view details

Casper Beyer

commit sha f6b6d0f62e563103d160c3e35805de1150ac1d2a

Add wasi::random_get tests

view details

push time in 3 days

PR opened caspervonb/wasi-test

Add wasi tests
+59 -0

0 comment

5 changed files

pr created time in 3 days

create barnchcaspervonb/wasi-test

branch : test-wasi

created branch time in 3 days

issue commentWebAssembly/WASI

WASI testsuite

Been a bit under the weather so progress has been a bit slow but still working on this.

I've reconsidered and I believe it is likely that the test suite will need to contain tools that refer to the witx documents in the spec repo (even if transitively) - e.g. the rust wasi crate both refers to the spec via a submodule relationship. So, we could avoid having a circular dependency on the spec repo by putting spec tests in a separate repo.

So had a bit of churn and things have changed, I've embraced Cargo for this instead of an ad-hoc build script and brought in the wasi crate as a dependency for testing against the ABI (landing soon'ish).

So yes, as of a few commits ago this would be an indirect circular dependency.

wanderer

comment created time in 3 days

pull request commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

So this works, needs to be cleaned up a bit this approach will work.

However, it turns out tracefile sections (lcov format) can start with the test name.

A tracefile is made up of several human-readable lines of text, divided into sections. If available, a tracefile begins with the testname which is stored in the following format:

TN:<test name>

And we can't get at the test name since the test runner is implemented in JS; If we were to integrate the coverage collector directly in the test runner on the however we could support this.

I think implementing it in JS would be the cleaner implementation in the long run, for one the threading issue just goes away. Other things implemented in JS like the REPL are also in need of an inspector client for things like tab completion so it's somewhat inevitable that we'll end up with an internal inspector client in JS someday.

🤔

caspervonb

comment created time in 3 days

push eventcaspervonb/deno

Casper Beyer

commit sha 05b47d71f94434f45be0865ec832a35e21e9cbc5

Remove redundant wait for session This already gets called later on in execute

view details

push time in 4 days

delete branch caspervonb/wasi-test

delete branch : cargo-package

delete time in 5 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 4e4df3a9dc0e70048ed3e5ebc50595059119b398

Add none variation of std::env::args test This adds a variation of the std::env::args test where no arguments are provided.

view details

Casper Beyer

commit sha 96006ff1e9ca9ba01e4f15ad2d5d0b1ccb9d50e0

Add relative variants of std::fs tests This adds a set of relative variants of the std::fs tests for more extensive coverage of pre-opened directories.

view details

Casper Beyer

commit sha 96b1b0978c9b36d22e9ea008c1efaa81bb1e2963

Merge scratch directory into fixture directory This merges the scratch directory into the fixture directory, meaning that test runners are expected to set up a clean workspace for each test case copying the fixture directory into the working directory.

view details

Casper Beyer

commit sha b85ffd8b29a2839ec4683250758585e54cc71762

Add none variation of std::env::vars test This adds a variation of the std::env::vars test where no arguments are provided.

view details

push time in 5 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha ffb4d33dccfc87d40809f96996c511cd0cc0cb6b

Add none variation of std::env::vars test This adds a variation of the std::env::vars test where no arguments are provided.

view details

push time in 5 days

delete branch caspervonb/wasi-test

delete branch : test-std-env-vars-none

delete time in 5 days

PR merged caspervonb/wasi-test

Add none variation of std::env::vars test

This adds a variation of the std::env::vars test where no arguments are provided.

+9 -0

0 comment

2 changed files

caspervonb

pr closed time in 5 days

PR opened caspervonb/wasi-test

Add none variation of std::env::vars test

This adds a variation of the std::env::vars test where no arguments are provided.

+9 -0

0 comment

2 changed files

pr created time in 5 days

create barnchcaspervonb/wasi-test

branch : test-std-env-vars-none

created branch time in 5 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 5d49c94ebc2b7e3f39c8f2758a6672db1acec7a8

Merge scratch directory into fixture directory This merges the scratch directory into the fixture directory, meaning that test runners are expected to set up a clean workspace for each test case copying the fixture directory into the working directory.

view details

push time in 5 days

delete branch caspervonb/wasi-test

delete branch : merge-scratch-directory-into-fixtures-directory

delete time in 5 days

PR merged caspervonb/wasi-test

Merge scratch directory into fixture directory

This merges the scratch directory into the fixture directory, meaning that test runners are expected to set up a clean workspace for each test case copying the fixture directory into the working directory.

+67 -65

0 comment

17 changed files

caspervonb

pr closed time in 5 days

PR opened caspervonb/wasi-test

Merge scratch directory into fixture directory

This merges the scratch directory into the fixture directory, meaning that test runners are expected to set up a clean workspace for each test case copying the fixture directory into the working directory.

+67 -65

0 comment

17 changed files

pr created time in 5 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 55a0983b43d100484378c9461b9067b1d52bcf49

Add relative variants of std::fs tests This adds a set of relative variants of the std::fs tests for more extensive coverage of pre-opened directories.

view details

push time in 5 days

delete branch caspervonb/wasi-test

delete branch : std-test-fs-relative-variants

delete time in 5 days

PR merged caspervonb/wasi-test

Add relative variants of std::fs tests

This adds a set of relative variants of the std::fs tests for more extensive coverage of pre-opened directories.

Closes #16

+277 -0

0 comment

28 changed files

caspervonb

pr closed time in 5 days

issue closedcaspervonb/wasi-test

Don't assume pre-opened directories can be re-mapped

Currently the tests assume that pre-opened directories can be remapped, this isn't strictly required by implementations it's just a by-product of it being a useful and easy feature to implement with everything going through pre-opened directories.

We should change this to be plain pre-opened directories, e.g

// { "preopens": { "scratch": "scratch" } }

closed time in 5 days

caspervonb

PR opened caspervonb/wasi-test

Add relative variants of std::fs tests

This adds a set of relative variants of the std::fs tests for more extensive coverage of pre-opened directories.

+277 -0

0 comment

28 changed files

pr created time in 5 days

create barnchcaspervonb/wasi-test

branch : std-test-fs-relative-variants

created branch time in 5 days

issue commentdenoland/deno

feat: stdout.cursorTo()

Do we want to implement this as syscall ops or escape sequences?

Has been some grievance from users that escape sequences (std/fmt) don't work with (what I consider) outdated terminal emulators.

I think we reached a consensus that we won't go out of our way to support inferior terminal emulators on Windows since modern Windows does support it?

mikeal

comment created time in 5 days

issue commentdenoland/deno

[Feature Request] Public API for TTYs

Also related https://github.com/denoland/deno/issues/6738

AZMCode

comment created time in 5 days

issue commentdenoland/deno

[Feature Request] Public API for TTYs

What about the cursor positioning, terminal echo, and potentially other configs?

In the runtime, or in std as escape sequences?

AZMCode

comment created time in 5 days

issue commentdenoland/deno

[Discussion]: std/cli

"Standardizes" doesn't mean much to me here so if you wouldn't mind elaborating, the indent is to provide a mechanism for subcommands, it's option parsing, usage output and automatic help generation?

timreichen

comment created time in 5 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 86a8c7974cfe77468b1cd3279d9e192e35183fff

Add none variation of std::env::args test. This adds a variation of the std::env::args test where no arguments are provided.

view details

push time in 6 days

delete branch caspervonb/wasi-test

delete branch : test-std-env-args-empty-variation

delete time in 6 days

PR merged caspervonb/wasi-test

Add none variation of std::env::args test.

This adds a variation of the std::env::args test where no arguments are provided.

+11 -1

0 comment

2 changed files

caspervonb

pr closed time in 6 days

PR opened caspervonb/wasi-test

Add none variation of std::env::args test.

This adds a variation of the std::env::args test where no arguments are provided.

+11 -1

0 comment

2 changed files

pr created time in 6 days

create barnchcaspervonb/wasi-test

branch : test-std-env-args-empty-variation

created branch time in 6 days

push eventcaspervonb/wasi-test

push time in 6 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha a861e969bd5be30a1b122c683279061329044ce6

Allow multiple test cases per module This changes the prelude test case configuration format to be keyed on the entry point in order to allow multiple test cases per module.

view details

push time in 6 days

delete branch caspervonb/wasi-test

delete branch : allow-multiple-test-cases-per-module

delete time in 6 days

PR merged caspervonb/wasi-test

Allow multiple test cases per module

This changes the prelude test case configuration format to be keyed on the entry point in order to allow multiple test cases per module.

+86 -46

0 comment

21 changed files

caspervonb

pr closed time in 6 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 7919603f985f4bed0384565d7d5e6f260ddf0a96

Allow multiple test cases per module This changes the prelude test case configuration format to be keyed on the entry point in order to allow multiple test cases per module.

view details

push time in 6 days

PR opened caspervonb/wasi-test

Allow multiple test cases per module

This changes the prelude test case configuration format to be keyed on the entry point in order to allow multiple test cases per module.

+85 -45

0 comment

20 changed files

pr created time in 6 days

create barnchcaspervonb/wasi-test

branch : allow-multiple-test-cases-per-module

created branch time in 6 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha 5ace7a49c5b4acf2772d033b1dc137b14e64b8bb

Format json prelude This re-formats the json prelude from a single line to a multi-line block delimited by \n\n.

view details

push time in 6 days

delete branch caspervonb/wasi-test

delete branch : format-json-prelude

delete time in 6 days

PR merged caspervonb/wasi-test

Format json prelude

This re-formats the json prelude from a single line to a multi-line block delimited by \n\n.

+100 -20

0 comment

20 changed files

caspervonb

pr closed time in 6 days

PR opened caspervonb/wasi-test

Format json prelude

This re-formats the json prelude from a single line to a multi-line block delimited by \n\n.

+100 -20

0 comment

20 changed files

pr created time in 6 days

create barnchcaspervonb/wasi-test

branch : format-json-prelude

created branch time in 6 days

push eventcaspervonb/wasi-test

Casper Beyer

commit sha c83715c9a723e292362b4db017b322794e7f9539

Validate prelude is valid json during build step This passes the prelude through serde when generating spec files to ensure that the prelude is in-fact a valid json before writing it out to disk.

view details

push time in 6 days

delete branch caspervonb/wasi-test

delete branch : build-validate-json

delete time in 6 days

PR merged caspervonb/wasi-test

Validate prelude is valid json during build step

This passes the prelude through serde when generating spec files to ensure that the prelude is in-fact a valid json before writing it out to disk.

+7 -0

0 comment

2 changed files

caspervonb

pr closed time in 6 days

PR opened caspervonb/wasi-test

Validate prelude is valid json during build step

This passes the prelude through serde when generating spec files to ensure that the prelude is in-fact a valid json before writing it out to disk.

+7 -0

0 comment

2 changed files

pr created time in 6 days

create barnchcaspervonb/wasi-test

branch : build-validate-json

created branch time in 6 days

Pull request review commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.++#![allow(unused)]++use crate::futures::SinkExt;+use crate::futures::StreamExt;+use crate::tokio_util;+use deno_core::ErrBox;+use serde::Deserialize;+use serde::Serialize;+use url::Url;++pub struct CoverageCollector {+  socket: tokio_tungstenite::WebSocketStream<tokio::net::TcpStream>,+}++// TODO(caspervonb) do not hard-code message ids.+// TODO yield then await each command response after sending the request.

Right, but then you need to receive messages from inspector for each sent message

The two TODO's tie together somewhat, e.g each socket send will loop awaiting the next response, breaking when a response with the sent id is received then error checking the result.

I believe inspector can send other messages as well which should be ignored.

It can.

Enabling a domain (e.g calling the Runtime.enable method) will enable event notifications for that domain. Events do not carry identifiers however so this doesn't interfere with the above.

caspervonb

comment created time in 7 days

Pull request review commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

 async fn test_command(       .filter(|e| e.url.contains(cwd.as_os_str().to_str().unwrap()))       .collect::<Vec<ScriptCoverage>>(); -    // TODO(caspervonb) print a summary report to console     // TODO(caspervonb) add support for lcov output (see geninfo(1) for format spec).+    println!("test coverage:"); -    write_json_to_stdout(&filtered_coverage)?;+    for script in filtered_coverage {+      let url = Url::parse(&script.url)?;+      let path = url.to_file_path().unwrap();+      let source = tokio::fs::read_to_string(&path).await?;++      let mut total = 0;+      let mut covered = 0;++      let mut offset = 0;+      for line in source.lines() {+        let line_start_offset = offset;+        let line_end_offset = line_start_offset + line.len();

Appears that we need to look these up in the source map.

Should probably also use the source fetcher instead of tokio here.

caspervonb

comment created time in 7 days

Pull request review commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.++#![allow(unused)]++use crate::futures::SinkExt;+use crate::futures::StreamExt;+use crate::tokio_util;+use deno_core::ErrBox;+use serde::Deserialize;+use serde::Serialize;+use url::Url;++pub struct CoverageCollector {+  socket: tokio_tungstenite::WebSocketStream<tokio::net::TcpStream>,+}++// TODO(caspervonb) do not hard-code message ids.+// TODO yield then await each command response after sending the request.

Don't need anything particularly fancy for this in this case, just increment by one per message is fine.

Long term for the REPL etc yeah we'll definitively want a full blown inspector client.

caspervonb

comment created time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha 03aaa9d438e66e7a2bf32ff2c8315a174094564c

Fix lint

view details

push time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha 703216976039b8a1b68515f2984a27923dce9d79

Print a basic line coverage report

view details

push time in 7 days

issue commentdenoland/deno

Plugin Op call time

Tried out a release build on Ubuntu.

deno run --allow-plugin --unstable --allow-hrtime mod.ts
Check file:///home/caspervonb/deno-rust-plugin/mod.ts
Custom Ops
┌───────┬─────────────────┬────────────────┬─────────────────┐
│ (idx) │        0        │       1        │        2        │
├───────┼─────────────────┼────────────────┼─────────────────┤
│   0   │ "custom plugin" │ "customSyncOp" │ "customAsyncOp" │
│   1   │        3        │       83       │       84        │
└───────┴─────────────────┴────────────────┴─────────────────┘


Pure Sync Op call duration (ms)
┌───────┬──────────────────────┬──────────────────────┬────────────────────┐
│ (idx) │          0           │          1           │         2          │
├───────┼──────────────────────┼──────────────────────┼────────────────────┤
│   0   │        "Min"         │        "Avg"         │       "Max"        │
│   1   │ 0.004852000000028056 │ 0.007713939000000132 │ 1.7817680000000564 │
└───────┴──────────────────────┴──────────────────────┴────────────────────┘
playerx

comment created time in 7 days

Pull request review commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

 fn test_subcommand<'a, 'b>() -> App<'a, 'b> {         .takes_value(true)         .help("Run tests with this string or pattern in the test name"),     )+    .arg(+      Arg::with_name("cover")

Initially went with Go's flag naming but no strong opinion either way.

caspervonb

comment created time in 7 days

pull request commentdenoland/deno

BREAKING refactor(std/path): Rename some symbols

so there is precedence.

Asa mentioned in #6829, there's a strong precedence, not only Node but also Python, Go, PHP, Ruby, etc.

What if we just broke completely here and introduced a path object with these new properties? effectively reimplementing Rust's std::path::Path

nayeemrmn

comment created time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha 961fcd2a86a0d1f5a73e4513a2c32af6b43065f5

Run tools/format.py

view details

push time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha e71444fc100257860a75391ebe8c3c0d75628f3d

Make --coverage require --inspect in clap

view details

push time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha 292afc68e8aef214aab0ecf926c5761ce15bef1e

Request call count from precise coverage

view details

Casper Beyer

commit sha 15c592aa669d02616154730462b1be19ca2e7eeb

s/cover/coverage/

view details

push time in 7 days

push eventcaspervonb/deno

Casper Beyer

commit sha 79e2ffabb65c5295e8060ea55687a085a0cf75f1

Lint

view details

Casper Beyer

commit sha c8e4906bc194d4bea179dc9e1d32950fa1ebdc86

Write filtered script coverage to stdout as json

view details

push time in 8 days

pull request commentdenoland/deno

[WIP] feat(cli): add cover option to the test command

@caspervonb Would it be something similar to coverage in jest?

Not sure what jest does but this collects block based call coverage directly from the runtime.

Output formats to be determined but lcov is fairly obvious as it's a ubiquitous format.

caspervonb

comment created time in 8 days

push eventcaspervonb/deno

Casper Beyer

commit sha 0a3607a5c44e0bc31af8dea1f134a2b2889e5c42

run tools/format.py

view details

push time in 8 days

PR opened denoland/deno

[WIP] feat(cli): add cover option to the test command
+297 -97

0 comment

4 changed files

pr created time in 8 days

push eventcaspervonb/deno

Casper Beyer

commit sha 33431d685a0b79165e44a48e02ab79fedd559555

feat(cli): add cover option to the test command

view details

push time in 8 days

Pull request review commentdenoland/deno

feat(std/async): add asyncPool utility

+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.++// From https://github.com/rxaviers/async-pool/blob/master/lib/es7.js.+// Copyright (c) 2017 Rafael Xavier de Souza http://rafael.xavier.blog.br+// Licensed under MIT++/**+ * asyncPool is like Promise.all(array.map(async () => {...})), except that you+ * can specify the maximum amount of items being processed concurrently.+ * + * @param poolLimit The maximum count of items being processed concurrently. + * @param array The input array for mapping.+ * @param iteratorFn The function to call for every item of the array.+ */+export async function asyncPool<T, R>(

Do we need to prefix this with async?

export async function pool<T, R>(
lucacasonato

comment created time in 8 days

issue commentWebAssembly/WASI

Is WASI already usable on Android?

That's Android limitations right? Would I have those limitations on Linux?

Limitation of the ABI, we only provide syscalls for filesystem i/o, clocks, and some miscellany.

bbigras

comment created time in 9 days

issue commentdenoland/deno

Inability to pass complex data to Workers

See https://github.com/denoland/deno/issues/3557

00ff0000red

comment created time in 9 days

pull request commentdenoland/deno

fix(std/fs): Make writeJson func create a POSIX compliant file

What does it mean to be POSIX compliant?

Relevant sections from https://pubs.opengroup.org/onlinepubs/009695399

3.205 Line

A sequence of zero or more non- <newline>s plus a terminating <newline>.


3.238 Newline Character (<newline>)

A character that in the output stream indicates that printing should start at the beginning of the next line. It is the character designated by '\n' in the C language. It is unspecified whether this character is the exact sequence transmitted to an output device by the system to accomplish the movement to the next line.


3.392 Text File

A file that contains characters organized into one or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the <newline>. Although IEEE Std 1003.1-2001 does not distinguish between text files and binary files (see the ISO C standard), many utilities only produce predictable or meaningful output when operating on text files. The standard utilities that have such restrictions always specify "text files" in their STDIN or INPUT FILES sections.


tranzystorek-io

comment created time in 10 days

issue commentdenoland/deno

Add commit style to contributing docs

Ideally we would have a lint-like service that could check the commit message before it lands in master. Ideally we could review commit messages. Unfortunately it seems like the github workflow doesn't operate like that.

Indeed, GitHub's not including the commit message in the merge request is an annoying limitation. Gerrit and friends do this part much better.

But regardless of the short comings of the tooling, as a first step documenting the preferred style with some examples of 'good' and bad couldn't hurt?

caspervonb

comment created time in 10 days

issue commentdenoland/deno

error: The subcommand 'run' wasn't recognized. Did you mean 'run'?

@caspervonb If you're referring to the placement of --quiet, it's a global flag so putting it before the subcommand does work: deno --quiet run mod.ts.

Was referring to the placement of the subcommand; anything after -- is conventionally positional args given to the invoked command, as is the case here.

So this works as I'd expect based on the usage message, error message from clap could be a bit clearer however.

fritzblue

comment created time in 11 days

issue commentdenoland/deno

error: The subcommand 'run' wasn't recognized. Did you mean 'run'?

Ignoring the parsing details of clap, the usage says this is invalid.

USAGE:
    deno run [OPTIONS] <SCRIPT_ARG>...
fritzblue

comment created time in 11 days

create barnchcaspervonb/deno

branch : feat-test-coverage

created branch time in 12 days

Pull request review commentdenoland/deno

v1.2.1

 https://github.com/denoland/deno/releases We also have one-line install commands at https://github.com/denoland/deno_install +### 1.2.1 / 2020.07.23++Changes in the CLI:++- fix: IPv6 hostname should be compressed (#6772)+- fix: Ignore polling errors caused by return() in watchFs (#6785)+- fix: Improve URL compatibility (#6807)+- fix: ModuleSpecifier removes relative path parts (#6762)+- fix: Share reqwest client between fetch calls (#6792)+- fix: add icon and metadata to deno.exe on Windows (#6693)+- fix: panic for runtime error in TS compiler (#6758)+- fix: providing empty source code for missing compiled files (#6760)+- refactor: Make OpDispatcher a trait (#6736, #6742)+- refactor: Remove duplicate code and allow filename overwrite for DomFile+  (#6817, #6830)+- upgrade: Rust 1.45.0 (#6791)+- upgrade: rusty_v8 0.7.0 (#6801)+- upgrade: tokio 0.2.22 (#6838)++Changes in std version 0.62.0:++- BREAKING(std/fs): remove readFileStr and writeFileStr (#6848, #6847)+- feat(std/encoding): add ascii85 module (#6711)+- feat(std/node): add string_decoder (#6638)+- fix(std/encoding/toml): could not parse strings with apostrophes/semicolons+  (#6781)+- fix(std/fs): remove unexisted imports (#6850)

Not really a fix to anything that was ever released, it's just fixup that should have been to #6848, #6847 😄

ry

comment created time in 12 days

issue commentdenoland/deno

await Deno.stdout.write doesn't resolve when called in rapid succession

I think it must be something wrong with that poll_flush, because first run the println!("{}", nwritten); corresponding to 'hello, ' did not run which was must been blocked by poll_flush

Pretty sure this would deadlock even with just two pairs poll_write and await in succession.

luke-john

comment created time in 12 days

issue commentdenoland/deno

Is there native solution or any working `prompt` module for Deno v1.2.0?

Made this as an example a bit while back; https://deno.land/x/prompts

Jax-p

comment created time in 12 days

issue commentdenoland/deno

deno run can not running the following code, that's should be valid

In the script environment (i.e, REPL) it does work tho.

lygstate

comment created time in 13 days

issue commentdenoland/deno

deno run can not running the following code, that's should be valid

Hm I got this with deno run.

error: Expected 2 hex characters at file:///home/caspervonb/6854.ts:3:51

lygstate

comment created time in 13 days

issue commentdenoland/deno

await Deno.stdout.write doesn't resolve when called in rapid succession

Does this problem persist?

Unfortunately yes, this is reproducible with b573bbe4471c3872f96e1d7b9d1d1a2b39ff4cf1 as-well.

luke-john

comment created time in 13 days

issue commentdenoland/deno

await Deno.stdout.write doesn't resolve when called in rapid succession

From what I've gathered so far this was introduced by https://github.com/denoland/deno/issues/3565. Removing the flush fixes this and works locally but breaks the CI 🤔

luke-john

comment created time in 13 days

push eventcaspervonb/deno

Casper Beyer

commit sha 89feecc45076d54976fab1eb29a973cc116e782d

fixup

view details

push time in 13 days

create barnchcaspervonb/deno

branch : fix-cli-write-deadlock-2

created branch time in 13 days

push eventcaspervonb/deno

Ryan Dahl

commit sha 69706331a590edceb49eae58835abd54b39878c2

clean up set_binary_metadata (#6811)

view details

Ryan Dahl

commit sha f8695b493dff3c4daee6e9f6b948a55810d2d0fa

Add web APIs to cli/js2/README.md (#6842)

view details

Casper Beyer

commit sha 587eefe7736efe70532124ca4ac93899f4ffbb8c

test(cli/unit): remove rogue console.log statement (#6846)

view details

Bartek Iwańczuk

commit sha b573bbe4471c3872f96e1d7b9d1d1a2b39ff4cf1

upgrade: tokio 0.2.22 (#6838)

view details

Casper Beyer

commit sha 843b54549c04337f18c62d1daf159a79865de6b7

BREAKING(std/fs): remove writeFileStr and writeFileStrSync (#6847) This removes the writeFileStr and writeFileStrSync functions which are effectivly duplicates of Deno.writeTextFile and Deno.writeTextFileSync.

view details

Casper Beyer

commit sha fd900cfe215e919392941b39b57a16b4a9976eec

BREAKING(std/fs): remove readFileStr and readFileStrSync (#6848) This removes the readFileStr and readFileStrSync functions which are effectively duplicates of Deno.readTextFile and Deno.readTextFileSync.

view details

Gerald

commit sha e18e46a3b3f734d1c848b80a16d11810597b49f4

fix(std/fs): remove unexisted imports (#6850)

view details

Casper Beyer

commit sha 0f0106443154fa682c10868d868d607d250da4c7

fix(cli): deadlock when multiple writes are racing with Promise.all

view details

push time in 13 days

push eventcaspervonb/deno

Ryan Dahl

commit sha 69706331a590edceb49eae58835abd54b39878c2

clean up set_binary_metadata (#6811)

view details

Ryan Dahl

commit sha f8695b493dff3c4daee6e9f6b948a55810d2d0fa

Add web APIs to cli/js2/README.md (#6842)

view details

Casper Beyer

commit sha 587eefe7736efe70532124ca4ac93899f4ffbb8c

test(cli/unit): remove rogue console.log statement (#6846)

view details

Bartek Iwańczuk

commit sha b573bbe4471c3872f96e1d7b9d1d1a2b39ff4cf1

upgrade: tokio 0.2.22 (#6838)

view details

Casper Beyer

commit sha 843b54549c04337f18c62d1daf159a79865de6b7

BREAKING(std/fs): remove writeFileStr and writeFileStrSync (#6847) This removes the writeFileStr and writeFileStrSync functions which are effectivly duplicates of Deno.writeTextFile and Deno.writeTextFileSync.

view details

Casper Beyer

commit sha fd900cfe215e919392941b39b57a16b4a9976eec

BREAKING(std/fs): remove readFileStr and readFileStrSync (#6848) This removes the readFileStr and readFileStrSync functions which are effectively duplicates of Deno.readTextFile and Deno.readTextFileSync.

view details

Gerald

commit sha e18e46a3b3f734d1c848b80a16d11810597b49f4

fix(std/fs): remove unexisted imports (#6850)

view details

push time in 13 days

push eventcaspervonb/deno

Casper Beyer

commit sha 3ae2044708174c8d7d8ce29831219e4fe47da8ba

fix(cli): deadlock when multiple writes are racing with Promise.all

view details

push time in 13 days

create barnchcaspervonb/deno

branch : fix-cli-write-await-all-deadlock

created branch time in 13 days

issue commentdenoland/deno

std/fs/mod.ts is broken

@caspervonb You forgot to to delete the imports to the removed modules in std/fs/mod.ts.

Ops, yeah should be make sure we're importing mod.ts in test.ts for every std module that has one.

gera2ld

comment created time in 13 days

PR closed denoland/deno

fix(std/fs): remove re-exports of readFileStr, readFileStrSync, writeFileStr and writeFileStrSync

The modules write_file_str.ts and read_file_str.ts have been removed in #6847 and #6848 respectively but the mod.ts file still re-exports them as I forgot about it.

This removes the offending exports and adds a test that imports mod.ts to ensure it doesn't occur again in the future.

Closes #6849

+1 -2

0 comment

2 changed files

caspervonb

pr closed time in 13 days

PR opened denoland/deno

fix(std/fs): remove re-exports of readFileStr, readFileStrSync, writeFileStr and writeFileStrSync

The modules write_file_str.ts and read_file_str.ts have been removed in #6847 and #6848 respectively but the mod.ts file still re-exports them as I forgot about it.

This removes the offending exports and adds a test that imports mod.ts to ensure it doesn't occur again in the future.

Closes #6849

+1 -2

0 comment

2 changed files

pr created time in 13 days

push eventcaspervonb/deno

Casper Beyer

commit sha 036644d74ef8c9dc5dd225547f1e43f6ced57f8e

Remove re-exports of legacy modules The modules write_file_str.ts and read_file_str.ts have been removed but the mod.ts file still re-exports them. This removes the offending exports and adds a test that imports mod.ts to ensure it doesn't occur again in the future.

view details

push time in 13 days

create barnchcaspervonb/deno

branch : std-fs-remove-legacy-exports

created branch time in 13 days

pull request commentdenoland/deno

BREAKING CHANGE(std/fs): remove readFileStr and readFileStrSync

Could have combine it in the last PR

Yeah thought about it, title would have been on the really long side however so opted for a new PR 😏

caspervonb

comment created time in 13 days

more