Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GitHub-based remote dependencies #101

Merged
merged 9 commits into from Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
181 changes: 181 additions & 0 deletions Cargo.lock

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

8 changes: 6 additions & 2 deletions forc/Cargo.toml
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
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
1 change: 1 addition & 0 deletions forc/src/cli/commands/mvprun.rs
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