Commit graph

139 commits

Author SHA1 Message Date
Bartek Iwańczuk bca5cc5041 Move ModuleSpecifier to //core (#2509) 2019-06-12 16:55:59 -07:00
Bartek Iwańczuk b3c4307d02 Refactor module resolving (#2493)
Adds ModuleSpecifier, which wraps a URL. This is now passed around instead of
specifier and resolver strings.
2019-06-12 12:00:08 -07:00
Ryan Dahl 2a5138a516
Remove Config struct from core (#2502)
It's unnecessary indirection and is preventing the ability to easily
pass isolate references into the dispatch and dyn_import closures.

Note: this changes how StartupData::Script is executed. It's no longer done
during Isolate::new() but rather lazily on first poll or execution.
2019-06-12 10:53:24 -07:00
Gurwinder S 7fc3d5ed8b Removed unused method and update docs (#2499) 2019-06-11 16:09:31 -04:00
Ryan Dahl 912e4f7177
feat: default output filename for deno bundle (#2484)
And improve bundle docs
2019-06-11 14:38:19 -04:00
Ryan Dahl de8c85f8f2
Move Modules to ThreadSafeState (#2498) 2019-06-11 14:35:03 -04:00
Matt Harrison d82c1991cf Add --seed for setting RNG seed (#2483) 2019-06-11 10:34:39 -04:00
Ryan Dahl 523ab6a929
Upgrade V8 to 7.7.37 (#2492) 2019-06-10 18:49:30 -04:00
Neil Richter 163d60bf16 typo (#2489) 2019-06-10 09:20:19 -04:00
Bartek Iwańczuk a115340288 feat: Import maps (#2360) 2019-06-09 09:08:20 -04:00
Ryan Dahl d60bdb6350 v0.8.0 2019-06-08 15:16:34 -04:00
Kitson Kelly 307e092753 Add 'bundle' subcommand. (#2467) 2019-06-08 14:42:28 -04:00
gurv-s 35f879ad32 Remove tokio_util::block_on dep in compile_async and other cleanup 2019-06-08 10:59:20 -04:00
gurv-s 95eac608a6 Make print_file_info async 2019-06-08 10:59:20 -04:00
gurv-s 564222bc10 make op_create_worker async internally 2019-06-08 10:59:20 -04:00
gurv-s c0b28dc224 Use static dispatch 2019-06-08 10:59:20 -04:00
Kitson Kelly e3b2205eba Cleanup compiler API (#2466) 2019-06-06 20:37:26 -04:00
Ryan Dahl e152dae006
RecursiveLoad shouldn't own the Isolate (#2453)
This patch makes it so that RecursiveLoad doesn't own the Isolate, so
Worker::execute_mod_async does not consume itself.

Previously Worker implemented Loader, but now ThreadSafeState does.

This is necessary preparation work for dynamic import (#1789) and import
maps (#1921)
2019-06-05 16:35:38 -04:00
Bartek Iwańczuk 6fa4d2e759 feat: bring back deno <script> (#2451) 2019-06-05 13:44:46 -04:00
Kitson Kelly a71305b4fe Handle compiler diagnostics in Rust (#2445) 2019-06-04 09:03:56 -04:00
Gurwinder S bbc8de0c7a Fix typo (#2443) 2019-06-02 14:23:36 -04:00
Yoshiya Hinosawa 79f770b178 fmt: add --stdout option (#2439) 2019-06-01 08:54:32 -04:00
Bert Belder 1540b36ce7
third_party: upgrade rust crates 2019-05-30 11:28:05 -07:00
Axetroy 4c80394f54 bump std/prettier@0.5.0 to std/prettier@0.7.0 (#2425) 2019-05-30 08:35:42 -04:00
Ryan Dahl 5265bd7cb1 v0.7.0 2019-05-29 18:42:49 -04:00
Ryan Dahl 856c44213b TS compiler refactor
* Compiler no longer has its own Tokio runtime. Compiler handles one
  message and then exits.

* Uses the simpler ts.CompilerHost interface instead of
  ts.LanguageServiceHost.

* avoids recompiling the same module by introducing a hacky but simple
  `hashset<string>` that stores the module names that have been already
  compiled.

* Removes the CompilerConfig op.

* Removes a lot of the mocking stuff in compiler.ts like `this._ts`. It
  is not useful as we don't even have tests.

* Turns off checkJs because it causes fmt_test to die with OOM.
2019-05-29 07:53:39 -04:00
Ryan Dahl 53b6356ec5 Correct tokio_util::block_on() and op_fetch_module_meta_data
op_fetch_module_meta_data is an op that is used by the TypeScript
compiler. TypeScript requires this op to be sync. However the
implementation of the op does things on the event loop (like fetching
HTTP resources).

In certain situations this can lead to deadlocks. The runtime's thread
pool can be filled with ops waiting on the result of
op_fetch_module_meta_data. The runtime has a maximum number of
threads it can use (the number of logical CPUs on the system).

This patch changes tokio_util::block_on to launch a new Tokio runtime
for evaluating the future, thus bipassing the max-thread problem.

This is only an issue in op_fetch_module_meta_data. Other synchronous
ops are truly synchornous, not interacting with the event loop.  TODO
comments are added to direct future development.
2019-05-29 07:53:39 -04:00
Adam Conrad 9fd4096235 add EventTarget implementation (#2377) 2019-05-27 09:20:34 -04:00
Bartek Iwańczuk 73ac5f89f0 add module and line no for Rust logger (#2409) 2019-05-25 19:23:47 +03:00
ztplz 86684799c4 typo (#2366) 2019-05-24 14:36:50 +03:00
Bartek Iwańczuk 1105982586 re-fix permissions for dial and listen (#2400)
Closes #2397
2019-05-23 23:47:55 +03:00
Ryan Dahl f92af3576a
Improve CLI help (#2388) 2019-05-23 21:57:44 +03:00
Ryan Dahl 583a646be7
Fix concurrent accepts (#2403) 2019-05-23 21:22:52 +03:00
Ryan Dahl 2952fb5405
Rename --allow-high-precision to --allow-hrtime (#2398) 2019-05-23 19:28:29 +03:00
Bert Belder 7d03a63ded
Revert "Fix permissions for dial and listen (#2373)"
This reverts commit 7219787894.
2019-05-22 19:47:15 -07:00
Bartek Iwańczuk 880265275f Use tagged version of prettier in CLI (#2387) 2019-05-21 15:39:50 -04:00
Ryan Dahl 22feb74ba1 v0.6.0 2019-05-20 15:22:08 -04:00
Bartek Iwańczuk 7219787894 Fix permissions for dial and listen (#2373) 2019-05-17 14:50:53 -04:00
chiefbiiko 00f6fa46b3 Add crypto.getRandomValues() (#2327) 2019-05-17 14:03:01 -04:00
Bartek Iwańczuk 7f6549532c Don't print new line if progress bar was not used (#2374) 2019-05-17 12:35:29 -04:00
Bert Belder 3ff240b963
third_party: add rust crate 'serde_derive' 2019-05-16 20:51:47 -07:00
Bert Belder e9c9d71633
third_party: upgrade rust crates 2019-05-16 20:43:23 -07:00
Bert Belder 3d6f0a85af
build: add support for rust proc-macro crates 2019-05-16 20:33:25 -07:00
Bert Belder 6e7ccf0b49
tools: format .gn files in the 'cli' directory 2019-05-16 19:57:31 -07:00
Daiki Ihara 9c9c58c84d Add permission whitelist docs (#2365) 2019-05-16 10:39:19 -04:00
Yoshiya Hinosawa 6a5893a269 fmt: use --write option of prettier/main.ts (#2363)
This is step 1 of the plan outlined here:
https://github.com/denoland/deno/issues/2090#issuecomment-492897028
2019-05-16 10:11:35 -04:00
Ryan Dahl e02d8bcf18 Remove FileInfo.path 2019-05-15 21:14:17 -04:00
diskkid 2508480465 Add error handling to dispatch_minimal::ops::read/write (#2349) 2019-05-15 14:50:54 -04:00
Ryan Dahl a00fa7056b
Fix command in docs (#2353) 2019-05-14 15:23:56 -04:00
Ryan Dahl 23aca36d52 v0.5.0 2019-05-11 17:19:21 -04:00