Changes to allow plugins to be loaded in a multi-threaded manner (#1694)

* Changes to allow plugins to be loaded in a multi-threaded manner in order to decrease startup time.

* Ran rust fmt and clippy to find and fix first pass errors.
Updated launch.jason to make debugging easier in vscode.
Also added tasks.json so tasks like clippy can be ran easily.

* ran fmt again

* Delete launch.json

Remove IDE settings file

* Remove IDE settings file

* Ignore vscode IDE settings

* Cloned the context instead of Arc/Mutexing it.

Co-authored-by: Darren Schroeder <fdncred@hotmail.com>
Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
This commit is contained in:
Darren Schroeder
2020-05-04 13:15:24 -05:00
committed by GitHub
parent a9968046ed
commit d2ac506de3
6 changed files with 66 additions and 49 deletions

View File

@ -25,6 +25,7 @@ getset = "0.1.0"
serde_yaml = "0.8"
toml = "0.5.6"
serde_json = "1.0.51"
glob = "0.3.0"
[build-dependencies]
nu-build = { version = "0.13.0", path = "../nu-build" }

View File

@ -864,6 +864,12 @@ impl std::convert::From<Box<dyn std::error::Error + Send + Sync>> for ShellError
}
}
impl std::convert::From<glob::PatternError> for ShellError {
fn from(input: glob::PatternError) -> ShellError {
ShellError::untagged_runtime_error(format!("{:?}", input))
}
}
pub trait CoerceInto<U> {
fn coerce_into(self, operation: impl Into<String>) -> Result<U, ShellError>;
}