Age | Commit message (Collapse) | Author |
|
Note cli/dispatch_minimal.rs ops are not yet included in cli/ops.
This is part of work towards #2730
|
|
|
|
|
|
|
|
Removes the magic number hack to switch between flatbuffers and the
minimal dispatcher.
Adds machinery to pass the op_id through the shared_queue.
|
|
And throws without allow-env
|
|
|
|
|
|
|
|
|
|
|
|
* merge SourceFileFetcher trait and FileFetcher struct
* move logic related to source file fetching to //cli/file_fetcher.rs
* use Result when creating new ThreadSafeState
|
|
|
|
* rename `ModuleMetaData` to `SourceFile` and remove TS specific
functionality
* add `TsCompiler` struct encapsulating processing of TypeScript files
* move `SourceMapGetter` trait implementation to `//cli/compiler.rs`
* add low-level `DiskCache` API for general purpose caches and use it in
`DenoDir` and `TsCompiler` for filesystem access
* don't use hash-like filenames for compiled modules, instead use
metadata file for storing compilation hash
* add `SourceFileCache` for in-process caching of loaded files for fast
subsequent access
* define `SourceFileFetcher` trait encapsulating loading of local and
remote files and implement it for `DenoDir`
* define `use_cache` and `no_fetch` flags on `DenoDir` instead of using
in fetch methods
|
|
This is in preperation for dynamic import (#1789), which is more easily
implemented when errors are dynamic.
|
|
|
|
The rules are now as follows:
* In `import` statements, as mandated by the WHATWG specification,
the import specifier is always treated as a URL.
If it is a relative URL, it must start with either / or ./ or ../
* A script name passed to deno as a command line argument may be either
an absolute URL or a local path.
- If the name starts with a valid URI scheme followed by a colon, e.g.
'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a
URL (even if Deno doesn't support the indicated protocol).
- Otherwise, the script name is interpreted as a local path. The local
path may be relative, and operating system semantics determine how
it is resolved. Prefixing a relative path with ./ is not required.
|
|
|
|
This avoids freezing the current task if the fn blocks indefinitely
|
|
|
|
|
|
Replaces -D/--log-debug flag with --log-level=debug
--log-level=info displays permission access
|
|
|
|
|
|
|
|
|
|
Due to performance regression:
https://github.com/denoland/deno/commit/dc60fe9f300043f191286ef804a365e16e455f87#commitcomment-33943711
This reverts commit dc60fe9f300043f191286ef804a365e16e455f87.
|
|
Promise id is now created in core and passed back to JS.
|
|
|
|
Adds ModuleSpecifier, which wraps a URL. This is now passed around instead of
specifier and resolver strings.
|
|
|
|
|
|
|
|
|
|
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)
|
|
* 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.
|
|
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.
|
|
Closes #2397
|
|
|
|
This reverts commit 7219787894f13b1920b3b6b49203cdcb8f672c00.
|
|
|
|
|
|
|
|
|
|
|
|
Using `std::fs::canonicalize` to expand path to full existing path, such that
later attempt to loop-pop and compare path segment would work.
|
|
|
|
|
|
|
|
|