mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-18 23:02:35 +03:00
merge conflicts fix
This commit is contained in:
commit
ba7aef7f1e
86
Cargo.lock
generated
86
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.37",
|
||||||
|
"quote 1.0.18",
|
||||||
|
"syn 1.0.91",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_lex"
|
name = "clap_lex"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@ -958,12 +969,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"
|
||||||
@ -1073,9 +1081,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.8.1"
|
version = "1.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
|
checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown 0.11.2",
|
"hashbrown 0.11.2",
|
||||||
@ -1285,7 +1293,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",
|
||||||
@ -1312,6 +1319,11 @@ dependencies = [
|
|||||||
name = "leo-parser"
|
name = "leo-parser"
|
||||||
version = "1.5.3"
|
version = "1.5.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
"clap 3.1.18",
|
||||||
|
"criterion",
|
||||||
|
>>>>>>> 38be98f94700e6b62d783949a1739ec1b2eb27e4
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"leo-ast",
|
"leo-ast",
|
||||||
@ -1323,7 +1335,6 @@ dependencies = [
|
|||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"snarkvm-dpc",
|
"snarkvm-dpc",
|
||||||
"structopt",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1353,16 +1364,13 @@ dependencies = [
|
|||||||
name = "leo-test-framework"
|
name = "leo-test-framework"
|
||||||
version = "1.5.3"
|
version = "1.5.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"clap 3.1.18",
|
||||||
"criterion",
|
|
||||||
"leo-compiler",
|
|
||||||
"leo-errors",
|
"leo-errors",
|
||||||
"leo-span",
|
"leo-span",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"structopt",
|
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -2519,42 +2527,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.37",
|
|
||||||
"quote 1.0.18",
|
|
||||||
"syn 1.0.91",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.4.1"
|
version = "2.4.1"
|
||||||
@ -2877,12 +2855,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"
|
||||||
@ -2925,12 +2897,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"
|
||||||
|
|
||||||
|
@ -61,8 +61,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
|
||||||
@ -88,7 +88,6 @@ impl From<BuildOptions> for OutputOptions {
|
|||||||
|
|
||||||
/// 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 {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
pub(crate) compiler_options: BuildOptions,
|
pub(crate) compiler_options: BuildOptions,
|
||||||
|
@ -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.
|
||||||
|
@ -36,8 +36,9 @@ features = ["preserve_order"]
|
|||||||
[dependencies.serde_yaml]
|
[dependencies.serde_yaml]
|
||||||
version = "0.8"
|
version = "0.8"
|
||||||
|
|
||||||
[dependencies.structopt]
|
[dependencies.clap]
|
||||||
version = "0.3"
|
version = "3.1.18"
|
||||||
|
features = ["derive"]
|
||||||
|
|
||||||
[dependencies.leo-errors]
|
[dependencies.leo-errors]
|
||||||
path = "../../leo/errors"
|
path = "../../leo/errors"
|
||||||
|
Loading…
Reference in New Issue
Block a user