summaryrefslogtreecommitdiff
path: root/cli/worker.rs
AgeCommit message (Collapse)Author
2020-09-17refactor: move op_resources and op_close to deno_core (#7539)Bartek Iwańczuk
Moves op_close and op_resources to deno_core::ops and exports them. Adds serde dependency to deno_core and reexports it. Moves JS implementation of those ops to Deno.core and reexports them in Deno.
2020-09-16Re-export deno_core::url (#7525)Ryan Dahl
Also re-exports deno_core::futures and deno_core::serde_json but these are not yet used in the CLI.
2020-09-15Remove http_client from CliState, store in OpState directly (#7497)Ryan Dahl
2020-09-14refactor(core): remove JsRuntime::set_js_error_create_fn (#7478)Bartek Iwańczuk
Instead use RuntimeOptions.js_error_create_fn
2020-09-14Rename deno::state::State to deno::state::CliState (#7480)Ryan Dahl
2020-09-15refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)Bert Belder
2020-09-11refactor(core): JsRuntime initialization (#7415)Bartek Iwańczuk
Removes: - "deno_core::StartupData" - "deno_core::Script" - "deno_core::OwnedScript" Changes to "JsRuntime": - remove "new_with_loader()" - remove "with_heap_limits()" - rename "IsolateOptions" to "RuntimeOptions" and make public - "JsRuntime::new()" takes "RuntimeOptions" as a single param
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc<RefCell<OpState>>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState
2020-09-06refactor(core): rename CoreIsolate to JsRuntime (#7373)Bartek Iwańczuk
deno_core/ - rename core_isolate.rs to runtime.rs - rename CoreIsolate to JsRuntime - rename JSError to JsError - rename JSStackFrame to JsStackFrame cli/ - update references from deno_core::CoreIsolate to deno_core::JsRuntime - rename deno_core::JSError to deno_core::JsError - rename fmt_errors::JSError to fmt_errors::JsError
2020-09-06refactor(core): merge CoreIsolate and EsIsolate (#7370)Bartek Iwańczuk
2020-09-06Move JSON ops to deno_core (#7336)Bert Belder
2020-09-05feat: Implement WebSocket API (#7051)crowlKats
2020-08-26Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195)Bert Belder
2020-08-26refactor: remove OpError, use ErrBox everywhere (#7187)Bert Belder
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-08-19Make Rc/Arc wrapper around State/GlobalState visible (#7104)Bert Belder
2020-08-10Remove unnecessary drop calls (#7007)Ryan Dahl
2020-07-10fix(URL): Implement spec-compliant host parsing (#6689)Nayeem Rahman
2020-07-09fix(cli): panic when stdio is null on windows (#6528)Maayan Hanin
Fixes: #6409
2020-06-18chore(test): move testing utilities to test_util crate (#6360)Bartek Iwańczuk
2020-06-01Move create_main_worker to MainWorker::create (#6034)Ryan Dahl
2020-05-29refactor: Split isolate and state using safe get_slot() (#5929)Ryan Dahl
2020-05-29refactor: TS compiler and module graph (#5817)Bartek Iwańczuk
This PR addresses many problems with module graph loading introduced in #5029, as well as many long standing issues. "ModuleGraphLoader" has been wired to "ModuleLoader" implemented on "State" - that means that dependency analysis and fetching is done before spinning up TS compiler worker. Basic dependency tracking for TS compilation has been implemented. Errors caused by import statements are now annotated with import location. Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-05-25fix: BorrowMutError when evaluating expression in inspector console (#5822)Bert Belder
Note that this does not fix the 'Uncaught ReferenceError' issue that happens when 'eager evaluation' is enabled in the inspector. Fixes: #5807
2020-05-17Return error if more than one listener calls `WorkerHandle::get_event()` (#5461)Yiyu Lin
2020-05-14Fix typos across the repo (#5295)Dante Calderón
Corrections made: * cli/js/tests/README.md:44:7: corrected "discoveres" to "discovers" * cli/js/tests/chown_test.ts:111:37: corrected "priviledge" to "privilege" * cli/worker.rs:231:56: corrected "decendants" to "descendants" * deno_typescript/lib.rs:136:50: corrected "emmited" to "emitted" * core/es_isolate.rs:492:67: corrected "registerd" to "registered" * core/isolate.rs:103:28: corrected "initalize" to "initialize" * docs/runtime.md:29:14: corrected "ect" to "etc" * docs/tools/debugger.md:122:16: corrected "implementes" to "implements" * std/encoding/_yaml/dumper/dumper_state.ts:57:63: corrected "everwhere" to "everywhere" * std/encoding/csv.ts:37:43: corrected "referal" to "referral" * std/fmt/sprintf.ts:209:20: corrected "unusuable" to "unusable" * std/fmt/README.md:21:40: corrected "Alternativly" to "Alternatively" * std/fmt/README.md:35:68: corrected "seperated" to "separated" * std/fmt/README.md:179:59: corrected "provded" to "provided" * std/mime/multipart.ts:581:46: corrected "writen" to "written" * std/path/_globrex.ts:19:52: corrected "equivelant" to "equivalent" * std/node/events_test.ts:447:9: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:475:9: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:500:29: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:530:40: corrected "asyncronous" to "asynchronous" * std/node/events_test.ts:555:9: corrected "asyncronous" to "asynchronous" * tools/deno_tcp_proxy.ts:1:42: corrected "perfromance" to "performance" * std/node/module.ts:1003:18: corrected "existend" to "existed"
2020-05-13Make --inspect-brk pause on the first line of _user_ code (#5250)Bert Belder
2020-05-11Change plugin interface to prevent segfaults when unloading plugin (#5210)Bert Belder
Fixes: #3473 Closes: #5193
2020-04-25remove bootstrap methods from global scope after bootstrapping (#4869)Bartek Iwańczuk
2020-04-21Move resource_table from deno::State to deno_core::Isolate (#4834)Ryan Dahl
2020-04-19Modify op dispatcher to include &mut Isolate argument (#4821)Ryan Dahl
- Removes unnecessary RwLock and Rc around the op registry table - Preparation to move resource_table to deno_core::Isolate. - Towards #3453, #4222
2020-04-18store debugger url on DenoInspector (#4793)Bartek Iwańczuk
2020-04-16remove more calls to futures::executor::block_on (#4775)Bartek Iwańczuk
2020-04-10implement Worker.terminate() and self.close() (#4684)Bartek Iwańczuk
2020-04-03clippy (#4618)Kitson Kelly
2020-04-03Make inspector more robust, add --inspect-brk support (#4552)Bert Belder
2020-03-27feat: Support Inspector / Chrome Devtools (#4484)Ryan Dahl
This is a first pass implementation which is still missing several important features: - support for --inspect-brk (#4503) - support for source maps (#4501) - support for piping console.log to devtools console (#4502) Co-authored-by: Bert Belder <bertbelder@gmail.com> Co-authored-by: Matt Harrison <mt.harrison86@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-03-07refactor: remove cli/ops/files.rs (#4246)Bartek Iwańczuk
* "op_close" - moved to "cli/ops/resources.rs" * "op_seek", "op_open" - moved to "cli/ops/fs.rs" Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-02Do not convert exceptions to JSON and back (#4214)Bert Belder
2020-02-26DenoFlags -> Flags (#4136)Ryan Dahl
2020-02-26tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)Kevin (Kun) "Kassimo" Qian
2020-02-21feat: Deno.fsEvents() (#3452)Bartek Iwańczuk
2020-02-18refactor: cleanup cli/lib.rs (#4006)Bartek Iwańczuk
* rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs
2020-02-15refactor: replace Arc<Box<..>> with Rc<..> (#3996)Bartek Iwańczuk
2020-02-11refactor: Remove atomics from metrics (#3968)Bartek Iwańczuk
* replace "AtomicUsize" with "u64" for field type on "Metrics" * move "compiler_starts" field from "Metrics" to "GlobalState"
2020-02-11workers: basic event loop (#3828)Bartek Iwańczuk
* establish basic event loop for workers * make "self.close()" inside worker * remove "runWorkerMessageLoop() - instead manually call global function in Rust when message arrives. This is done in preparation for structured clone * refactor "WorkerChannel" and use distinct structs for internal and external channels; "WorkerChannelsInternal" and "WorkerHandle" * move "State.worker_channels_internal" to "Worker.internal_channels" * add "WorkerEvent" enum for child->host communication; currently "Message(Buf)" and "Error(ErrBox)" variants are supported * add tests for nested workers * add tests for worker throwing error on startup
2020-02-08refactor: rename ThreadSafeState, use RefCell for mutable state (#3931)Bartek Iwańczuk
* rename ThreadSafeState to State * State stores InnerState wrapped in Rc and RefCell
2020-02-06Rename ThreadSafeGlobalState to GlobalState (#3907)Ryan Dahl
simplify
2020-02-05Move create_channels into worker constructor (#3889)Ryan Dahl
2020-02-04refactor: CLI subcommands and argv (#3886)Bartek Iwańczuk
2020-02-03refactor: Use Tokio's single-threaded runtime (#3844)Ryan Dahl
This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers