difftreelog
build upgrade dependencies
in: master
13 files changed
cmds/jrsonnet/Cargo.tomldiffbeforeafterboth282829mimallocator = { version = "0.1.3", optional = true }29mimallocator = { version = "0.1.3", optional = true }30thiserror = "1.0"30thiserror = "1.0"31clap = { version = "3.2", features = ["derive"] }31clap = { version = "4.0", features = ["derive"] }32clap_complete = { version = "3.2" }32clap_complete = { version = "4.0" }3333cmds/jrsonnet/src/main.rsdiffbeforeafterboth3 io::{Read, Write},3 io::{Read, Write},4};4};556use clap::{AppSettings, IntoApp, Parser};6use clap::{CommandFactory, Parser};7use clap_complete::Shell;7use clap_complete::Shell;8use jrsonnet_cli::{ConfigureState, GeneralOpts, ManifestOpts, OutputOpts};8use jrsonnet_cli::{ConfigureState, GeneralOpts, ManifestOpts, OutputOpts};9use jrsonnet_evaluator::{error::LocError, State};9use jrsonnet_evaluator::{error::LocError, State};42}42}434344#[derive(Parser)]44#[derive(Parser)]45#[clap(45#[clap(args_conflicts_with_subcommands = true, disable_version_flag = true)]46 global_setting = AppSettings::DeriveDisplayOrder,47 args_conflicts_with_subcommands = true,48)]49struct Opts {46struct Opts {50 #[clap(subcommand)]47 #[clap(subcommand)]crates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth21jrsonnet-gcmodule = { version = "0.3.4" }21jrsonnet-gcmodule = { version = "0.3.4" }22jrsonnet-stdlib = { path = "../../crates/jrsonnet-stdlib", version = "0.4.2" }22jrsonnet-stdlib = { path = "../../crates/jrsonnet-stdlib", version = "0.4.2" }232324clap = { version = "3.2", features = ["derive"] }24clap = { version = "4.0", features = ["derive"] }2525crates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth44 /// Any not found `imported` file will be searched in these.44 /// Any not found `imported` file will be searched in these.45 /// This can also be specified via `JSONNET_PATH` variable,45 /// This can also be specified via `JSONNET_PATH` variable,46 /// which should contain a colon-separated (semicolon-separated on Windows) list of directories.46 /// which should contain a colon-separated (semicolon-separated on Windows) list of directories.47 #[clap(long, short = 'J', multiple_occurrences = true)]47 #[clap(long, short = 'J')]48 jpath: Vec<PathBuf>,48 jpath: Vec<PathBuf>,49}49}50impl ConfigureState for MiscOpts {50impl ConfigureState for MiscOpts {crates/jrsonnet-cli/src/manifest.rsdiffbeforeafterboth1use std::{path::PathBuf, str::FromStr};1use std::{path::PathBuf, str::FromStr};223use clap::Parser;3use clap::{Parser, ValueEnum};4use jrsonnet_evaluator::{error::Result, ManifestFormat, State};4use jrsonnet_evaluator::{error::Result, ManifestFormat, State};556use crate::ConfigureState;6use crate::ConfigureState;778#[derive(Clone, ValueEnum)]8pub enum ManifestFormatName {9pub enum ManifestFormatName {9 /// Expect string as output, and write them directly10 /// Expect string as output, and write them directly10 String,11 String,28#[clap(next_help_heading = "MANIFESTIFICATION OUTPUT")]29#[clap(next_help_heading = "MANIFESTIFICATION OUTPUT")]29pub struct ManifestOpts {30pub struct ManifestOpts {30 /// Output format, wraps resulting value to corresponding std.manifest call.31 /// Output format, wraps resulting value to corresponding std.manifest call.31 #[clap(long, short = 'f', default_value = "json", possible_values = &["json", "yaml"])]32 #[clap(long, short = 'f', default_value = "json")]32 format: ManifestFormatName,33 format: ManifestFormatName,33 /// Expect plain string as output.34 /// Expect plain string as output.34 /// Mutually exclusive with `--format`35 /// Mutually exclusive with `--format`crates/jrsonnet-cli/src/stdlib.rsdiffbeforeafterboth73 long,74 short = 'V',75 name = "name[=var data]",76 number_of_values = 1,77 multiple_occurrences = true78 )]79 ext_str: Vec<ExtStr>,73 ext_str: Vec<ExtStr>,80 /// Read string external variable from file.74 /// Read string external variable from file.81 /// See also `--ext-str`75 /// See also `--ext-str`82 #[clap(76 #[clap(long, name = "name=var path", number_of_values = 1)]83 long,84 name = "name=var path",85 number_of_values = 1,86 multiple_occurrences = true87 )]88 ext_str_file: Vec<ExtFile>,77 ext_str_file: Vec<ExtFile>,89 /// Add external variable from code.78 /// Add external variable from code.90 /// See also `--ext-str`79 /// See also `--ext-str`91 #[clap(80 #[clap(long, name = "name[=var source]", number_of_values = 1)]92 long,93 name = "name[=var source]",94 number_of_values = 1,95 multiple_occurrences = true96 )]97 ext_code: Vec<ExtStr>,81 ext_code: Vec<ExtStr>,98 /// Read string external variable from file.82 /// Read string external variable from file.99 /// See also `--ext-str`83 /// See also `--ext-str`100 #[clap(84 #[clap(long, name = "name=var code path", number_of_values = 1)]101 long,102 name = "name=var code path",103 number_of_values = 1,104 multiple_occurrences = true105 )]106 ext_code_file: Vec<ExtFile>,85 ext_code_file: Vec<ExtFile>,107}86}crates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth14 long,15 short = 'A',16 name = "name[=tla data]",17 number_of_values = 1,18 multiple_occurrences = true19 )]20 tla_str: Vec<ExtStr>,14 tla_str: Vec<ExtStr>,21 /// Read top level argument string from file.15 /// Read top level argument string from file.22 /// See also `--tla-str`16 /// See also `--tla-str`23 #[clap(17 #[clap(long, name = "name=tla path", number_of_values = 1)]24 long,25 name = "name=tla path",26 number_of_values = 1,27 multiple_occurrences = true28 )]29 tla_str_file: Vec<ExtFile>,18 tla_str_file: Vec<ExtFile>,30 /// Add top level argument from code.19 /// Add top level argument from code.31 /// See also `--tla-str`20 /// See also `--tla-str`32 #[clap(21 #[clap(long, name = "name[=tla source]", number_of_values = 1)]33 long,34 name = "name[=tla source]",35 number_of_values = 1,36 multiple_occurrences = true37 )]38 tla_code: Vec<ExtStr>,22 tla_code: Vec<ExtStr>,39 /// Read top level argument code from file.23 /// Read top level argument code from file.40 /// See also `--tla-str`24 /// See also `--tla-str`41 #[clap(25 #[clap(long, name = "name=tla code path", number_of_values = 1)]42 long,43 name = "name=tla code path",44 number_of_values = 1,45 multiple_occurrences = true46 )]47 tla_code_file: Vec<ExtFile>,26 tla_code_file: Vec<ExtFile>,48}27}crates/jrsonnet-cli/src/trace.rsdiffbeforeafterboth1use std::str::FromStr;23use clap::Parser;1use clap::{Parser, ValueEnum};4use jrsonnet_evaluator::{2use jrsonnet_evaluator::{5 error::Result,3 error::Result,6 trace::{CompactFormat, ExplainingFormat, PathResolver},4 trace::{CompactFormat, ExplainingFormat, PathResolver},9710use crate::ConfigureState;8use crate::ConfigureState;11912#[derive(PartialEq, Eq)]10#[derive(PartialEq, Eq, ValueEnum, Clone)]13pub enum TraceFormatName {11pub enum TraceFormatName {12 /// Only show `filename:line:column`14 Compact,13 Compact,14 /// Display source code with attached trace annotations15 Explaining,15 Explaining,16}16}1718impl FromStr for TraceFormatName {19 type Err = &'static str;20 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {21 Ok(match s {22 "compact" => TraceFormatName::Compact,23 "explaining" => TraceFormatName::Explaining,24 _ => return Err("no such format"),25 })26 }27}281729#[derive(Parser)]18#[derive(Parser)]30#[clap(next_help_heading = "STACK TRACE VISUAL")]19#[clap(next_help_heading = "STACK TRACE VISUAL")]31pub struct TraceOpts {20pub struct TraceOpts {32 /// Format of stack traces' display in console.21 /// Format of stack traces' display in console.33 /// `compact` format only shows `filename:line:column`s34 /// while `explaining` displays source code with attached trace annotations35 /// thus being more verbose.36 #[clap(long, possible_values = &["compact", "explaining"])]22 #[clap(long)]37 trace_format: Option<TraceFormatName>,23 trace_format: Option<TraceFormatName>,38 /// Amount of stack trace elements to be displayed.24 /// Amount of stack trace elements to be displayed.39 /// If set to `0` then full stack trace will be displayed.25 /// If set to `0` then full stack trace will be displayed.crates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth31jrsonnet-gcmodule = { version = "0.3.4" }31jrsonnet-gcmodule = { version = "0.3.4" }323233pathdiff = "0.2.1"33pathdiff = "0.2.1"34hashbrown = "0.12.1"34hashbrown = "0.12.3"35static_assertions = "1.1"35static_assertions = "1.1"363637rustc-hash = "1.1"37rustc-hash = "1.1"crates/jrsonnet-interner/Cargo.tomldiffbeforeafterboth22structdump = { version = "0.2.0", optional = true }22structdump = { version = "0.2.0", optional = true }232324rustc-hash = "1.1"24rustc-hash = "1.1"25hashbrown = { version = "0.12.1", features = ["inline-more"] }25hashbrown = { version = "0.12.3", features = ["inline-more"] }2626crates/jrsonnet-parser/src/expr.rsdiffbeforeafterboth190 }190 }191}191}192192193#[cfg_attr(feature = "structdump", derive(Codegen))]193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]194#[derive(Debug, Clone, PartialEq, Eq, Trace)]195#[derive(Debug, Clone, PartialEq, Eq, Trace)]195pub enum DestructRest {196pub enum DestructRest {crates/jrsonnet-stdlib/Cargo.tomldiffbeforeafterboth30# std.md530# std.md531md5 = "0.7.0"31md5 = "0.7.0"32# std.base6432# std.base6433base64 = "0.13.0"33base64 = "0.13.1"34# std.parseJson34# std.parseJson35serde_json = "1.0"35serde_json = "1.0"36# std.parseYaml, custom library fork is used for C++/golang compatibility36# std.parseYaml, custom library fork is used for C++/golang compatibilitycrates/jrsonnet-types/Cargo.tomldiffbeforeafterboth9[dependencies]9[dependencies]10jrsonnet-gcmodule = { version = "0.3.4" }10jrsonnet-gcmodule = { version = "0.3.4" }111112peg = "0.8.0"12peg = "0.8.1"1313