mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-23 17:43:06 +03:00
resolve merge conflicts
This commit is contained in:
commit
36440719fb
85
Cargo.lock
generated
85
Cargo.lock
generated
@ -380,13 +380,9 @@ version = "2.34.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
|
||||||
"atty",
|
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"strsim 0.8.0",
|
|
||||||
"textwrap 0.11.0",
|
"textwrap 0.11.0",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"vec_map",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -397,13 +393,28 @@ checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
"clap_derive",
|
||||||
"clap_lex",
|
"clap_lex",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"strsim 0.10.0",
|
"lazy_static",
|
||||||
|
"strsim",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"textwrap 0.15.0",
|
"textwrap 0.15.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "clap_derive"
|
||||||
|
version = "3.1.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c"
|
||||||
|
dependencies = [
|
||||||
|
"heck",
|
||||||
|
"proc-macro-error",
|
||||||
|
"proc-macro2 1.0.39",
|
||||||
|
"quote 1.0.18",
|
||||||
|
"syn 1.0.96",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_lex"
|
name = "clap_lex"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@ -956,12 +967,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heck"
|
name = "heck"
|
||||||
version = "0.3.3"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
|
||||||
dependencies = [
|
|
||||||
"unicode-segmentation",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
@ -1283,7 +1291,6 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2)",
|
"snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2)",
|
||||||
"structopt",
|
|
||||||
"sys-info",
|
"sys-info",
|
||||||
"test_dir",
|
"test_dir",
|
||||||
"toml",
|
"toml",
|
||||||
@ -1310,6 +1317,7 @@ dependencies = [
|
|||||||
name = "leo-parser"
|
name = "leo-parser"
|
||||||
version = "1.5.3"
|
version = "1.5.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"clap 3.1.18",
|
||||||
"criterion",
|
"criterion",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
@ -1322,7 +1330,6 @@ dependencies = [
|
|||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"snarkvm-dpc",
|
"snarkvm-dpc",
|
||||||
"structopt",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1352,12 +1359,12 @@ dependencies = [
|
|||||||
name = "leo-test-framework"
|
name = "leo-test-framework"
|
||||||
version = "1.5.3"
|
version = "1.5.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"clap 3.1.18",
|
||||||
"leo-errors",
|
"leo-errors",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"structopt",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2504,42 +2511,12 @@ dependencies = [
|
|||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "strsim"
|
|
||||||
version = "0.8.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strsim"
|
name = "strsim"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "structopt"
|
|
||||||
version = "0.3.26"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
|
|
||||||
dependencies = [
|
|
||||||
"clap 2.34.0",
|
|
||||||
"lazy_static",
|
|
||||||
"structopt-derive",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "structopt-derive"
|
|
||||||
version = "0.4.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
|
|
||||||
dependencies = [
|
|
||||||
"heck",
|
|
||||||
"proc-macro-error",
|
|
||||||
"proc-macro2 1.0.39",
|
|
||||||
"quote 1.0.18",
|
|
||||||
"syn 1.0.96",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.4.1"
|
version = "2.4.1"
|
||||||
@ -2771,9 +2748,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing"
|
name = "tracing"
|
||||||
version = "0.1.34"
|
version = "0.1.35"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
|
checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
@ -2794,11 +2771,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-core"
|
name = "tracing-core"
|
||||||
version = "0.1.26"
|
version = "0.1.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
|
checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"once_cell",
|
||||||
"valuable",
|
"valuable",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -2869,12 +2846,6 @@ dependencies = [
|
|||||||
"tinyvec",
|
"tinyvec",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicode-segmentation"
|
|
||||||
version = "1.9.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-width"
|
name = "unicode-width"
|
||||||
version = "0.1.9"
|
version = "0.1.9"
|
||||||
@ -2911,12 +2882,6 @@ version = "0.2.15"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "vec_map"
|
|
||||||
version = "0.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "version_check"
|
name = "version_check"
|
||||||
version = "0.9.4"
|
version = "0.9.4"
|
||||||
|
@ -58,7 +58,8 @@ rev = "51633e2"
|
|||||||
version = "0.3.65"
|
version = "0.3.65"
|
||||||
|
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "3.1"
|
version = "3.1.18"
|
||||||
|
features = ["derive", "env"]
|
||||||
|
|
||||||
[dependencies.color-backtrace]
|
[dependencies.color-backtrace]
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
@ -103,9 +104,6 @@ features = [ "derive" ]
|
|||||||
[dependencies.serde_json]
|
[dependencies.serde_json]
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
|
|
||||||
[dependencies.structopt]
|
|
||||||
version = "0.3"
|
|
||||||
|
|
||||||
[dependencies.sys-info]
|
[dependencies.sys-info]
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
|
|
||||||
|
@ -69,8 +69,9 @@ features = [ "preserve_order" ]
|
|||||||
[dev-dependencies.serde_yaml]
|
[dev-dependencies.serde_yaml]
|
||||||
version = "0.8"
|
version = "0.8"
|
||||||
|
|
||||||
[dev-dependencies.structopt]
|
[dependencies.clap]
|
||||||
version = "0.3"
|
version = "3.1.18"
|
||||||
|
features = ["derive"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = [ ]
|
default = [ ]
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
use leo_errors::{emitter::Handler, Result};
|
use leo_errors::{emitter::Handler, Result};
|
||||||
use leo_span::symbol::create_session_if_not_set_then;
|
use leo_span::symbol::create_session_if_not_set_then;
|
||||||
|
|
||||||
|
use clap::StructOpt;
|
||||||
use std::{
|
use std::{
|
||||||
fs,
|
fs,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
#[structopt(
|
#[structopt(
|
||||||
@ -43,7 +43,7 @@ struct Opt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), String> {
|
fn main() -> Result<(), String> {
|
||||||
let opt = Opt::from_args();
|
let opt = Opt::parse();
|
||||||
let input_tree = create_session_if_not_set_then(|s| {
|
let input_tree = create_session_if_not_set_then(|s| {
|
||||||
let input_string = s
|
let input_string = s
|
||||||
.source_map
|
.source_map
|
||||||
|
@ -18,11 +18,11 @@ use leo_ast::Ast;
|
|||||||
use leo_errors::emitter::Handler;
|
use leo_errors::emitter::Handler;
|
||||||
use leo_span::symbol::create_session_if_not_set_then;
|
use leo_span::symbol::create_session_if_not_set_then;
|
||||||
|
|
||||||
|
use clap::StructOpt;
|
||||||
use std::{
|
use std::{
|
||||||
fs,
|
fs,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
#[structopt(name = "leo parser", about = "Parse Leo AST and store it as a JSON")]
|
#[structopt(name = "leo parser", about = "Parse Leo AST and store it as a JSON")]
|
||||||
@ -41,7 +41,7 @@ struct Opt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), String> {
|
fn main() -> Result<(), String> {
|
||||||
let opt = Opt::from_args();
|
let opt = Opt::parse();
|
||||||
// Parses the Leo file constructing an ast which is then serialized.
|
// Parses the Leo file constructing an ast which is then serialized.
|
||||||
let serialized_leo_tree = create_session_if_not_set_then(|s| {
|
let serialized_leo_tree = create_session_if_not_set_then(|s| {
|
||||||
let code = s.source_map.load_file(&opt.input_path).expect("failed to open file");
|
let code = s.source_map.load_file(&opt.input_path).expect("failed to open file");
|
||||||
|
@ -25,7 +25,7 @@ use leo_package::{
|
|||||||
source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME},
|
source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME},
|
||||||
};
|
};
|
||||||
|
|
||||||
use structopt::StructOpt;
|
use clap::StructOpt;
|
||||||
use tracing::span::Span;
|
use tracing::span::Span;
|
||||||
|
|
||||||
/// Compiler Options wrapper for Build command. Also used by other commands which
|
/// Compiler Options wrapper for Build command. Also used by other commands which
|
||||||
@ -92,7 +92,6 @@ pub struct BuildOptions {
|
|||||||
|
|
||||||
/// Compile and build program command.
|
/// Compile and build program command.
|
||||||
#[derive(StructOpt, Debug)]
|
#[derive(StructOpt, Debug)]
|
||||||
#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)]
|
|
||||||
pub struct Build {
|
pub struct Build {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
|
@ -32,12 +32,12 @@ use leo_errors::Result;
|
|||||||
use leo_span::symbol::create_session_if_not_set_then;
|
use leo_span::symbol::create_session_if_not_set_then;
|
||||||
// use snarkvm_utilities::Write;
|
// use snarkvm_utilities::Write;
|
||||||
|
|
||||||
|
use clap::StructOpt;
|
||||||
use std::{path::PathBuf, process::exit};
|
use std::{path::PathBuf, process::exit};
|
||||||
use structopt::{clap::AppSettings, StructOpt};
|
|
||||||
|
|
||||||
/// CLI Arguments entry point - includes global parameters and subcommands
|
/// CLI Arguments entry point - includes global parameters and subcommands
|
||||||
#[derive(StructOpt, Debug)]
|
#[derive(StructOpt, Debug)]
|
||||||
#[structopt(name = "leo", author = "The Aleo Team <hello@aleo.org>", setting = AppSettings::ColoredHelp)]
|
#[structopt(name = "leo", author = "The Aleo Team <hello@aleo.org>")]
|
||||||
struct Opt {
|
struct Opt {
|
||||||
#[structopt(short, global = true, help = "Print additional information for debugging")]
|
#[structopt(short, global = true, help = "Print additional information for debugging")]
|
||||||
debug: bool,
|
debug: bool,
|
||||||
@ -62,7 +62,6 @@ struct Opt {
|
|||||||
|
|
||||||
///Leo compiler and package manager
|
///Leo compiler and package manager
|
||||||
#[derive(StructOpt, Debug)]
|
#[derive(StructOpt, Debug)]
|
||||||
#[structopt(setting = AppSettings::ColoredHelp)]
|
|
||||||
enum CommandOpts {
|
enum CommandOpts {
|
||||||
// #[structopt(about = "Create a new Leo package in an existing directory")]
|
// #[structopt(about = "Create a new Leo package in an existing directory")]
|
||||||
// Init {
|
// Init {
|
||||||
@ -200,14 +199,14 @@ fn set_panic_hook() {
|
|||||||
"note: compiler args: {}\n",
|
"note: compiler args: {}\n",
|
||||||
std::env::args().collect::<Vec<_>>().join(" ")
|
std::env::args().collect::<Vec<_>>().join(" ")
|
||||||
);
|
);
|
||||||
eprintln!("note: compiler flags: {:?}\n", Opt::from_args());
|
eprintln!("note: compiler flags: {:?}\n", Opt::parse());
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
set_panic_hook();
|
set_panic_hook();
|
||||||
create_session_if_not_set_then(|_| handle_error(run_with_args(Opt::from_args())));
|
create_session_if_not_set_then(|_| handle_error(run_with_args(Opt::parse())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run command with custom build arguments.
|
/// Run command with custom build arguments.
|
||||||
|
@ -54,8 +54,12 @@ version = "0.8"
|
|||||||
# path = "../compiler"
|
# path = "../compiler"
|
||||||
# version = "1.5.2"
|
# version = "1.5.2"
|
||||||
|
|
||||||
[dependencies.structopt]
|
# [dependencies.structopt]
|
||||||
version = "0.3"
|
# version = "0.3"
|
||||||
|
|
||||||
|
[dependencies.clap]
|
||||||
|
version = "3.1.18"
|
||||||
|
features = ["derive"]
|
||||||
|
|
||||||
# List of dependencies for errcov
|
# List of dependencies for errcov
|
||||||
|
|
||||||
|
@ -21,14 +21,14 @@ use leo_test_framework::{
|
|||||||
test::{extract_test_config, TestExpectationMode as Expectation},
|
test::{extract_test_config, TestExpectationMode as Expectation},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use clap::StructOpt;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use serde_yaml::Value;
|
use serde_yaml::Value;
|
||||||
use std::collections::{BTreeMap, HashSet};
|
use std::collections::{BTreeMap, HashSet};
|
||||||
use std::{error::Error, fs, io, path::PathBuf};
|
use std::{error::Error, fs, io, path::PathBuf};
|
||||||
use structopt::{clap::AppSettings, StructOpt};
|
|
||||||
|
|
||||||
#[derive(StructOpt)]
|
#[derive(StructOpt)]
|
||||||
#[structopt(name = "error-coverage", author = "The Aleo Team <hello@aleo.org>", setting = AppSettings::ColoredHelp)]
|
#[structopt(name = "error-coverage", author = "The Aleo Team <hello@aleo.org>")]
|
||||||
struct Opt {
|
struct Opt {
|
||||||
#[structopt(
|
#[structopt(
|
||||||
short,
|
short,
|
||||||
@ -40,7 +40,7 @@ struct Opt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
handle_error(run_with_args(Opt::from_args()));
|
handle_error(run_with_args(Opt::parse()));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
|
fn run_with_args(opt: Opt) -> Result<(), Box<dyn Error>> {
|
||||||
|
Loading…
Reference in New Issue
Block a user