git.delta.rocks / jrsonnet / refs/commits / fe52b32db444

difftreelog

build upgrade dependencies

Yaroslav Bolyukin2022-10-26parent: #30d381b.patch.diff
in: master

13 files changed

modifiedcmds/jrsonnet/Cargo.tomldiffbeforeafterboth
2828
29mimallocator = { 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" }
3333
modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
3 io::{Read, Write},3 io::{Read, Write},
4};4};
55
6use 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}
4343
44#[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)]
modifiedcrates/jrsonnet-cli/Cargo.tomldiffbeforeafterboth
21jrsonnet-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" }
2323
24clap = { version = "3.2", features = ["derive"] }24clap = { version = "4.0", features = ["derive"] }
2525
modifiedcrates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth
44 /// 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 {
modifiedcrates/jrsonnet-cli/src/manifest.rsdiffbeforeafterboth
1use std::{path::PathBuf, str::FromStr};1use std::{path::PathBuf, str::FromStr};
22
3use clap::Parser;3use clap::{Parser, ValueEnum};
4use jrsonnet_evaluator::{error::Result, ManifestFormat, State};4use jrsonnet_evaluator::{error::Result, ManifestFormat, State};
55
6use crate::ConfigureState;6use crate::ConfigureState;
77
8#[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 directly
10 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`
modifiedcrates/jrsonnet-cli/src/stdlib.rsdiffbeforeafterboth
73 long,
74 short = 'V',
75 name = "name[=var data]",
76 number_of_values = 1,
77 multiple_occurrences = true
78 )]
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 = true
87 )]
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 = true
96 )]
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 = true
105 )]
106 ext_code_file: Vec<ExtFile>,85 ext_code_file: Vec<ExtFile>,
107}86}
modifiedcrates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth
14 long,
15 short = 'A',
16 name = "name[=tla data]",
17 number_of_values = 1,
18 multiple_occurrences = true
19 )]
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 = true
28 )]
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 = true
37 )]
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 = true
46 )]
47 tla_code_file: Vec<ExtFile>,26 tla_code_file: Vec<ExtFile>,
48}27}
modifiedcrates/jrsonnet-cli/src/trace.rsdiffbeforeafterboth
1use std::str::FromStr;
2
3use 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},
97
10use crate::ConfigureState;8use crate::ConfigureState;
119
12#[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 annotations
15 Explaining,15 Explaining,
16}16}
17
18impl 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}
2817
29#[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`s
34 /// while `explaining` displays source code with attached trace annotations
35 /// 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.
modifiedcrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth
31jrsonnet-gcmodule = { version = "0.3.4" }31jrsonnet-gcmodule = { version = "0.3.4" }
3232
33pathdiff = "0.2.1"33pathdiff = "0.2.1"
34hashbrown = "0.12.1"34hashbrown = "0.12.3"
35static_assertions = "1.1"35static_assertions = "1.1"
3636
37rustc-hash = "1.1"37rustc-hash = "1.1"
modifiedcrates/jrsonnet-interner/Cargo.tomldiffbeforeafterboth
22structdump = { version = "0.2.0", optional = true }22structdump = { version = "0.2.0", optional = true }
2323
24rustc-hash = "1.1"24rustc-hash = "1.1"
25hashbrown = { version = "0.12.1", features = ["inline-more"] }25hashbrown = { version = "0.12.3", features = ["inline-more"] }
2626
modifiedcrates/jrsonnet-parser/src/expr.rsdiffbeforeafterboth
190 }190 }
191}191}
192192
193#[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 {
modifiedcrates/jrsonnet-stdlib/Cargo.tomldiffbeforeafterboth
30# std.md530# std.md5
31md5 = "0.7.0"31md5 = "0.7.0"
32# std.base6432# std.base64
33base64 = "0.13.0"33base64 = "0.13.1"
34# std.parseJson34# std.parseJson
35serde_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 compatibility
modifiedcrates/jrsonnet-types/Cargo.tomldiffbeforeafterboth
9[dependencies]9[dependencies]
10jrsonnet-gcmodule = { version = "0.3.4" }10jrsonnet-gcmodule = { version = "0.3.4" }
1111
12peg = "0.8.0"12peg = "0.8.1"
1313