Skip to content

Commit

Permalink
Merge branch 'master' into many_bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna authored Jul 3, 2021
2 parents 87c0294 + ec3c96e commit e769e5a
Show file tree
Hide file tree
Showing 25 changed files with 1,254 additions and 223 deletions.
185 changes: 185 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core_lang/src/parse_tree/return_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use pest::iterators::Pair;

#[derive(Debug, Clone)]
pub struct ReturnStatement<'sc> {
pub(crate) expr: Expression<'sc>,
pub expr: Expression<'sc>,
}

impl<'sc> ReturnStatement<'sc> {
Expand Down
8 changes: 6 additions & 2 deletions forc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.41"
core_lang = {path = "../core_lang"}
curl = "0.4.38"
dirs = "3.0.2"
flate2 = "1.0.20"
formatter = {path = "../formatter"}
fuel-asm = {git = "ssh://git@github.com/FuelLabs/fuel-asm.git"}
fuel-tx = {git = "ssh://git@github.com/FuelLabs/fuel-tx.git"}
fuel-vm = {git = "ssh://git@github.com/FuelLabs/fuel-vm.git"}
hex = "0.4.3"
line-col = "0.2"
#pest = "2.1"
fuel-asm = {git = "ssh://git@github.com/FuelLabs/fuel-asm.git"}
pest = {git = "https://github.com/sezna/pest.git", rev = "8aa58791f759daf4caee26e8560e862df5a6afb7"}
serde = {version = "1.0", features = ["derive"]}
source-span = "2.4"
structopt = "0.3"
tar = "0.4.35"
term-table = "1.3"
termcolor = "1.1"
toml = "0.5"
Expand Down
5 changes: 5 additions & 0 deletions forc/src/cli/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ pub struct Command {
/// Whether to output a binary file representing the script bytes
#[structopt(short = "o")]
pub binary_outfile: Option<String>,

/// Offline mode, prevents Forc from using the network when managing dependencies.
/// Meaning it will only try to use previously downloaded dependencies.
#[structopt(long = "offline")]
pub offline_mode: bool,
}

pub(crate) fn exec(command: Command) -> Result<(), String> {
Expand Down
14 changes: 10 additions & 4 deletions forc/src/cli/commands/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
use structopt::{self, StructOpt};

use crate::ops::forc_deploy;

#[derive(Debug, StructOpt)]
pub(crate) struct Command {}
pub struct Command {}


pub(crate) fn exec(_command: Command) -> Result<(), String> {
todo!()
}
pub(crate) fn exec(command: Command) -> Result<(), String> {
match forc_deploy::deploy(command) {
Err(e) => Err(e.message),
_ => Ok(()),
}
}
1 change: 1 addition & 0 deletions forc/src/cli/commands/mvprun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub(crate) fn exec(command: Command) -> Result<(), String> {
path: Some(command.path),
print_asm: false,
binary_outfile: None,
offline_mode: false,
};
match forc_build::build(build_command) {
Ok(script) => {
Expand Down
2 changes: 1 addition & 1 deletion forc/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use analysis::Command as AnalysisCommand;
use benchmark::Command as BenchmarkCommand;
pub use build::Command as BuildCommand;
use coverage::Command as CoverageCommand;
use deploy::Command as DeployCommand;
pub use deploy::Command as DeployCommand;
pub use format::Command as FormatCommand;
use init::Command as InitCommand;
use mvprun::Command as MvprunCommand;
Expand Down
Loading

0 comments on commit e769e5a

Please sign in to comment.