Bump a lot of deps (#1560)

This commit is contained in:
Jonathan Turner
2020-04-07 00:51:17 -07:00
committed by GitHub
parent c9f424977e
commit 04702530a3
20 changed files with 172 additions and 376 deletions

View File

@ -16,17 +16,15 @@ ansi_term = "0.12.1"
bigdecimal = { version = "0.1.0", features = ["serde"] }
derive-new = "0.5.8"
language-reporting = "0.4.0"
num-bigint = { version = "0.2.3", features = ["serde"] }
num-traits = "0.2.10"
serde = { version = "1.0.103", features = ["derive"] }
nom = "5.0.1"
nom_locate = "1.0.0"
num-bigint = { version = "0.2.6", features = ["serde"] }
num-traits = "0.2.11"
serde = { version = "1.0.106", features = ["derive"] }
getset = "0.0.9"
# implement conversions
serde_yaml = "0.8"
toml = "0.5.5"
serde_json = "1.0.44"
toml = "0.5.6"
serde_json = "1.0.51"
[build-dependencies]
nu-build = { version = "0.12.0", path = "../nu-build" }

View File

@ -3,9 +3,7 @@ use bigdecimal::BigDecimal;
use derive_new::new;
use getset::Getters;
use language_reporting::{Diagnostic, Label, Severity};
use nu_source::{
b, DebugDocBuilder, HasFallibleSpan, PrettyDebug, Span, Spanned, SpannedItem, TracableContext,
};
use nu_source::{b, DebugDocBuilder, HasFallibleSpan, PrettyDebug, Span, Spanned, SpannedItem};
use num_bigint::BigInt;
use num_traits::ToPrimitive;
use serde::{Deserialize, Serialize};
@ -413,33 +411,6 @@ impl ShellError {
.start()
}
pub fn parse_error(
error: nom::Err<(
nom_locate::LocatedSpanEx<&str, TracableContext>,
nom::error::ErrorKind,
)>,
) -> ShellError {
use language_reporting::*;
match error {
nom::Err::Incomplete(_) => {
// TODO: Get span of EOF
let diagnostic = Diagnostic::new(
Severity::Error,
"Parse Error: Unexpected end of line".to_string(),
);
ShellError::diagnostic(diagnostic)
}
nom::Err::Failure(span) | nom::Err::Error(span) => {
let diagnostic = Diagnostic::new(Severity::Error, "Parse Error".to_string())
.with_label(Label::new_primary(Span::from(span.0)));
ShellError::diagnostic(diagnostic)
}
}
}
pub fn diagnostic(diagnostic: Diagnostic<Span>) -> ShellError {
ProximateShellError::Diagnostic(ShellDiagnostic { diagnostic }).start()
}