diff --git a/Cargo.lock b/Cargo.lock index 4bd827f82d3..f4d4e43200d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,6 +425,9 @@ name = "cc" version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -949,9 +952,9 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" +checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" [[package]] name = "flate2" @@ -992,13 +995,14 @@ dependencies = [ "clap 3.1.2", "clap_complete", "dirs 3.0.2", - "flate2", "fuel-asm", "fuel-gql-client", "fuel-tx", "fuel-vm", "futures", + "git2", "hex", + "petgraph", "prettydiff", "reqwest", "semver 1.0.4", @@ -1017,6 +1021,7 @@ dependencies = [ "toml", "unicode-xid", "ureq", + "url", "uwuify", "warp", "whoami", @@ -1328,6 +1333,21 @@ dependencies = [ "polyval", ] +[[package]] +name = "git2" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e7d3b96ec1fcaa8431cf04a4f1ef5caafe58d5cf7bcc31f09c1626adddb0ffe" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + [[package]] name = "glob" version = "0.3.0" @@ -1657,6 +1677,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.56" @@ -1704,6 +1733,20 @@ version = "0.2.112" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +[[package]] +name = "libgit2-sys" +version = "0.13.1+1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e598aa7a4faedf1ea1b4608f582b06f0f40211eec551b7ef36019ae3f62def" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + [[package]] name = "libnghttp2-sys" version = "0.1.7+1.45.0" @@ -1714,6 +1757,20 @@ dependencies = [ "libc", ] +[[package]] +name = "libssh2-sys" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + [[package]] name = "libz-sys" version = "1.1.3" @@ -2081,12 +2138,14 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "petgraph" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" dependencies = [ "fixedbitset", "indexmap", + "serde", + "serde_derive", ] [[package]] diff --git a/examples/fizzbuzz/Forc.lock b/examples/fizzbuzz/Forc.lock new file mode 100644 index 00000000000..1c4fe42094c --- /dev/null +++ b/examples/fizzbuzz/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'fizzbuzz' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/examples/fizzbuzz/Forc.toml b/examples/fizzbuzz/Forc.toml index 2fd3a24bc1a..619fff8cfcb 100644 --- a/examples/fizzbuzz/Forc.toml +++ b/examples/fizzbuzz/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "fizzbuzz" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/examples/hello_world/Forc.lock b/examples/hello_world/Forc.lock new file mode 100644 index 00000000000..76e31a93b71 --- /dev/null +++ b/examples/hello_world/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'hello_world' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/examples/hello_world/Forc.toml b/examples/hello_world/Forc.toml index 84700d36c23..94b709901b2 100644 --- a/examples/hello_world/Forc.toml +++ b/examples/hello_world/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "hello_world" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/examples/subcurrency/Forc.lock b/examples/subcurrency/Forc.lock new file mode 100644 index 00000000000..02490c26563 --- /dev/null +++ b/examples/subcurrency/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'subcurrency' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/examples/subcurrency/Forc.toml b/examples/subcurrency/Forc.toml index d7e06e6d94a..0dbb1f97a00 100644 --- a/examples/subcurrency/Forc.toml +++ b/examples/subcurrency/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "subcurrency" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/examples/wallet_smart_contract/Forc.lock b/examples/wallet_smart_contract/Forc.lock new file mode 100644 index 00000000000..7a9b8bd4717 --- /dev/null +++ b/examples/wallet_smart_contract/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'wallet_smart_contract' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/examples/wallet_smart_contract/Forc.toml b/examples/wallet_smart_contract/Forc.toml index a881378bd7c..f93086d461f 100644 --- a/examples/wallet_smart_contract/Forc.toml +++ b/examples/wallet_smart_contract/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "wallet_smart_contract" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/forc/Cargo.toml b/forc/Cargo.toml index 94b6c17a746..f0e858a000b 100644 --- a/forc/Cargo.toml +++ b/forc/Cargo.toml @@ -15,13 +15,14 @@ anyhow = "1.0.41" clap = { version = "3.1.2", features = ["env", "derive"] } clap_complete = "3.1" dirs = "3.0.2" -flate2 = "1.0.20" -fuel-asm = "0.1" +fuel-asm = "0.1" fuel-gql-client = { version = "0.3", default-features = false } fuel-tx = "0.5" fuel-vm = "0.4" futures = "0.3" +git2 = "0.14" hex = "0.4.3" +petgraph = { version = "0.6.0", features = ["serde-1"] } prettydiff = "0.5.0" reqwest = { version = "0.11.4", default-features = false, features = ["json", "rustls-tls"] } semver = "1.0.3" @@ -38,11 +39,12 @@ term-table = "1.3" termcolor = "1.1" tokio = { version = "1.8.0", features = ["macros", "rt-multi-thread", "process"] } toml = "0.5" +unicode-xid = "0.2.2" ureq = "2.4" +url = "2" +uwuify = { version = "^0.2", optional = true } warp = "0.3" whoami = "1.1" -unicode-xid = "0.2.2" -uwuify = { version = "^0.2", optional = true } [features] default = [] diff --git a/forc/src/lib.rs b/forc/src/lib.rs index 7bd8794004c..06324a3fc1f 100644 --- a/forc/src/lib.rs +++ b/forc/src/lib.rs @@ -1,6 +1,8 @@ #![allow(dead_code)] mod cli; +mod lock; mod ops; +mod pkg; mod utils; #[cfg(feature = "test")] diff --git a/forc/src/lock.rs b/forc/src/lock.rs new file mode 100644 index 00000000000..ef9bae9e668 --- /dev/null +++ b/forc/src/lock.rs @@ -0,0 +1,171 @@ +use crate::pkg; +use anyhow::{anyhow, Result}; +use petgraph::{visit::EdgeRef, Direction}; +use serde::{Deserialize, Serialize}; +use std::{ + collections::{BTreeSet, HashMap}, + fs, + path::Path, + str::FromStr, +}; + +/// The graph of pinned packages represented as a toml-serialization-friendly structure. +#[derive(Debug, Default, Deserialize, Serialize)] +pub(crate) struct Lock { + // Named `package` so that each entry serializes to lock file under `[[package]]` like cargo. + pub(crate) package: BTreeSet, +} + +/// Packages that have been removed and added between two `Lock` instances. +/// +/// The result of `new_lock.diff(&old_lock)`. +pub(crate) struct Diff<'a> { + pub(crate) removed: BTreeSet<&'a PkgLock>, + pub(crate) added: BTreeSet<&'a PkgLock>, +} + +#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)] +pub(crate) struct PkgLock { + pub(crate) name: String, + // TODO: Cargo *always* includes version, whereas we don't even parse it when reading a + // project's `Manifest` yet. If we decide to enforce versions, we'll want to remove the + // `Option`. + version: Option, + source: Option, + // Dependency string is " ". The source string is included in order to be + // able to uniquely distinguish between multiple different versions of the same package. + dependencies: Vec, +} + +/// Convert the given package source to a string for use in the package lock. +/// +/// Returns `None` for sources that refer to a direct `Path`. +pub fn source_to_string(source: &pkg::SourcePinned) -> Option { + match source { + pkg::SourcePinned::Path => None, + pkg::SourcePinned::Git(git) => Some(git.to_string()), + pkg::SourcePinned::Registry(_reg) => unimplemented!("pkg registries not yet implemented"), + } +} + +/// Convert the given package source string read from a package lock to a `pkg::SourcePinned`. +pub fn source_from_str(s: &str) -> Result { + if let Ok(src) = pkg::SourceGitPinned::from_str(s) { + return Ok(pkg::SourcePinned::Git(src)); + } + // TODO: Try parse registry source. + Err(anyhow!( + "Unable to parse valid pinned source from given string {}", + s + )) +} + +impl PkgLock { + /// Construct a package lock given a package's entry in the package graph. + pub fn from_node(graph: &pkg::Graph, node: pkg::NodeIx) -> Self { + let pinned = &graph[node]; + let name = pinned.name.clone(); + let version = match &pinned.source { + pkg::SourcePinned::Registry(reg) => Some(reg.source.version.clone()), + _ => None, + }; + let source = source_to_string(&pinned.source); + let mut dependencies: Vec = graph + .edges_directed(node, Direction::Outgoing) + .map(|edge| { + let dep_node = edge.target(); + let dep = &graph[dep_node]; + let source_string = source_to_string(&dep.source); + pkg_unique_string(&dep.name, source_string.as_deref()) + }) + .collect(); + dependencies.sort(); + Self { + name, + version, + source, + dependencies, + } + } + + /// The string representation used for specifying this package as a dependency. + pub fn unique_string(&self) -> String { + pkg_unique_string(&self.name, self.source.as_deref()) + } +} + +impl Lock { + /// Load the `Lock` structure from the TOML `Forc.lock` file at the specified path. + pub fn from_path(path: &Path) -> Result { + let string = fs::read_to_string(&path) + .map_err(|e| anyhow!("failed to read {}: {}", path.display(), e))?; + toml::de::from_str(&string).map_err(|e| anyhow!("failed to parse lock file: {}", e)) + } + + /// Given a graph of pinned packages, create a `Lock` representing the `Forc.lock` file + /// structure. + pub fn from_graph(graph: &pkg::Graph) -> Self { + let package: BTreeSet<_> = graph + .node_indices() + .map(|node| PkgLock::from_node(graph, node)) + .collect(); + Self { package } + } + + /// Given a `Lock` loaded from a `Forc.lock` file, produce the graph of pinned dependencies. + pub fn to_graph(&self) -> Result { + let mut graph = pkg::Graph::new(); + + // On the first pass, add all nodes to the graph. + // Keep track of name+source to node-index mappings for the edge collection pass. + let mut pkg_to_node: HashMap = HashMap::new(); + for pkg in &self.package { + let key = pkg.unique_string(); + let name = pkg.name.clone(); + // TODO: We shouldn't use `pkg::SourcePinned` as we don't actually know the `Path` + // until we follow the dependency graph. Use something like a `ParsedSource` type here + // instead. + let pkg_source_string = pkg.source.clone(); + let source = match &pkg_source_string { + None => pkg::SourcePinned::Path, + Some(s) => source_from_str(s).map_err(|e| { + anyhow!("invalid 'source' entry for package {} lock: {}", name, e) + })?, + }; + let pkg = pkg::Pinned { name, source }; + let node = graph.add_node(pkg); + pkg_to_node.insert(key, node); + } + + // On the second pass, add all edges. + for pkg in &self.package { + let key = pkg.unique_string(); + let node = pkg_to_node[&key]; + for dep_key in &pkg.dependencies { + let dep_node = pkg_to_node + .get(&dep_key[..]) + .cloned() + .ok_or_else(|| anyhow!("found dep {} without node entry in graph", dep_key))?; + graph.add_edge(node, dep_node, ()); + } + } + + Ok(graph) + } + + /// Create a diff between `self` and the `old` `Lock`. + /// + /// Useful for showing the user which dependencies are out of date, or which have been updated. + pub fn diff<'a>(&'a self, old: &'a Self) -> Diff<'a> { + let added = self.package.difference(&old.package).collect(); + let removed = old.package.difference(&self.package).collect(); + Diff { added, removed } + } +} + +fn pkg_unique_string(name: &str, source: Option<&str>) -> String { + match source { + None => name.to_string(), + Some(s) => format!("{} {}", name, s), + } +} diff --git a/forc/src/main.rs b/forc/src/main.rs index c2a1b119259..db2b13c0ac7 100644 --- a/forc/src/main.rs +++ b/forc/src/main.rs @@ -1,6 +1,8 @@ #![allow(warnings)] mod cli; +mod lock; mod ops; +mod pkg; mod utils; use anyhow::Result; diff --git a/forc/src/ops/forc_abi_json.rs b/forc/src/ops/forc_abi_json.rs index b1eb7e0e8a6..c81d03000da 100644 --- a/forc/src/ops/forc_abi_json.rs +++ b/forc/src/ops/forc_abi_json.rs @@ -11,8 +11,8 @@ pub fn build(command: JsonAbiCommand) -> Result { minify_json_abi: command.minify, ..Default::default() }; - let (_bytes, json_abi) = crate::ops::forc_build::build(build_command)?; - let json_abi = json!(json_abi); + let compiled = crate::ops::forc_build::build(build_command)?; + let json_abi = json!(compiled.json_abi); if let Some(outfile) = command.json_outfile { let file = File::create(outfile).map_err(|e| e)?; let res = if command.minify { diff --git a/forc/src/ops/forc_build.rs b/forc/src/ops/forc_build.rs index 172d040c8ba..b302199cc3f 100644 --- a/forc/src/ops/forc_build.rs +++ b/forc/src/ops/forc_build.rs @@ -1,29 +1,19 @@ -use crate::utils::dependency::{Dependency, DependencyDetails}; -use crate::utils::helpers::{find_file_name, find_main_path}; use crate::{ cli::BuildCommand, - utils::dependency, - utils::helpers::{ - default_output_directory, get_main_file, print_on_failure, print_on_success, - print_on_success_library, read_manifest, - }, + lock::Lock, + pkg, + utils::helpers::{default_output_directory, lock_path, print_lock_diff, read_manifest}, }; -use std::fs::{self, File}; -use std::io::Write; -use std::sync::Arc; -use sway_core::{FinalizedAsm, TreeType}; -use sway_utils::{find_manifest_dir, MANIFEST_FILE_NAME}; - -use sway_core::{ - create_module, source_map::SourceMap, BuildConfig, BytecodeCompilationResult, - CompilationResult, CompileAstResult, NamespaceRef, NamespaceWrapper, TypedParseTree, -}; -use sway_types::JsonABI; - use anyhow::{anyhow, bail, Result}; -use std::path::{Path, PathBuf}; +use std::{ + fs::{self, File}, + io::Write, + path::PathBuf, +}; +use sway_core::source_map::SourceMap; +use sway_utils::{find_manifest_dir, MANIFEST_FILE_NAME}; -pub fn build(command: BuildCommand) -> Result<(Vec, JsonABI)> { +pub fn build(command: BuildCommand) -> Result { let BuildCommand { path, binary_outfile, @@ -32,97 +22,104 @@ pub fn build(command: BuildCommand) -> Result<(Vec, JsonABI)> { print_finalized_asm, print_intermediate_asm, print_ir, - offline_mode, - silent_mode, + offline_mode: offline, + silent_mode: silent, output_directory, minify_json_abi, } = command; + let build_conf = pkg::BuildConf { + use_ir, + print_ir, + print_finalized_asm, + print_intermediate_asm, + }; + // find manifest directory, even if in subdirectory let this_dir = if let Some(ref path) = path { PathBuf::from(path) } else { - std::env::current_dir().map_err(|e| anyhow!("{:?}", e))? + std::env::current_dir()? }; let manifest_dir = match find_manifest_dir(&this_dir) { Some(dir) => dir, None => { - return Err(anyhow!( + bail!( "could not find `{}` in `{}` or any parent directory", MANIFEST_FILE_NAME, this_dir.display(), - )) + ); } }; - - let mut manifest = read_manifest(&manifest_dir)?; - let main_path = find_main_path(&manifest_dir, &manifest); - let file_name = find_file_name(&manifest_dir, &main_path)?; - - let build_config = BuildConfig::root_from_file_name_and_manifest_path( - file_name.to_path_buf(), - manifest_dir.clone(), - ) - .use_ir(use_ir || print_ir) // --print-ir implies --use-ir. - .print_finalized_asm(print_finalized_asm) - .print_intermediate_asm(print_intermediate_asm) - .print_ir(print_ir); - - let namespace = create_module(); - + let manifest = read_manifest(&manifest_dir)?; + let lock_path = lock_path(&manifest_dir); + + // Load the build plan from the lock file. + let plan_result = pkg::BuildPlan::from_lock_file(&lock_path); + + // Retrieve the old lock file state so we can produce a diff. + let old_lock = plan_result + .as_ref() + .ok() + .map(|plan| Lock::from_graph(&plan.graph)) + .unwrap_or_default(); + + // Validate the loaded build plan for the current manifest. + let plan_result = plan_result.and_then(|plan| plan.validate(&manifest).map(|_| plan)); + + // If necessary, construct a new build plan. + let plan: pkg::BuildPlan = plan_result.or_else(|e| -> Result { + println!(" Creating a new `Forc.lock` file"); + println!(" Cause: {}", e); + let plan = pkg::BuildPlan::new(&manifest_dir, offline)?; + let lock = Lock::from_graph(&plan.graph); + let diff = lock.diff(&old_lock); + print_lock_diff(&manifest.project.name, &diff); + let string = toml::ser::to_string_pretty(&lock) + .map_err(|e| anyhow!("failed to serialize lock file: {}", e))?; + fs::write(&lock_path, &string).map_err(|e| anyhow!("failed to write lock file: {}", e))?; + println!(" Created new lock file at {}", lock_path.display()); + Ok(plan) + })?; + + // Iterate over and compile all packages. + let mut namespace_map = Default::default(); let mut source_map = SourceMap::new(); let mut json_abi = vec![]; - - if let Some(ref mut deps) = manifest.dependencies { - for (dependency_name, dependency_details) in deps.iter_mut() { - let dep_json_abi = compile_dependency_lib( - &this_dir, - dependency_name, - dependency_details, - namespace, - silent_mode, - offline_mode, - )?; - json_abi.extend(dep_json_abi); - - source_map.insert_dependency(match dependency_details { - Dependency::Simple(..) => { - todo!("simple deps (compile_dependency_lib should have errored on this)"); - } - Dependency::Detailed(DependencyDetails { path, .. }) => path - .as_ref() - .expect("compile_dependency_lib should have set this") - .clone(), - }); - } + let mut bytecode = vec![]; + for &node in &plan.compilation_order { + let dep_namespace = + pkg::dependency_namespace(&namespace_map, &plan.graph, &plan.compilation_order, node); + let pkg = &plan.graph[node]; + let path = &plan.path_map[&pkg.id()]; + let res = pkg::compile( + pkg, + path, + &build_conf, + dep_namespace, + &mut source_map, + silent, + )?; + let (compiled, maybe_namespace) = res; + if let Some(namespace) = maybe_namespace { + namespace_map.insert(node, namespace); + } + json_abi.extend(compiled.json_abi); + bytecode = compiled.bytecode; + source_map.insert_dependency(path.clone()); } - // now, compile this program with all of its dependencies - let main_file = get_main_file(&manifest, &manifest_dir)?; - - let (main, main_json_abi) = compile( - main_file, - &manifest.project.name, - namespace, - build_config, - &mut source_map, - silent_mode, - )?; - - json_abi.extend(main_json_abi); - if let Some(outfile) = binary_outfile { - let mut file = File::create(outfile).map_err(|e| e)?; - file.write_all(main.as_slice()).map_err(|e| e)?; + let mut file = File::create(outfile)?; + file.write_all(bytecode.as_slice())?; } if let Some(outfile) = debug_outfile { fs::write( outfile, &serde_json::to_vec(&source_map).expect("JSON serialization failed"), - ) - .map_err(|e| e)?; + )?; } // TODO: We may support custom build profiles in the future. @@ -133,252 +130,27 @@ pub fn build(command: BuildCommand) -> Result<(Vec, JsonABI)> { .map(PathBuf::from) .unwrap_or_else(|| default_output_directory(&manifest_dir).join(profile)); if !output_dir.exists() { - fs::create_dir_all(&output_dir).map_err(|e| e)?; + fs::create_dir_all(&output_dir)?; } // Place build artifacts into the output directory. let bin_path = output_dir .join(&manifest.project.name) .with_extension("bin"); - std::fs::write(&bin_path, main.as_slice()).map_err(|e| e)?; + std::fs::write(&bin_path, bytecode.as_slice())?; if !json_abi.is_empty() { let json_abi_stem = format!("{}-abi", manifest.project.name); let json_abi_path = output_dir.join(&json_abi_stem).with_extension("json"); - let file = File::create(json_abi_path).map_err(|e| e)?; + let file = File::create(json_abi_path)?; let res = if minify_json_abi { serde_json::to_writer(&file, &json_abi) } else { serde_json::to_writer_pretty(&file, &json_abi) }; - res.map_err(|e| e)?; - } - - println!(" Bytecode size is {} bytes.", main.len()); - - Ok((main, json_abi)) -} - -/// Takes a dependency and returns a namespace of exported things from that dependency including -/// trait implementations. -/// -/// Also returns the JSON ABI of the library. This may be empty in the case that no `abi` was -/// exposed. -fn compile_dependency_lib<'manifest>( - project_file_path: &Path, - dependency_name: &'manifest str, - dependency_lib: &mut Dependency, - namespace: NamespaceRef, - silent_mode: bool, - offline_mode: bool, -) -> Result { - let mut details = match dependency_lib { - Dependency::Simple(..) => { - bail!("Not yet implemented: Simple version-spec dependencies require a registry.") - } - Dependency::Detailed(ref mut details) => details, - }; - // Download a non-local dependency if the `git` property is set in this dependency. - if let Some(ref git) = details.git { - // the qualified name of the dependency includes its source and some metadata to prevent - // conflating dependencies from different sources - let fully_qualified_dep_name = format!("{}-{}", dependency_name, git); - let downloaded_dep_path = match dependency::download_github_dep( - &fully_qualified_dep_name, - git, - &details.branch, - &details.version, - offline_mode.into(), - ) { - Ok(path) => path, - Err(e) => { - bail!( - "Couldn't download dependency ({:?}): {:?}", - dependency_name, - e - ) - } - }; - - // Mutate this dependency's path to hold the newly downloaded dependency's path. - details.path = Some(downloaded_dep_path); + res?; } - let dep_path = match dependency_lib { - Dependency::Simple(..) => { - bail!("Not yet implemented: Simple version-spec dependencies require a registry.") - } - Dependency::Detailed(DependencyDetails { path, .. }) => path, - }; - let dep_path = match dep_path { - Some(p) => p, - None => bail!( - "Only simple path imports are supported right now. Please supply a path relative \ - to the manifest file." - ), - }; - - // dependency paths are relative to the path of the project being compiled - let mut project_path = PathBuf::from(project_file_path); - project_path.push(dep_path); + println!(" Bytecode size is {} bytes.", bytecode.len()); - // compile the dependencies of this dependency - // this should detect circular dependencies - let manifest_dir = match find_manifest_dir(&project_path) { - Some(o) => o, - None => { - bail!("Manifest not found for dependency {:?}.", project_path) - } - }; - let mut manifest_of_dep = read_manifest(&manifest_dir)?; - let main_path = find_main_path(&manifest_dir, &manifest_of_dep); - let file_name = find_file_name(&manifest_dir, &main_path)?; - - let build_config = BuildConfig::root_from_file_name_and_manifest_path( - file_name.to_path_buf(), - manifest_dir.clone(), - ); - - let dep_namespace = create_module(); - if let Some(ref mut deps) = manifest_of_dep.dependencies { - for (dependency_name, ref mut dependency_lib) in deps { - // to do this properly, iterate over list of dependencies make sure there are no - // circular dependencies - compile_dependency_lib( - &manifest_dir, - dependency_name, - dependency_lib, - dep_namespace, - silent_mode, - offline_mode, - )?; - } - } - - let main_file = get_main_file(&manifest_of_dep, &manifest_dir)?; - - let (compiled, json_abi) = compile_library( - main_file, - &manifest_of_dep.project.name, - dep_namespace, - build_config, - silent_mode, - )?; - - namespace.insert_module_ref(dependency_name.to_string(), compiled); - - Ok(json_abi) -} - -fn compile_library( - source: Arc, - proj_name: &str, - namespace: NamespaceRef, - build_config: BuildConfig, - silent_mode: bool, -) -> Result<(NamespaceRef, JsonABI)> { - let res = sway_core::compile_to_ast(source, namespace, &build_config); - match res { - CompileAstResult::Success { - parse_tree, - tree_type, - warnings, - } => { - let errors = vec![]; - match tree_type { - TreeType::Library { .. } => { - print_on_success_library(silent_mode, proj_name, &warnings); - let json_abi = generate_json_abi(&*parse_tree); - let namespace = parse_tree.get_namespace_ref(); - Ok((namespace, json_abi)) - } - _ => { - print_on_failure(silent_mode, &warnings, &errors); - bail!("Failed to compile {}", proj_name) - } - } - } - CompileAstResult::Failure { warnings, errors } => { - print_on_failure(silent_mode, &warnings, &errors); - bail!("Failed to compile {}", proj_name) - } - } -} - -fn compile( - source: Arc, - proj_name: &str, - namespace: NamespaceRef, - build_config: BuildConfig, - source_map: &mut SourceMap, - silent_mode: bool, -) -> Result<(Vec, JsonABI)> { - let ast_res = sway_core::compile_to_ast(source, namespace, &build_config); - let (json_abi, tree_type, warnings) = match &ast_res { - CompileAstResult::Success { - parse_tree, - tree_type, - warnings, - } => (generate_json_abi(&*parse_tree), tree_type, warnings), - CompileAstResult::Failure { warnings, errors } => { - print_on_failure(silent_mode, warnings, errors); - bail!("Failed to compile {}", proj_name); - } - }; - - if let TreeType::Library { .. } = tree_type { - print_on_success(silent_mode, proj_name, warnings, tree_type.clone()); - return Ok((vec![], json_abi)); - } - - let asm_res = sway_core::ast_to_asm(ast_res, &build_config); - let bc_res = sway_core::asm_to_bytecode(asm_res, source_map); - - let bytes = match bc_res { - BytecodeCompilationResult::Success { bytes, warnings } => { - print_on_success(silent_mode, proj_name, &warnings, TreeType::Script {}); - bytes - } - BytecodeCompilationResult::Library { warnings } => { - print_on_success_library(silent_mode, proj_name, &warnings); - vec![] - } - BytecodeCompilationResult::Failure { errors, warnings } => { - print_on_failure(silent_mode, &warnings, &errors); - bail!("Failed to compile {}", proj_name); - } - }; - Ok((bytes, json_abi)) -} - -fn compile_to_asm( - source: Arc, - proj_name: &str, - namespace: NamespaceRef, - build_config: BuildConfig, - silent_mode: bool, -) -> Result { - let res = sway_core::compile_to_asm(source, namespace, build_config); - match res { - CompilationResult::Success { asm, warnings } => { - print_on_success(silent_mode, proj_name, &warnings, TreeType::Script {}); - Ok(asm) - } - CompilationResult::Library { warnings, .. } => { - print_on_success_library(silent_mode, proj_name, &warnings); - Ok(FinalizedAsm::Library) - } - CompilationResult::Failure { errors, warnings } => { - print_on_failure(silent_mode, &warnings, &errors); - bail!("Failed to compile {}", proj_name); - } - } -} - -fn generate_json_abi(ast: &TypedParseTree) -> JsonABI { - match ast { - TypedParseTree::Contract { abi_entries, .. } => { - abi_entries.iter().map(|x| x.generate_json_abi()).collect() - } - _ => vec![], - } + Ok(pkg::Compiled { bytecode, json_abi }) } diff --git a/forc/src/ops/forc_dep_check.rs b/forc/src/ops/forc_dep_check.rs deleted file mode 100644 index e8c73095508..00000000000 --- a/forc/src/ops/forc_dep_check.rs +++ /dev/null @@ -1,133 +0,0 @@ -use crate::utils::{ - dependency, - helpers::{read_manifest, user_forc_directory}, -}; -use anyhow::{bail, Result}; -use semver::Version; -use std::{ - path::{Path, PathBuf}, - str, -}; -use sway_utils::find_manifest_dir; - -/// Forc check will check if there are updates to Github-based dependencies. -/// If a target dependency `-d` is passed, it will check only this one dependency. -/// Otherwise, it will check for all dependencies in the manifest. -/// Note that this won't automatically update the dependencies, it will only -/// point out newer versions of the dependencies. -/// If a dependency was specified in the manifest _without_ a tag/version, -/// `forc update` can automatically update to the latest version. -/// If a dependency has a tag, `forc dep_check` will let you know if there's a newer tag -/// and then you can decide whether to update it in the manifest or not. -pub async fn check(path: Option, target_dependency: Option) -> Result<()> { - let this_dir = if let Some(path) = path { - PathBuf::from(path) - } else { - std::env::current_dir()? - }; - - let manifest_dir = match find_manifest_dir(&this_dir) { - Some(dir) => dir, - None => { - bail!( - "No manifest file found in this directory or any parent directories of it: {:?}", - this_dir - ) - } - }; - - let mut manifest = read_manifest(&manifest_dir).unwrap(); - - let dependencies = dependency::get_detailed_dependencies(&mut manifest); - - match target_dependency { - // Target dependency (`-d`) specified - Some(target_dep) => match dependencies.get(&target_dep) { - Some(dep) => Ok(check_dependency(&target_dep, dep).await?), - None => bail!("dependency {} not found", target_dep), - }, - // No target dependency specified, try and update all dependencies - None => { - for (dependency_name, dep) in dependencies { - check_dependency(&dependency_name, dep).await?; - } - Ok(()) - } - } -} - -async fn check_dependency( - dependency_name: &str, - dep: &dependency::DependencyDetails, -) -> Result<()> { - let user_forc_dir = user_forc_directory(); - let dep_dir = user_forc_dir.join(dependency_name); - let target_directory = match &dep.branch { - Some(branch) => dep_dir.join(branch), - None => dep_dir.join("default"), - }; - - // Currently we only handle checks on github-based dependencies - if let Some(git) = &dep.git { - match &dep.version { - Some(version) => check_tagged_dependency(dependency_name, version, git).await?, - None => check_untagged_dependency(git, &target_directory, dependency_name, dep).await?, - } - } - Ok(()) -} - -async fn check_tagged_dependency( - dependency_name: &str, - current_version: &str, - git_repo: &str, -) -> Result<()> { - let releases = dependency::get_github_repo_releases(git_repo).await?; - - let current_release = Version::parse(current_version)?; - - let mut latest = current_release.clone(); - - for release in &releases { - let release_version = Version::parse(release)?; - - if release_version.gt(¤t_release) { - latest = release_version; - } - } - - if current_release.ne(&latest) { - println!( - "[{}] not up-to-date. Current version: {}, latest: {}", - dependency_name, current_release, latest - ); - } else { - println!( - "[{}] up-to-date. Current version: {}", - dependency_name, current_release, - ); - } - - Ok(()) -} - -async fn check_untagged_dependency( - git_repo: &str, - target_directory: &Path, - dependency_name: &str, - dep: &dependency::DependencyDetails, -) -> Result<()> { - let current = dependency::get_current_dependency_version(target_directory)?; - - let latest_hash = dependency::get_latest_commit_sha(git_repo, &dep.branch).await?; - - if current.hash == latest_hash { - println!("{} is up-to-date", dependency_name); - } else { - println!( - "[{}] not up-to-date. Current version: {}, latest: {}", - dependency_name, current.hash, latest_hash - ); - } - Ok(()) -} diff --git a/forc/src/ops/forc_deploy.rs b/forc/src/ops/forc_deploy.rs index 347a7a15ee6..ade1604a828 100644 --- a/forc/src/ops/forc_deploy.rs +++ b/forc/src/ops/forc_deploy.rs @@ -59,9 +59,9 @@ pub async fn deploy(command: DeployCommand) -> Result::new(), Vec::::new(), ); diff --git a/forc/src/ops/forc_run.rs b/forc/src/ops/forc_run.rs index a867b91b32d..a9f8fa20189 100644 --- a/forc/src/ops/forc_run.rs +++ b/forc/src/ops/forc_run.rs @@ -51,12 +51,12 @@ pub async fn run(command: RunCommand) -> Result<(), CliError> { minify_json_abi: command.minify_json_abi, }; - let (compiled_script, _json_abi) = forc_build::build(build_command)?; + let compiled = forc_build::build(build_command)?; let contracts = command.contract.unwrap_or_default(); let (inputs, outputs) = get_tx_inputs_and_outputs(contracts); let tx = create_tx_with_script_and_data( - compiled_script, + compiled.bytecode, script_data, inputs, outputs, diff --git a/forc/src/ops/forc_update.rs b/forc/src/ops/forc_update.rs index f74b250be84..b1e84e5b8de 100644 --- a/forc/src/ops/forc_update.rs +++ b/forc/src/ops/forc_update.rs @@ -1,39 +1,39 @@ use crate::{ cli::UpdateCommand, - ops::forc_dep_check, - utils::{ - dependency, - helpers::{read_manifest, user_forc_directory}, - }, + lock::Lock, + pkg, + utils::helpers::{lock_path, print_lock_diff, read_manifest}, }; use anyhow::{anyhow, Result}; -use std::{path::PathBuf, str}; +use std::{fs, path::PathBuf}; use sway_utils::find_manifest_dir; -/// Forc update will update the contents inside the Forc dependencies directory. -/// If a dependency `d` is passed as parameter, it will only try and update that specific dependency. -/// Otherwise, it will try and update all GitHub-based dependencies in a project's `Forc.toml`. -/// It won't automatically update dependencies that have a version specified, if you have -/// specified a version for a dependency and want to update it you should, instead, -/// run `forc update --check` to check for updates for all GitHub-based dependencies, and if -/// a new version is detected and return, manually update your `Forc.toml` with this new version. +/// Running `forc update` will check for updates for the entire dependency graph and commit new +/// semver-compatible versions to the `Forc.lock` file. For git dependencies, the commit is updated +/// to the HEAD of the specified branch, or remains unchanged in the case a tag is specified. Path +/// dependencies remain unchanged as they are always sourced directly. +/// +/// This is called during `forc build` in the case that there is no existing `Forc.lock` file for +/// the project. +/// +/// Run `forc update --check` to perform a dry-run and produce a list of updates that will be +/// performed across all dependencies without actually committing them to the lock file. +/// +/// Use the `--package ` flag to update only a specific package throughout the +/// dependency graph. pub async fn update(command: UpdateCommand) -> Result<()> { - if command.check { - return forc_dep_check::check(command.path, command.target_dependency).await; - } - let UpdateCommand { path, - target_dependency, - check: _, + check, + // TODO: Use `package` here rather than `target_dependency` + target_dependency: _, + .. } = command; - let this_dir = if let Some(path) = path { - PathBuf::from(path) - } else { - std::env::current_dir()? + let this_dir = match path { + Some(path) => PathBuf::from(path), + None => std::env::current_dir()?, }; - let manifest_dir = match find_manifest_dir(&this_dir) { Some(dir) => dir, None => { @@ -44,58 +44,24 @@ pub async fn update(command: UpdateCommand) -> Result<()> { } }; - let mut manifest = read_manifest(&manifest_dir).unwrap(); + let manifest = read_manifest(&manifest_dir).map_err(|e| anyhow!("{}", e))?; + let lock_path = lock_path(&manifest_dir); + let old_lock = Lock::from_path(&lock_path).ok().unwrap_or_default(); + let offline = false; + let new_plan = pkg::BuildPlan::new(&manifest_dir, offline).map_err(|e| anyhow!("{}", e))?; + let new_lock = Lock::from_graph(&new_plan.graph); + let diff = new_lock.diff(&old_lock); + print_lock_diff(&manifest.project.name, &diff); - let dependencies = dependency::get_detailed_dependencies(&mut manifest); - - match target_dependency { - // Target dependency (`-d`) specified - Some(target_dep) => match dependencies.get(&target_dep) { - Some(dep) => Ok(update_dependency(&target_dep, dep).await?), - None => return Err(anyhow!("dependency {} not found", target_dep)), - }, - // No target dependency specified, try and update all dependencies - None => { - for (dependency_name, dep) in dependencies { - update_dependency(&dependency_name, dep).await?; - } - Ok(()) - } + // If we're not only `check`ing, write the updated lock file. + if !check { + let string = toml::ser::to_string_pretty(&new_lock) + .map_err(|e| anyhow!("failed to serialize lock file: {}", e))?; + fs::write(&lock_path, &string).map_err(|e| anyhow!("failed to write lock file: {}", e))?; + println!(" Created new lock file at {}", lock_path.display()); + } else { + println!(" `--check` enabled: `Forc.lock` was not changed"); } -} - -async fn update_dependency( - dependency_name: &str, - dep: &dependency::DependencyDetails, -) -> Result<()> { - // Currently we only handle updates on github-based dependencies - if let Some(git) = &dep.git { - match &dep.version { - // Automatically updating a dependency that has a tag/version specified in `Forc.toml` - // would mean to update the `Forc.toml` file, which I believe isn't a very - // nice behavior. Instead, if a tag/version is specified, the user should - // lookup for a desired version and manually specify it in `Forc.toml`. - Some(version) => println!("Ignoring update for {} at version {}: Forc update not implemented for dependencies with specified tag. To update to another tag, change the tag in `Forc.toml` and run the build command.", dependency_name, version), - None => { - let forc_dir = user_forc_directory(); - let dep_dir = forc_dir.join(dependency_name); - let target_directory = match &dep.branch { - Some(branch) => dep_dir.join(branch), - None => dep_dir.join("default"), - }; - - let current = dependency::get_current_dependency_version(&target_directory)?; - let latest_hash = dependency::get_latest_commit_sha(git, &dep.branch).await?; - - if current.hash == latest_hash { - println!("{} is up-to-date", dependency_name); - } else { - dependency::replace_dep_version(&target_directory, git, dep)?; - println!("{}: {} -> {}", dependency_name, current.hash, latest_hash); - } - } - } - } Ok(()) } diff --git a/forc/src/ops/mod.rs b/forc/src/ops/mod.rs index 15e11339b71..c6df7a4120c 100644 --- a/forc/src/ops/mod.rs +++ b/forc/src/ops/mod.rs @@ -1,7 +1,6 @@ pub mod forc_abi_json; pub mod forc_build; pub mod forc_clean; -pub mod forc_dep_check; pub mod forc_deploy; pub mod forc_explorer; pub mod forc_fmt; diff --git a/forc/src/pkg.rs b/forc/src/pkg.rs new file mode 100644 index 00000000000..f1f264555dd --- /dev/null +++ b/forc/src/pkg.rs @@ -0,0 +1,853 @@ +use crate::{ + lock::Lock, + utils::{ + dependency::Dependency, + helpers::{ + find_file_name, find_main_path, get_main_file, git_checkouts_directory, + print_on_failure, print_on_success, print_on_success_library, read_manifest, + }, + manifest::Manifest, + }, +}; +use anyhow::{anyhow, bail, Result}; +use petgraph::{self, visit::EdgeRef, Directed, Direction}; +use serde::{Deserialize, Serialize}; +use std::{ + collections::{hash_map, BTreeSet, HashMap, HashSet}, + hash::{Hash, Hasher}, + path::{Path, PathBuf}, + str::FromStr, +}; +use sway_core::{ + source_map::SourceMap, BuildConfig, BytecodeCompilationResult, CompileAstResult, NamespaceRef, + NamespaceWrapper, TreeType, TypedParseTree, +}; +use sway_types::JsonABI; +use url::Url; + +type GraphIx = u32; +type Node = Pinned; +type Edge = (); +pub type Graph = petgraph::Graph; +pub type NodeIx = petgraph::graph::NodeIndex; +pub type PathMap = HashMap; + +/// A unique ID for a pinned package. +/// +/// The internal value is produced by hashing the package's name and `SourcePinned`. +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PinnedId(u64); + +/// The result of successfully compiling a package. +pub struct Compiled { + pub json_abi: JsonABI, + pub bytecode: Vec, +} + +/// A package uniquely identified by name along with its source. +#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)] +pub struct Pkg { + /// The unique name of the package. + pub name: String, + /// Where the package is sourced from. + pub source: Source, +} + +/// A package uniquely identified by name along with its pinned source. +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)] +pub struct Pinned { + pub name: String, + pub source: SourcePinned, +} + +/// Specifies a base source for a package. +/// +/// - For registry packages, this includes a base version. +/// - For git packages, this includes a base git reference like a branch or tag. +/// +/// Note that a `Source` does not specify a specific, pinned version. Rather, it specifies a source +/// at which the current latest version may be located. +#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)] +pub enum Source { + /// A git repo with a `Forc.toml` manifest at its root. + Git(SourceGit), + /// A path to a directory with a `Forc.toml` manifest at its root. + Path(PathBuf), + /// A forc project hosted on the official registry. + Registry(SourceRegistry), +} + +/// A git repo with a `Forc.toml` manifest at its root. +#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)] +pub struct SourceGit { + /// The URL at which the repository is located. + pub repo: Url, + /// A git reference, e.g. a branch or tag. + pub reference: String, +} + +/// A package from the official registry. +#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)] +pub struct SourceRegistry { + /// The base version specified for the package. + pub version: semver::Version, +} + +/// A pinned instance of a git source. +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)] +pub struct SourceGitPinned { + /// The git source that is being pinned. + pub source: SourceGit, + /// The hash to which we have pinned the source. + pub commit_hash: String, +} + +/// A pinned instance of the registry source. +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)] +pub struct SourceRegistryPinned { + /// The registry package with base version. + pub source: SourceRegistry, + /// The pinned version. + pub version: semver::Version, +} + +/// A pinned instance of the package source. +/// +/// Specifies an exact version to use, or an exact commit in the case of git dependencies. The +/// pinned version or commit is updated upon creation of the lock file and on `forc update`. +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize)] +pub enum SourcePinned { + Git(SourceGitPinned), + Path, + Registry(SourceRegistryPinned), +} + +/// Represents the full build plan for a project. +#[derive(Clone)] +pub(crate) struct BuildPlan { + pub(crate) graph: Graph, + pub(crate) path_map: PathMap, + pub(crate) compilation_order: Vec, +} + +// Parameters to pass through to the `BuildConfig` during compilation. +pub(crate) struct BuildConf { + pub(crate) use_ir: bool, + pub(crate) print_ir: bool, + pub(crate) print_finalized_asm: bool, + pub(crate) print_intermediate_asm: bool, +} + +/// Error returned upon failed parsing of `SourceGitPinned::from_str`. +#[derive(Clone, Debug)] +pub enum SourceGitPinnedParseError { + Prefix, + Url, + Reference, + CommitHash, +} + +impl BuildPlan { + /// Create a new build plan for the project by fetching and pinning dependenies. + pub fn new(manifest_dir: &Path, offline: bool) -> Result { + let manifest = read_manifest(manifest_dir)?; + let (graph, path_map) = fetch_deps(manifest_dir.to_path_buf(), &manifest, offline)?; + let compilation_order = compilation_order(&graph)?; + Ok(Self { + graph, + path_map, + compilation_order, + }) + } + + /// Attempt to load the build plan from the `Lock`. + pub fn from_lock(proj_path: &Path, lock: &Lock) -> Result { + let graph = lock.to_graph()?; + let compilation_order = compilation_order(&graph)?; + let path_map = graph_to_path_map(proj_path, &graph, &compilation_order)?; + Ok(Self { + graph, + path_map, + compilation_order, + }) + } + + /// Attempt to load the build plan from the `Forc.lock` file. + pub fn from_lock_file(lock_path: &Path) -> Result { + let proj_path = lock_path.parent().unwrap(); + let lock = Lock::from_path(lock_path)?; + Self::from_lock(proj_path, &lock) + } + + /// Ensure that the build plan is valid for the given manifest. + pub fn validate(&self, manifest: &Manifest) -> Result<()> { + // Retrieve project's graph node. + let proj_node = *self + .compilation_order + .last() + .ok_or_else(|| anyhow!("Invalid Graph"))?; + + // Collect dependency `Source`s from graph. + let plan_dep_pkgs: BTreeSet<_> = self + .graph + .edges_directed(proj_node, Direction::Outgoing) + .map(|e| self.graph[e.target()].unpinned(&self.path_map)) + .collect(); + + // Collect dependency `Source`s from manifest. + let proj_id = self.graph[proj_node].id(); + let proj_path = &self.path_map[&proj_id]; + let manifest_dep_pkgs = manifest + .dependencies + .as_ref() + .into_iter() + .flat_map(|deps| deps.iter()) + .map(|(name, dep)| { + // NOTE: Temporarily warn about `version` until we have support for registries. + if let Dependency::Detailed(det) = dep { + if det.version.is_some() { + crate::utils::helpers::println_yellow_err(&format!( + " WARNING! Dependency \"{}\" specifies the unused `version` field: \ + consider using `branch` or `tag` instead", + name + )) + .unwrap(); + } + } + + let name = name.clone(); + let source = dep_to_source(proj_path, dep)?; + Ok(Pkg { name, source }) + }) + .collect::>>()?; + + // Ensure both `pkg::Source` are equal. If not, error. + if plan_dep_pkgs != manifest_dep_pkgs { + bail!("Manifest dependencies do not match"); + } + + Ok(()) + } +} + +impl Pinned { + /// Retrieve the unique ID for the pinned package. + /// + /// The internal value is produced by hashing the package's name and `SourcePinned`. + pub fn id(&self) -> PinnedId { + PinnedId::new(&self.name, &self.source) + } + + /// Retrieve the unpinned version of this source. + pub fn unpinned(&self, path_map: &PathMap) -> Pkg { + let id = self.id(); + let source = match &self.source { + SourcePinned::Git(git) => Source::Git(git.source.clone()), + SourcePinned::Path => Source::Path(path_map[&id].to_path_buf()), + SourcePinned::Registry(reg) => Source::Registry(reg.source.clone()), + }; + let name = self.name.clone(); + Pkg { name, source } + } +} + +impl PinnedId { + /// Hash the given name and pinned source to produce a unique pinned package ID. + pub fn new(name: &str, source: &SourcePinned) -> Self { + let mut hasher = hash_map::DefaultHasher::default(); + name.hash(&mut hasher); + source.hash(&mut hasher); + Self(hasher.finish()) + } +} + +impl ToString for SourceGitPinned { + fn to_string(&self) -> String { + // git+?reference=# + format!( + "git+{}?reference={}#{}", + self.source.repo, self.source.reference, self.commit_hash, + ) + } +} + +impl FromStr for SourceGitPinned { + type Err = SourceGitPinnedParseError; + fn from_str(s: &str) -> Result { + // git+?reference=# + let s = s.trim(); + + // Check for "git+" at the start. + const PREFIX: &str = "git+"; + if s.find(PREFIX) != Some(0) { + return Err(SourceGitPinnedParseError::Prefix); + } + let s = &s[PREFIX.len()..]; + + // Parse the `repo` URL. + let repo_str = s.split('?').next().ok_or(SourceGitPinnedParseError::Url)?; + let repo = Url::parse(repo_str).map_err(|_| SourceGitPinnedParseError::Url)?; + let s = &s[repo_str.len() + "?".len()..]; + + // Parse the "reference=" string. + // TODO: This will need updating if we want to support omitting a git reference and allow + // for specifying commit hashes directly in `Forc.toml` git dependencies. + const REFERENCE: &str = "reference="; + if s.find(REFERENCE) != Some(0) { + return Err(SourceGitPinnedParseError::Reference); + } + let s = &s[REFERENCE.len()..]; + + // And now retrieve the `reference` and `commit_hash` values. + let mut s_iter = s.split('#'); + let reference = s_iter + .next() + .ok_or(SourceGitPinnedParseError::Reference)? + .to_string(); + let commit_hash = s_iter + .next() + .ok_or(SourceGitPinnedParseError::CommitHash)? + .to_string(); + + let source = SourceGit { repo, reference }; + Ok(Self { + source, + commit_hash, + }) + } +} + +/// The `pkg::Graph` is of *a -> b* where *a* depends on *b*. We can determine compilation order by +/// performing a toposort of the graph with reversed weights. The resulting order ensures all +/// dependencies are always compiled before their dependents. +pub fn compilation_order(graph: &Graph) -> Result> { + let rev_pkg_graph = petgraph::visit::Reversed(&graph); + petgraph::algo::toposort(rev_pkg_graph, None) + // TODO: Show full list of packages that cycle. + .map_err(|e| anyhow!("dependency cycle detected: {:?}", e)) +} + +/// Given graph of pinned dependencies and the directory for the root node, produce a path map +/// containing the path to the local source for every node in the graph. +pub fn graph_to_path_map( + proj_manifest_dir: &Path, + graph: &Graph, + compilation_order: &[NodeIx], +) -> Result { + let mut path_map = PathMap::new(); + + // We resolve all paths in reverse compilation order. + // That is, we follow paths starting from the project root. + let mut path_resolve_order = compilation_order.iter().cloned().rev(); + + // Add the project's package to the map. + let proj_node = path_resolve_order + .next() + .ok_or_else(|| anyhow!("graph must contain at least the project node"))?; + let proj_id = graph[proj_node].id(); + path_map.insert(proj_id, proj_manifest_dir.to_path_buf()); + + // Resolve all following dependencies, knowing their parents' paths will already be resolved. + for dep_node in path_resolve_order { + let dep = &graph[dep_node]; + let dep_path = match &dep.source { + SourcePinned::Git(git) => { + git_commit_path(&dep.name, &git.source.repo, &git.commit_hash) + } + SourcePinned::Path => { + let parent_node = graph + .edges_directed(dep_node, Direction::Incoming) + .next() + .ok_or_else(|| anyhow!("more than one root package detected in graph"))? + .source(); + let parent = &graph[parent_node]; + let parent_path = &path_map[&parent.id()]; + let parent_manifest = read_manifest(parent_path)?; + let detailed = parent_manifest + .dependencies + .as_ref() + .and_then(|deps| match &deps[&dep.name] { + Dependency::Detailed(detailed) => Some(detailed), + Dependency::Simple(_) => None, + }) + .ok_or_else(|| anyhow!("missing path info for dependency: {}", dep.name))?; + let rel_dep_path = detailed + .path + .as_ref() + .ok_or_else(|| anyhow!("missing path info for dependency: {}", dep.name))?; + parent_path.join(rel_dep_path) + } + SourcePinned::Registry(_reg) => { + bail!("registry dependencies are not yet supported"); + } + }; + if !dep_path.exists() { + match &dep.source { + SourcePinned::Path => { + bail!("pinned `path` dependency \"{}\" source missing", dep.name); + } + SourcePinned::Git(git) => { + println!(" Fetching {}", git.to_string()); + fetch_git(&dep.name, git)?; + } + SourcePinned::Registry(_reg) => { + bail!("registry dependencies are not yet supported"); + } + } + } + path_map.insert(dep.id(), dep_path); + } + + Ok(path_map) +} + +/// Fetch all depedencies and produce the dependency graph along with a map from each node's unique +/// ID to its local fetched path. +/// +/// This will determine pinned versions and commits for remote dependencies during traversal. +pub(crate) fn fetch_deps( + proj_manifest_dir: PathBuf, + proj_manifest: &Manifest, + offline_mode: bool, +) -> Result<(Graph, PathMap)> { + let mut graph = Graph::new(); + let mut path_map = PathMap::new(); + + // Add the project to the graph as the root node. + let name = proj_manifest.project.name.clone(); + let path = proj_manifest_dir; + let source = SourcePinned::Path; + let pkg = Pinned { name, source }; + path_map.insert(pkg.id(), path); + let root = graph.add_node(pkg); + + // The set of visited packages, starting with the root. + let mut visited = HashMap::new(); + visited.insert(graph[root].clone(), root); + + // Recursively fetch children and add them to the graph. + // TODO: Convert this recursion to use loop & stack to ensure deps can't cause stack overflow. + fetch_children(offline_mode, root, &mut graph, &mut path_map, &mut visited)?; + + Ok((graph, path_map)) +} + +/// Fetch children nodes of the given node and add unvisited nodes to the graph. +fn fetch_children( + offline_mode: bool, + node: NodeIx, + graph: &mut Graph, + path_map: &mut PathMap, + visited: &mut HashMap, +) -> Result<()> { + let parent = &graph[node]; + let parent_path = path_map[&parent.id()].clone(); + let manifest = read_manifest(&parent_path)?; + let deps = match &manifest.dependencies { + None => return Ok(()), + Some(deps) => deps, + }; + for (name, dep) in deps { + let name = name.clone(); + let source = dep_to_source(&parent_path, dep)?; + if offline_mode && !matches!(source, Source::Path(_)) { + bail!("Unable to fetch pkg {:?} in offline mode", source); + } + let pkg = Pkg { name, source }; + let pinned = pin_pkg(&pkg, path_map)?; + let dep_node = if let hash_map::Entry::Vacant(entry) = visited.entry(pinned.clone()) { + let node = graph.add_node(pinned); + entry.insert(node); + fetch_children(offline_mode, node, graph, path_map, visited)?; + node + } else { + visited[&pinned] + }; + graph.add_edge(node, dep_node, ()); + } + Ok(()) +} + +/// The name to use for a package's git repository under the user's forc directory. +fn git_repo_dir_name(name: &str, repo: &Url) -> String { + let repo_url_hash = hash_url(repo); + format!("{}-{:x}", name, repo_url_hash) +} + +fn hash_url(url: &Url) -> u64 { + let mut hasher = hash_map::DefaultHasher::new(); + url.hash(&mut hasher); + hasher.finish() +} + +/// A temporary directory that we can use for cloning a git-sourced package's repo and discovering +/// the current HEAD for the given git reference. +/// +/// The resulting directory is: +/// +/// ```ignore +/// $HOME/.forc/git/checkouts/tmp/name- +/// ``` +fn tmp_git_repo_dir(name: &str, repo: &Url) -> PathBuf { + let repo_dir_name = git_repo_dir_name(name, repo); + git_checkouts_directory().join("tmp").join(repo_dir_name) +} + +/// Clones the package git repo into a temporary directory and applies the given function. +fn with_tmp_git_repo(name: &str, source: &SourceGit, f: F) -> Result +where + F: FnOnce(git2::Repository) -> Result, +{ + // Clear existing temporary directory if it exists. + let repo_dir = tmp_git_repo_dir(name, &source.repo); + if repo_dir.exists() { + let _ = std::fs::remove_dir_all(&repo_dir); + } + + // Clone repo into temporary directory. + let repo_url_string = format!("{}", source.repo); + let repo = git2::Repository::clone(&repo_url_string, &repo_dir).map_err(|e| { + anyhow!( + "failed to clone package '{}' from '{}': {}", + name, + source.repo, + e + ) + })?; + + // Do something with the repo. + let output = f(repo)?; + + // Clean up the temporary directory. + if repo_dir.exists() { + let _ = std::fs::remove_dir_all(&repo_dir); + } + + Ok(output) +} + +/// Pin the given git-sourced package. +/// +/// This clones the repository to a temporary directory in order to determine the commit at the +/// HEAD of the given git reference. +fn pin_git(name: &str, source: SourceGit) -> Result { + let commit_hash = with_tmp_git_repo(name, &source, |repo| { + // Find specified reference in repo. + let reference = repo + .resolve_reference_from_short_name(&source.reference) + .map_err(|e| { + anyhow!( + "failed to find git ref '{}' for package '{}': {}", + source.reference, + name, + e + ) + })?; + + // Follow the reference until we find the latest commit and retrieve its hash. + let commit = reference.peel_to_commit().map_err(|e| { + anyhow!( + "failed to obtain commit for ref '{}' of package '{}': {}", + source.reference, + name, + e + ) + })?; + Ok(format!("{}", commit.id())) + })?; + Ok(SourceGitPinned { + source, + commit_hash, + }) +} + +/// Given a package source, attempt to determine the pinned version or commit. +/// +/// Also updates the `path_map` with a path to the local copy of the source. +fn pin_pkg(pkg: &Pkg, path_map: &mut PathMap) -> Result { + let name = pkg.name.clone(); + let pinned = match &pkg.source { + Source::Path(path) => { + let source = SourcePinned::Path; + let pinned = Pinned { name, source }; + let id = pinned.id(); + path_map.insert(id, path.clone()); + pinned + } + Source::Git(ref source) => { + let pinned_git = pin_git(&name, source.clone())?; + let path = git_commit_path(&name, &pinned_git.source.repo, &pinned_git.commit_hash); + let source = SourcePinned::Git(pinned_git.clone()); + let pinned = Pinned { name, source }; + let id = pinned.id(); + if let hash_map::Entry::Vacant(entry) = path_map.entry(id) { + // TODO: Here we assume that if the local path already exists, that it contains the full and + // correct source for that commit and hasn't been tampered with. This is probably fine for most + // cases as users should never be touching these directories, however we should add some code + // to validate this. E.g. can we recreate the git hash by hashing the directory or something + // along these lines using git? + if !path.exists() { + println!(" Fetching {}", pinned_git.to_string()); + fetch_git(&pinned.name, &pinned_git)?; + } + entry.insert(path); + } + pinned + } + Source::Registry(ref _source) => { + // TODO: determine registry pkg git URL, fetch to determine latest available + // semver-compatible version + bail!("registry dependencies are not yet supported"); + } + }; + Ok(pinned) +} + +/// The path to which a git package commit should be checked out. +/// +/// The resulting directory is: +/// +/// ```ignore +/// $HOME/.forc/git/checkouts/name-/ +/// ``` +/// +/// where `` is a hash of the source repository URL. +fn git_commit_path(name: &str, repo: &Url, commit_hash: &str) -> PathBuf { + let repo_dir_name = git_repo_dir_name(name, repo); + git_checkouts_directory() + .join(repo_dir_name) + .join(commit_hash) +} + +/// Fetch the repo at the given git package's URL and checkout the pinned commit. +/// +/// Returns the location of the checked out commit. +fn fetch_git(name: &str, pinned: &SourceGitPinned) -> Result { + let path = git_commit_path(name, &pinned.source.repo, &pinned.commit_hash); + + // Checkout the pinned hash to the path. + with_tmp_git_repo(name, &pinned.source, |repo| { + // Change HEAD to point to the pinned commit. + let id = git2::Oid::from_str(&pinned.commit_hash)?; + repo.set_head_detached(id)?; + + if path.exists() { + let _ = std::fs::remove_dir_all(&path); + } + std::fs::create_dir_all(&path)?; + + // Checkout HEAD to the target directory. + let mut checkout = git2::build::CheckoutBuilder::new(); + checkout.force().target_dir(&path); + repo.checkout_head(Some(&mut checkout))?; + Ok(()) + })?; + + Ok(path) +} + +/// Given the path to a package and a `Dependency` parsed from one of its forc dependencies, +/// produce the `Source` for that dependendency. +fn dep_to_source(pkg_path: &Path, dep: &Dependency) -> Result { + let source = match dep { + Dependency::Simple(ref _ver_str) => unimplemented!(), + Dependency::Detailed(ref det) => { + match (&det.path, &det.version, &det.git, &det.branch, &det.tag) { + (Some(relative_path), _, _, _, _) => { + let path = pkg_path.join(relative_path); + Source::Path(path) + } + (_, _, Some(repo), branch, tag) => { + let reference = match (branch, tag) { + (Some(branch), None) => branch.clone(), + (None, Some(tag)) => tag.clone(), + // TODO: Consider "main" or having no default at all. + _ => "master".to_string(), + }; + let repo = Url::parse(repo)?; + let source = SourceGit { repo, reference }; + Source::Git(source) + } + _ => { + bail!("unsupported set of arguments for dependency: {:?}", dep); + } + } + } + }; + Ok(source) +} + +pub(crate) fn build_config( + path: PathBuf, + manifest: &Manifest, + build_conf: &BuildConf, +) -> Result { + // Prepare the build config to pass through to the compiler. + let main_path = find_main_path(&path, manifest); + let file_name = find_file_name(&path, &main_path)?; + let build_config = BuildConfig::root_from_file_name_and_manifest_path( + file_name.to_path_buf(), + path.to_path_buf(), + ) + .use_ir(build_conf.use_ir || build_conf.print_ir) // --print-ir implies --use-ir. + .print_finalized_asm(build_conf.print_finalized_asm) + .print_intermediate_asm(build_conf.print_intermediate_asm) + .print_ir(build_conf.print_ir); + Ok(build_config) +} + +/// Builds the dependency namespace for the package at the given node index within the graph. +/// +/// This function is designed to be called for each node in order of compilation. +pub(crate) fn dependency_namespace( + namespace_map: &HashMap, + graph: &Graph, + compilation_order: &[NodeIx], + node: NodeIx, +) -> NamespaceRef { + use petgraph::visit::{Dfs, Walker}; + + // Find all nodes that are a dependency of this one with a depth-first search. + let deps: HashSet = Dfs::new(graph, node).iter(graph).collect(); + + // In order of compilation, accumulate dependency namespace refs. + let namespace = sway_core::create_module(); + for dep_node in compilation_order.iter().filter(|n| deps.contains(n)) { + if *dep_node == node { + break; + } + namespace.insert_module_ref(graph[*dep_node].name.clone(), namespace_map[dep_node]); + } + + namespace +} + +/// Compiles the given package. +/// +/// ## Program Types +/// +/// Behaviour differs slightly based on the package's program type. +/// +/// ### Library Packages +/// +/// A Library package will have JSON ABI generated for all publicly exposed `abi`s. The library's +/// namespace is returned as the second argument of the tuple. +/// +/// ### Contract +/// +/// Contracts will output both their JSON ABI and compiled bytecode. +/// +/// ### Script, Predicate +/// +/// Scripts and Predicates will be compiled to bytecode and will not emit any JSON ABI. +pub(crate) fn compile( + pkg: &Pinned, + pkg_path: &Path, + build_conf: &BuildConf, + namespace: NamespaceRef, + source_map: &mut SourceMap, + silent_mode: bool, +) -> Result<(Compiled, Option)> { + let manifest = read_manifest(pkg_path)?; + let source = get_main_file(&manifest, pkg_path)?; + let build_config = build_config(pkg_path.to_path_buf(), &manifest, build_conf)?; + + // First, compile to an AST. We'll update the namespace and check for JSON ABI output. + let ast_res = sway_core::compile_to_ast(source, namespace, &build_config); + match &ast_res { + CompileAstResult::Failure { warnings, errors } => { + print_on_failure(silent_mode, warnings, errors); + bail!("Failed to compile {}", pkg.name); + } + CompileAstResult::Success { + parse_tree, + tree_type, + warnings, + } => { + let json_abi = generate_json_abi(&*parse_tree); + match tree_type { + // If we're compiling a library, we don't need to compile any further. + // Instead, we update the namespace with the library's top-level module. + TreeType::Library { .. } => { + print_on_success_library(silent_mode, &pkg.name, warnings); + let bytecode = vec![]; + let lib_namespace = parse_tree.clone().get_namespace_ref(); + let compiled = Compiled { json_abi, bytecode }; + Ok((compiled, Some(lib_namespace))) + } + + // For all other program types, we'll compile the bytecode. + TreeType::Contract | TreeType::Predicate | TreeType::Script => { + let tree_type = tree_type.clone(); + let asm_res = sway_core::ast_to_asm(ast_res, &build_config); + let bc_res = sway_core::asm_to_bytecode(asm_res, source_map); + match bc_res { + BytecodeCompilationResult::Success { bytes, warnings } => { + print_on_success(silent_mode, &pkg.name, &warnings, &tree_type); + let bytecode = bytes; + let compiled = Compiled { json_abi, bytecode }; + Ok((compiled, None)) + } + BytecodeCompilationResult::Library { .. } => { + unreachable!("compilation of library program types is handled above") + } + BytecodeCompilationResult::Failure { errors, warnings } => { + print_on_failure(silent_mode, &warnings, &errors); + bail!("Failed to compile {}", pkg.name); + } + } + } + } + } + } +} + +// TODO: Update this to match behaviour described in the `compile` doc comment above. +fn generate_json_abi(ast: &TypedParseTree) -> JsonABI { + match ast { + TypedParseTree::Contract { abi_entries, .. } => { + abi_entries.iter().map(|x| x.generate_json_abi()).collect() + } + _ => vec![], + } +} + +#[test] +fn test_source_git_pinned_parsing() { + let strings = [ + "git+https://github.com/foo/bar?reference=baz#64092602dd6158f3e41d775ed889389440a2cd86", + "git+https://github.com/fuellabs/sway-lib-std?reference=v0.1.0#0000000000000000000000000000000000000000", + "git+https://github.com/fuellabs/sway-lib-core?reference=v0.0.1#0000000000000000000000000000000000000000", + ]; + + let expected = [ + SourceGitPinned { + source: SourceGit { + repo: Url::parse("https://github.com/foo/bar").unwrap(), + reference: "baz".to_string(), + }, + commit_hash: "64092602dd6158f3e41d775ed889389440a2cd86".to_string(), + }, + SourceGitPinned { + source: SourceGit { + repo: Url::parse("https://github.com/fuellabs/sway-lib-std").unwrap(), + reference: "v0.1.0".to_string(), + }, + commit_hash: "0000000000000000000000000000000000000000".to_string(), + }, + SourceGitPinned { + source: SourceGit { + repo: Url::parse("https://github.com/fuellabs/sway-lib-core").unwrap(), + reference: "v0.0.1".to_string(), + }, + commit_hash: "0000000000000000000000000000000000000000".to_string(), + }, + ]; + + for (&string, expected) in strings.iter().zip(&expected) { + let parsed = SourceGitPinned::from_str(string).unwrap(); + assert_eq!(&parsed, expected); + let serialized = expected.to_string(); + assert_eq!(&serialized, string); + } +} diff --git a/forc/src/utils/dependency.rs b/forc/src/utils/dependency.rs index 1371bd34676..c2d495f9cec 100644 --- a/forc/src/utils/dependency.rs +++ b/forc/src/utils/dependency.rs @@ -1,17 +1,6 @@ -use crate::utils::{helpers::user_forc_directory, manifest::Manifest}; -use anyhow::{bail, Context, Result}; -use flate2::read::GzDecoder; +use crate::utils::manifest::Manifest; use serde::{Deserialize, Serialize}; -use std::collections::hash_map::DefaultHasher; -use std::hash::{Hash, Hasher}; -use std::io::Read; -use std::{ - collections::HashMap, - fs, - io::Cursor, - path::{Path, PathBuf}, -}; -use tar::Archive; +use std::collections::HashMap; // A collection of remote dependency related functions @@ -34,6 +23,7 @@ pub struct DependencyDetails { pub(crate) path: Option, pub(crate) git: Option, pub(crate) branch: Option, + pub(crate) tag: Option, } pub enum OfflineMode { Yes, @@ -49,298 +39,6 @@ impl From for OfflineMode { } } -pub type GitHubAPICommitsResponse = Vec; - -#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct GithubCommit { - pub sha: String, -} -/// VersionedDependencyDirectory holds the path to the directory where a given -/// GitHub-based dependency is installed and its respective git hash. -#[derive(Debug)] -pub struct VersionedDependencyDirectory { - pub hash: String, - pub path: PathBuf, -} - -pub type GitHubRepoReleases = Vec; - -#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TaggedRelease { - #[serde(rename = "tag_name")] - pub tag_name: String, - #[serde(rename = "target_commitish")] - pub target_commitish: String, - pub name: String, - pub draft: bool, - pub prerelease: bool, - #[serde(rename = "created_at")] - pub created_at: String, - #[serde(rename = "published_at")] - pub published_at: String, -} - -/// Downloads a non-local dependency that's hosted on GitHub. -/// By default, it stores the dependency in `~/.forc/`. -/// A given dependency `dep` is stored under `~/.forc/dep/default/$owner-$repo-$hash`. -/// If no hash (nor any other type of reference) is provided, Forc -/// will download the default branch at the latest commit. -/// If a branch is specified, it will go in `~/.forc/dep/$branch/$owner-$repo-$hash. -/// If a version is specified, it will go in `~/.forc/dep/$version/$owner-$repo-$hash. -/// Version takes precedence over branch reference. -pub fn download_github_dep( - dep_name: &str, - repo_base_url: &str, - branch: &Option, - version: &Option, - offline_mode: OfflineMode, -) -> Result { - // hash the dep name into a number to avoid bad characters - let mut s = DefaultHasher::new(); - dep_name.hash(&mut s); - let hashed_dep_name = s.finish().to_string(); - - // Version tag takes precedence over branch reference. - let forc_dir = user_forc_directory(); - let dep_dir = forc_dir.join(hashed_dep_name); - let out_dir = match &version { - Some(v) => dep_dir.join(v), - // If no version specified, check if a branch was specified - None => match &branch { - Some(b) => dep_dir.join(b), - // If no version and no branch, use default - None => dep_dir.join("default"), - }, - }; - - // Check if dependency is already installed, if so, return its path. - if out_dir.exists() { - for entry in fs::read_dir(&out_dir)? { - let path = entry?.path(); - // If the path to that dependency at that branch/version already - // exists and there's a directory inside of it, - // this directory should be the installation path. - - if path.is_dir() { - return Ok(path.to_str().unwrap().to_string()); - } - } - } - - // If offline mode is enabled, don't proceed as it will - // make use of the network to download the dependency from - // GitHub. - // If it's offline mode and the dependency already exists - // locally, then it would've been returned in the block above. - if let OfflineMode::Yes = offline_mode { - bail!( - "Can't build dependency: dependency {} doesn't exist locally and offline mode is enabled", - dep_name - ); - } - - let github_api_url = build_github_repo_api_url(repo_base_url, branch, version); - - let _ = crate::utils::helpers::println_green(&format!( - " Downloading {:?} ({:?})", - dep_name, out_dir - )); - - match download_tarball(&github_api_url, &out_dir) { - Ok(downloaded_dir) => Ok(downloaded_dir), - Err(e) => bail!("couldn't download from {}: {}", &github_api_url, e), - } -} - -/// Builds a proper URL that's used to call GitHub's API. -/// The dependency is specified as `https://github.com/:owner/:project` -/// And the API URL must be like `https://api.github.com/repos/:owner/:project/tarball` -/// Adding a `:ref` at the end makes it download a branch/tag based repo. -/// Omitting it makes it download the default branch at latest commit. -pub fn build_github_repo_api_url( - dependency_url: &str, - branch: &Option, - version: &Option, -) -> String { - let dependency_url = dependency_url.trim_end_matches('/'); - let mut pieces = dependency_url.rsplit('/'); - - let project_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - let owner_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - // Version tag takes precedence over branch reference. - match version { - Some(v) => { - format!( - "https://api.github.com/repos/{}/{}/tarball/{}", - owner_name, project_name, v - ) - } - // If no version specified, check if a branch was specified - None => match branch { - Some(b) => { - format!( - "https://api.github.com/repos/{}/{}/tarball/{}", - owner_name, project_name, b - ) - } - // If no version and no branch, download default branch at latest commit - None => { - format!( - "https://api.github.com/repos/{}/{}/tarball", - owner_name, project_name - ) - } - }, - } -} - -pub fn download_tarball(url: &str, out_dir: &Path) -> Result { - let mut data = Vec::new(); - - // Download the tarball. - let handle = ureq::builder().user_agent("forc-builder").build(); - let resp = handle.get(url).call()?; - resp.into_reader().read_to_end(&mut data)?; - - // Unpack the tarball. - Archive::new(GzDecoder::new(Cursor::new(data))) - .unpack(out_dir) - .with_context(|| { - format!( - "failed to unpack tarball in directory: {}", - out_dir.display() - ) - })?; - - for entry in fs::read_dir(out_dir)? { - let path = entry?.path(); - match path.is_dir() { - true => return Ok(path.to_str().unwrap().to_string()), - false => (), - } - } - - bail!( - "couldn't find downloaded dependency in directory: {}", - out_dir.display(), - ) -} - -pub fn replace_dep_version( - target_directory: &Path, - git: &str, - dep: &DependencyDetails, -) -> Result<()> { - let current = get_current_dependency_version(target_directory)?; - - let api_url = build_github_repo_api_url(git, &dep.branch, &dep.version); - download_tarball(&api_url, target_directory)?; - - // Delete old one - match fs::remove_dir_all(current.path) { - Ok(_) => Ok(()), - Err(e) => { - bail!( - "failed to remove old version of the dependency ({}): {}", - git, - e - ) - } - } -} - -pub fn get_current_dependency_version(dep_dir: &Path) -> Result { - let mut entries = - fs::read_dir(dep_dir).context(format!("couldn't read directory {}", dep_dir.display()))?; - let entry = match entries.next() { - Some(entry) => entry, - None => bail!("Dependency directory is empty. Run `forc build` to install dependencies."), - }; - - let path = entry?.path(); - if !path.is_dir() { - bail!("{} isn't a directory.", dep_dir.display()) - } - - let file_name = path.file_name().unwrap(); - // Dependencies directories are named as "$repo_owner-$repo-$concatenated_hash" - let hash = file_name - .to_str() - .with_context(|| format!("Invalid utf8 in dependency name: {}", path.display()))? - .split('-') - .last() - .with_context(|| format!("Unexpected dependency naming scheme: {}", path.display()))? - .into(); - Ok(VersionedDependencyDirectory { hash, path }) -} - -// Returns the _truncated_ (e.g `e6940e4`) latest commit hash of a -// GitHub repository given a branch. If branch is None, the default branch is used. -pub async fn get_latest_commit_sha( - dependency_url: &str, - branch: &Option, -) -> Result { - // Quick protection against `git` dependency URL ending with `/`. - let dependency_url = dependency_url.trim_end_matches('/'); - - let mut pieces = dependency_url.rsplit('/'); - - let project_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - let owner_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - let api_endpoint = match branch { - Some(b) => { - format!( - "https://api.github.com/repos/{}/{}/commits?sha={}&per_page=1", - owner_name, project_name, b - ) - } - None => { - format!( - "https://api.github.com/repos/{}/{}/commits?per_page=1", - owner_name, project_name - ) - } - }; - - let client = reqwest::Client::builder() - .user_agent("forc-builder") - .build()?; - - let resp = client.get(&api_endpoint).send().await?; - - let hash_vec = resp.json::().await?; - - // `take(7)` because the truncated SHA1 used by GitHub is 7 chars long. - let truncated_hash: String = hash_vec[0].sha.chars().take(7).collect(); - - if truncated_hash.is_empty() { - bail!( - "failed to extract hash from GitHub commit history API, response: {:?}", - hash_vec - ) - } - - Ok(truncated_hash) -} - // Helper to get only detailed dependencies (`Dependency::Detailed`). pub fn get_detailed_dependencies(manifest: &mut Manifest) -> HashMap { let mut dependencies: HashMap = HashMap::new(); @@ -358,37 +56,3 @@ pub fn get_detailed_dependencies(manifest: &mut Manifest) -> HashMap Result> { - // Quick protection against `git` dependency URL ending with `/`. - let dependency_url = dependency_url.trim_end_matches('/'); - - let mut pieces = dependency_url.rsplit('/'); - - let project_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - let owner_name: &str = match pieces.next() { - Some(p) => p, - None => dependency_url, - }; - - let api_endpoint = format!( - "https://api.github.com/repos/{}/{}/releases", - owner_name, project_name - ); - - let client = reqwest::Client::builder() - .user_agent("forc-builder") - .build()?; - - let resp = client.get(&api_endpoint).send().await?; - - let releases_vec = resp.json::().await?; - - let semver_releases: Vec = releases_vec.iter().map(|r| r.tag_name.to_owned()).collect(); - - Ok(semver_releases) -} diff --git a/forc/src/utils/helpers.rs b/forc/src/utils/helpers.rs index e2f13b83cb9..98e6f095706 100644 --- a/forc/src/utils/helpers.rs +++ b/forc/src/utils/helpers.rs @@ -38,6 +38,10 @@ pub fn find_file_name<'sc>(manifest_dir: &Path, main_path: &'sc Path) -> Result< Ok(file_name) } +pub fn lock_path(manifest_dir: &Path) -> PathBuf { + manifest_dir.join(constants::LOCK_FILE_NAME) +} + pub fn read_manifest(manifest_dir: &Path) -> Result { let manifest_path = { let mut man = PathBuf::from(manifest_dir); @@ -138,13 +142,18 @@ pub fn user_forc_directory() -> PathBuf { .join(constants::USER_FORC_DIRECTORY) } +/// The location at which `forc` will checkout git repositories. +pub fn git_checkouts_directory() -> PathBuf { + user_forc_directory().join("git").join("checkouts") +} + pub fn print_on_success( silent_mode: bool, proj_name: &str, warnings: &[CompileWarning], - tree_type: TreeType, + tree_type: &TreeType, ) { - let type_str = match tree_type { + let type_str = match &tree_type { TreeType::Script {} => "script", TreeType::Contract {} => "contract", TreeType::Predicate {} => "predicate", @@ -209,6 +218,33 @@ pub fn print_on_failure(silent_mode: bool, warnings: &[CompileWarning], errors: .unwrap(); } +pub(crate) fn print_lock_diff(proj_name: &str, diff: &crate::lock::Diff) { + print_removed_pkgs(proj_name, diff.removed.iter().cloned()); + print_added_pkgs(proj_name, diff.added.iter().cloned()); +} + +pub(crate) fn print_removed_pkgs<'a, I>(proj_name: &str, removed: I) +where + I: IntoIterator, +{ + for pkg in removed { + if pkg.name != proj_name { + let _ = println_red(&format!(" Removing {}", pkg.unique_string())); + } + } +} + +pub(crate) fn print_added_pkgs<'a, I>(proj_name: &str, removed: I) +where + I: IntoIterator, +{ + for pkg in removed { + if pkg.name != proj_name { + let _ = println_green(&format!(" Adding {}", pkg.unique_string())); + } + } +} + pub fn println_red(txt: &str) -> io::Result<()> { println_std_out(txt, TermColor::Red) } diff --git a/sway-core/Cargo.toml b/sway-core/Cargo.toml index a0539a260c6..9cf6c8afda0 100644 --- a/sway-core/Cargo.toml +++ b/sway-core/Cargo.toml @@ -23,7 +23,7 @@ lazy_static = "1.4" nanoid = "0.4" pest = { version = "3.0.4", package = "fuel-pest" } pest_derive = { version = "3.0.4", package = "fuel-pest_derive" } -petgraph = "0.5" +petgraph = "0.6" prettydiff = "0.5" regex = "1" serde = { version = "1.0", features = ["derive"] } diff --git a/sway-utils/src/constants.rs b/sway-utils/src/constants.rs index db289df42a8..fbd12d45554 100644 --- a/sway-utils/src/constants.rs +++ b/sway-utils/src/constants.rs @@ -1,4 +1,5 @@ pub const MANIFEST_FILE_NAME: &str = "Forc.toml"; +pub const LOCK_FILE_NAME: &str = "Forc.lock"; pub const TEST_MANIFEST_FILE_NAME: &str = "Cargo.toml"; pub const TEST_DIRECTORY: &str = "tests/"; pub const SWAY_EXTENSION: &str = "sw"; diff --git a/test/src/e2e_vm_tests/harness.rs b/test/src/e2e_vm_tests/harness.rs index a667d7a739d..de731b90ac3 100644 --- a/test/src/e2e_vm_tests/harness.rs +++ b/test/src/e2e_vm_tests/harness.rs @@ -117,7 +117,7 @@ pub(crate) fn compile_to_bytes(file_name: &str) -> Result> { silent_mode: !verbose, ..Default::default() }) - .map(|(bytes, _json_abi)| bytes) + .map(|compiled| compiled.bytecode) } pub(crate) fn test_json_abi(file_name: &str) -> Result<()> { diff --git a/test/src/e2e_vm_tests/test_programs/address_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/address_test/Forc.lock new file mode 100644 index 00000000000..d36eda53f16 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/address_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'address_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.1.0#5ff3559f067f50c9550bf3d1b7c74f5cede78b6f', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.1.0#5ff3559f067f50c9550bf3d1b7c74f5cede78b6f' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/address_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/address_test/Forc.toml index 2782f54c4af..8e190dc5243 100644 --- a/test/src/e2e_vm_tests/test_programs/address_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/address_test/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "address_test" [dependencies] -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.1.0" } -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.2" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.1.0" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.2" } diff --git a/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.lock b/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.lock new file mode 100644 index 00000000000..19922d767c7 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'aliased_imports' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.toml b/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.toml index d445c062afa..bf28f0d7be2 100644 --- a/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/aliased_imports/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/array_bad_index/Forc.lock b/test/src/e2e_vm_tests/test_programs/array_bad_index/Forc.lock new file mode 100644 index 00000000000..ab2b3ea5be6 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/array_bad_index/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'array_bad_index' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/array_basics/Forc.lock b/test/src/e2e_vm_tests/test_programs/array_basics/Forc.lock new file mode 100644 index 00000000000..1788ce1e74c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/array_basics/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'array_basics' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/array_basics/Forc.toml b/test/src/e2e_vm_tests/test_programs/array_basics/Forc.toml index 53163f859c6..9298cc4b8b2 100644 --- a/test/src/e2e_vm_tests/test_programs/array_basics/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/array_basics/Forc.toml @@ -5,5 +5,5 @@ name = "array_basics" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/array_generics/Forc.lock b/test/src/e2e_vm_tests/test_programs/array_generics/Forc.lock new file mode 100644 index 00000000000..c1fa7822b77 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/array_generics/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'array_generics' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/array_oob/Forc.lock b/test/src/e2e_vm_tests/test_programs/array_oob/Forc.lock new file mode 100644 index 00000000000..f3cd383dccd --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/array_oob/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'array_oob' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/asm_expr_basic/Forc.lock b/test/src/e2e_vm_tests/test_programs/asm_expr_basic/Forc.lock new file mode 100644 index 00000000000..cd18932625a --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/asm_expr_basic/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'asm_expr_basic' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/asm_missing_return/Forc.lock b/test/src/e2e_vm_tests/test_programs/asm_missing_return/Forc.lock new file mode 100644 index 00000000000..eedb10d812c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/asm_missing_return/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'asm_missing_return' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/asm_should_not_have_return/Forc.lock b/test/src/e2e_vm_tests/test_programs/asm_should_not_have_return/Forc.lock new file mode 100644 index 00000000000..5cb80267c77 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/asm_should_not_have_return/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'asm_should_not_have_return' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/asm_without_return/Forc.lock b/test/src/e2e_vm_tests/test_programs/asm_without_return/Forc.lock new file mode 100644 index 00000000000..78680a8d52f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/asm_without_return/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'asm_without_return' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/assert_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/assert_test/Forc.lock new file mode 100644 index 00000000000..9b7c7d8fa39 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/assert_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'assert_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/assert_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/assert_test/Forc.toml index 5eab08bf5ab..0f4f788d5dd 100644 --- a/test/src/e2e_vm_tests/test_programs/assert_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/assert_test/Forc.toml @@ -5,5 +5,5 @@ name = "assert_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/auth_testing_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/auth_testing_abi/Forc.lock new file mode 100644 index 00000000000..ccbfdf27499 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/auth_testing_abi/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'auth_testing_abi' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.lock new file mode 100644 index 00000000000..026b8c19558 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'auth_testing_abi' +dependencies = [] + +[[package]] +name = 'auth_testing_contract' +dependencies = [ + 'auth_testing_abi', + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.toml index 0d047aba1e7..83951a7a2f5 100644 --- a/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/auth_testing_contract/Forc.toml @@ -5,6 +5,6 @@ name = "auth_testing_contract" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } auth_testing_abi = { path = "../auth_testing_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.lock b/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.lock new file mode 100644 index 00000000000..a418a584d18 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'b256_bad_jumps' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.toml b/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.toml index dd019461fb9..fbf7f9d1e97 100644 --- a/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/b256_bad_jumps/Forc.toml @@ -5,5 +5,5 @@ name = "b256_bad_jumps" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.lock b/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.lock new file mode 100644 index 00000000000..39faae0b077 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'b256_ops' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.toml b/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.toml index ec93ff01fd8..ab4b0685e70 100644 --- a/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/b256_ops/Forc.toml @@ -5,5 +5,5 @@ name = "b256_ops" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.lock b/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.lock new file mode 100644 index 00000000000..04ad879aa60 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'b512_panic_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.toml b/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.toml index 8f11f2dd745..d644626c533 100644 --- a/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/b512_struct_alignment/Forc.toml @@ -5,6 +5,6 @@ name = "b512_panic_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/b512_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/b512_test/Forc.lock new file mode 100644 index 00000000000..17796d62d36 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/b512_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'b512_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/b512_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/b512_test/Forc.toml index 3f8a533508b..4137f20fedf 100644 --- a/test/src/e2e_vm_tests/test_programs/b512_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/b512_test/Forc.toml @@ -5,5 +5,5 @@ name = "b512_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/bad_generic_annotation/Forc.lock b/test/src/e2e_vm_tests/test_programs/bad_generic_annotation/Forc.lock new file mode 100644 index 00000000000..3c1a9db32bb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/bad_generic_annotation/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'bad_generic_annotation' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/bad_generic_var_annotation/Forc.lock b/test/src/e2e_vm_tests/test_programs/bad_generic_var_annotation/Forc.lock new file mode 100644 index 00000000000..dfcd0edd3e1 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/bad_generic_var_annotation/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'bad_generic_var_annotation' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.lock b/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.lock new file mode 100644 index 00000000000..c69ce69c2f1 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'bal_opcode' +dependencies = [ + 'balance_test_abi', + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'balance_test_abi' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.toml b/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.toml index b13ec179077..0a05f930c2e 100644 --- a/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/bal_opcode/Forc.toml @@ -5,6 +5,6 @@ name = "bal_opcode" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } balance_test_abi = { path = "../balance_test_abi"} diff --git a/test/src/e2e_vm_tests/test_programs/balance_test_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/balance_test_abi/Forc.lock new file mode 100644 index 00000000000..01ee7f4687c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/balance_test_abi/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'balance_test_abi' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.lock new file mode 100644 index 00000000000..356847377f3 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.lock @@ -0,0 +1,20 @@ +[[package]] +name = 'balance_test_abi' +dependencies = [] + +[[package]] +name = 'balance_test_contract' +dependencies = [ + 'balance_test_abi', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.toml index e05daba57d1..e69ec98032b 100644 --- a/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/balance_test_contract/Forc.toml @@ -5,5 +5,5 @@ name = "balance_test_contract" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -balance_test_abi = { path = "../balance_test_abi"} \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +balance_test_abi = { path = "../balance_test_abi"} diff --git a/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.lock b/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.lock new file mode 100644 index 00000000000..55961a4d5ab --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'basic_func_decl' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.toml b/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.toml index 658ca3a39ba..b1162fa8543 100644 --- a/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/basic_func_decl/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.lock b/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.lock new file mode 100644 index 00000000000..5494cd51e47 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'basic_storage' +dependencies = [ + 'basic_storage_abi', + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'basic_storage_abi' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.toml b/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.toml index 4419f1b0d4c..a2ce77882f6 100644 --- a/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/basic_storage/Forc.toml @@ -5,6 +5,6 @@ name = "basic_storage" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } basic_storage_abi = { path = "../basic_storage_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/basic_storage_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/basic_storage_abi/Forc.lock new file mode 100644 index 00000000000..b21bd2b0d4a --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/basic_storage_abi/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'basic_storage_abi' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/block_height/Forc.lock b/test/src/e2e_vm_tests/test_programs/block_height/Forc.lock new file mode 100644 index 00000000000..bfd2f466705 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/block_height/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'block_height' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/block_height/Forc.toml b/test/src/e2e_vm_tests/test_programs/block_height/Forc.toml index 84d6959130f..1ff7f982edc 100644 --- a/test/src/e2e_vm_tests/test_programs/block_height/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/block_height/Forc.toml @@ -5,5 +5,5 @@ name = "block_height" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/bool_and_or/Forc.lock b/test/src/e2e_vm_tests/test_programs/bool_and_or/Forc.lock new file mode 100644 index 00000000000..4c1314b22f5 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/bool_and_or/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'bool_and_or' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/call_basic_storage/Forc.lock b/test/src/e2e_vm_tests/test_programs/call_basic_storage/Forc.lock new file mode 100644 index 00000000000..9eb3a251de4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/call_basic_storage/Forc.lock @@ -0,0 +1,20 @@ +[[package]] +name = 'basic_storage_abi' +dependencies = [] + +[[package]] +name = 'call_basic_storage' +dependencies = [ + 'basic_storage_abi', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.lock new file mode 100644 index 00000000000..792391b3c7b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'call_increment_contract' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'increment_abi', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'increment_abi' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.toml index b55739e3cdd..93bd9185956 100644 --- a/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/call_increment_contract/Forc.toml @@ -5,6 +5,6 @@ name = "call_increment_contract" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } increment_abi = { path = "../increment_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.lock new file mode 100644 index 00000000000..3a0c37069c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'auth_testing_abi' +dependencies = [] + +[[package]] +name = 'caller_auth_test' +dependencies = [ + 'auth_testing_abi', + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.toml index 3fd56b03341..361b1c3a5e5 100644 --- a/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/caller_auth_test/Forc.toml @@ -5,6 +5,6 @@ name = "caller_auth_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } auth_testing_abi = { path = "../auth_testing_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.lock new file mode 100644 index 00000000000..4d8c446aac1 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'caller_context_test' +dependencies = [ + 'context_testing_abi', + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'context_testing_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226'] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.toml index 66fb06650d2..32636801d11 100644 --- a/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/caller_context_test/Forc.toml @@ -5,6 +5,6 @@ name = "caller_context_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } context_testing_abi = { path = "../context_testing_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/const_decl/Forc.lock b/test/src/e2e_vm_tests/test_programs/const_decl/Forc.lock new file mode 100644 index 00000000000..63215378ee1 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/const_decl/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'const_decl' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/const_decl/Forc.toml b/test/src/e2e_vm_tests/test_programs/const_decl/Forc.toml index d784ddd5ddc..884aaf52649 100644 --- a/test/src/e2e_vm_tests/test_programs/const_decl/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/const_decl/Forc.toml @@ -5,5 +5,5 @@ name = "const_decl" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.lock b/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.lock new file mode 100644 index 00000000000..139279cfc96 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'const_decl_in_library' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.toml b/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.toml index b087764e3c5..f8cb4073c95 100644 --- a/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/const_decl_in_library/Forc.toml @@ -5,5 +5,5 @@ name = "const_decl_in_library" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.lock new file mode 100644 index 00000000000..d4b80e99082 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.lock @@ -0,0 +1,13 @@ +[[package]] +name = 'context_testing_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226'] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.toml b/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.toml index 607d13db28e..d678d9f7333 100644 --- a/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/context_testing_abi/Forc.toml @@ -5,4 +5,4 @@ name = "context_testing_abi" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.lock new file mode 100644 index 00000000000..17f05ca49c2 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.lock @@ -0,0 +1,20 @@ +[[package]] +name = 'context_testing_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226'] + +[[package]] +name = 'context_testing_contract' +dependencies = [ + 'context_testing_abi', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.toml index 525065259a9..0c59e2ac4ea 100644 --- a/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/context_testing_contract/Forc.toml @@ -5,5 +5,5 @@ name = "context_testing_contract" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -context_testing_abi = { path = "../context_testing_abi"} \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +context_testing_abi = { path = "../context_testing_abi"} diff --git a/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.lock b/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.lock new file mode 100644 index 00000000000..cd692f1e173 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'contract_abi_impl' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.toml b/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.toml index 1c8ed0931b2..5e4db13d2ab 100644 --- a/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/contract_abi_impl/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/contract_call/Forc.lock b/test/src/e2e_vm_tests/test_programs/contract_call/Forc.lock new file mode 100644 index 00000000000..ea1f136d595 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/contract_call/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'contract_call' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/contract_call/Forc.toml b/test/src/e2e_vm_tests/test_programs/contract_call/Forc.toml index 9671969ae5a..5e3f33e8511 100644 --- a/test/src/e2e_vm_tests/test_programs/contract_call/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/contract_call/Forc.toml @@ -6,5 +6,5 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.lock new file mode 100644 index 00000000000..d11622df995 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'contract_id_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.toml index 9d2f9080e85..9fe666cc673 100644 --- a/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/contract_id_test/Forc.toml @@ -5,5 +5,5 @@ name = "contract_id_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/contract_pure_calls_impure/Forc.lock b/test/src/e2e_vm_tests/test_programs/contract_pure_calls_impure/Forc.lock new file mode 100644 index 00000000000..4bcda69568d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/contract_pure_calls_impure/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'valid_impurity' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/dependencies/Forc.lock b/test/src/e2e_vm_tests/test_programs/dependencies/Forc.lock new file mode 100644 index 00000000000..825fe1edf93 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/dependencies/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'dependencies' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/dependencies/Forc.toml b/test/src/e2e_vm_tests/test_programs/dependencies/Forc.toml index b0fe14290ae..2129646dc13 100644 --- a/test/src/e2e_vm_tests/test_programs/dependencies/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/dependencies/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.lock b/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.lock new file mode 100644 index 00000000000..43f4d5745ca --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'dependencies_parsing_error' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.toml b/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.toml index 2f64adb632b..9d615ae76d8 100644 --- a/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/dependency_parsing_error/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/disallowed_gm/Forc.lock b/test/src/e2e_vm_tests/test_programs/disallowed_gm/Forc.lock new file mode 100644 index 00000000000..23d6ed974e3 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/disallowed_gm/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'disallowed_opcodes' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.lock new file mode 100644 index 00000000000..c0e923677a3 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'ec_recover_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.toml index eb71053bcdb..b473109d224 100644 --- a/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/ec_recover_test/Forc.toml @@ -5,5 +5,5 @@ name = "ec_recover_test" entry = "main.sw" [dependencies] -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.1.0" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.1.0" } diff --git a/test/src/e2e_vm_tests/test_programs/empty_impl/Forc.lock b/test/src/e2e_vm_tests/test_programs/empty_impl/Forc.lock new file mode 100644 index 00000000000..8aa1877302e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/empty_impl/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'empty_impl' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.lock b/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.lock new file mode 100644 index 00000000000..136079c7447 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'empty_method_initializer' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.toml b/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.toml index 4faa391a301..ea4ef51922a 100644 --- a/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/empty_method_initializer/Forc.toml @@ -5,5 +5,5 @@ name = "empty_method_initializer" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.lock b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.lock new file mode 100644 index 00000000000..53afd911d57 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'enum_in_fn_decl' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.toml b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.toml index 244d788daa8..bd40b958b44 100644 --- a/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/Forc.toml @@ -6,7 +6,5 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } - - +core = { git = "http://github.com/FuelLabs/sway-lib-core" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.1.0" } diff --git a/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/src/main.sw b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/src/main.sw index 52a33bc3272..3534fec7fff 100644 --- a/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/enum_in_fn_decl/src/main.sw @@ -6,13 +6,16 @@ fn main() -> u64 { Y: bool, } - impl core::ops::Ord for X { + impl core::ops::Eq for X { fn eq(self, other: Self) -> bool { asm(r1: self, r2: other, r3) { eq r3 r2 r1; r3: bool } } + } + + impl core::ops::Ord for X { fn lt(self, other: Self) -> bool { asm(r1: self, r2: other, r3) { lt r3 r2 r1; diff --git a/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.lock new file mode 100644 index 00000000000..21c8eb7c874 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'eq_4_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.toml index a1204c11f91..34a82f0865b 100644 --- a/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/eq_4_test/Forc.toml @@ -5,5 +5,5 @@ name = "eq_4_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.lock b/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.lock new file mode 100644 index 00000000000..7aeebec604c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'excess_fn_arguments' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.toml b/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.toml index 472d6e6c374..76d700d0bd2 100644 --- a/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/excess_fn_arguments/Forc.toml @@ -5,5 +5,5 @@ name = "excess_fn_arguments" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.lock b/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.lock new file mode 100644 index 00000000000..855ca596444 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'asm_expr_basic' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.toml b/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.toml index b804ad5904f..670eb5bab87 100644 --- a/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/fix_opcode_bug/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/funcs_with_generic_types/Forc.lock b/test/src/e2e_vm_tests/test_programs/funcs_with_generic_types/Forc.lock new file mode 100644 index 00000000000..e63b832a8f0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/funcs_with_generic_types/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'funcs_with_generic_types' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.lock b/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.lock new file mode 100644 index 00000000000..3bcae2c4c09 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'generic_enum' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.toml b/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.toml index 1af0264e497..fde515dfbb5 100644 --- a/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/generic_enum/Forc.toml @@ -5,5 +5,5 @@ name = "generic_enum" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/generic_functions/Forc.lock b/test/src/e2e_vm_tests/test_programs/generic_functions/Forc.lock new file mode 100644 index 00000000000..5ccb7ad027b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/generic_functions/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'generic_functions' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/generic_struct/Forc.lock b/test/src/e2e_vm_tests/test_programs/generic_struct/Forc.lock new file mode 100644 index 00000000000..9cba4281bb7 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/generic_struct/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'generic_struct' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/generic_structs/Forc.lock b/test/src/e2e_vm_tests/test_programs/generic_structs/Forc.lock new file mode 100644 index 00000000000..3f8d0f192e5 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/generic_structs/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'generic_structs' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.lock b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.lock new file mode 100644 index 00000000000..e35a9045980 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'if_elseif_enum' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.toml b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.toml index 29113a2ab55..96c27e26aff 100644 --- a/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/Forc.toml @@ -6,5 +6,5 @@ name = "if_elseif_enum" [dependencies] -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.1.0" } diff --git a/test/src/e2e_vm_tests/test_programs/if_elseif_enum/src/main.sw b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/src/main.sw index 1e83aaf8783..3701ef7abf2 100644 --- a/test/src/e2e_vm_tests/test_programs/if_elseif_enum/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/if_elseif_enum/src/main.sw @@ -18,6 +18,15 @@ enum PrimaryColor { Blue: (), } +impl core::ops::Eq for PrimaryColor { + fn eq(self, other: Self) -> bool { + asm(r1: self, r2: other, r3) { + eq r3 r1 r2; + r3: bool + } + } +} + impl core::ops::Ord for PrimaryColor { fn lt(self, other: Self) -> bool { asm(r1: self, r2: other, r3) { @@ -31,12 +40,6 @@ impl core::ops::Ord for PrimaryColor { r3: bool } } - fn eq(self, other: Self) -> bool { - asm(r1: self, r2: other, r3) { - eq r3 r1 r2; - r3: bool - } - } } impl Color for PrimaryColor { diff --git a/test/src/e2e_vm_tests/test_programs/if_implicit_unit/Forc.lock b/test/src/e2e_vm_tests/test_programs/if_implicit_unit/Forc.lock new file mode 100644 index 00000000000..7a4fa118907 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/if_implicit_unit/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'if_implicit_unit' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/import_method_from_other_file/Forc.lock b/test/src/e2e_vm_tests/test_programs/import_method_from_other_file/Forc.lock new file mode 100644 index 00000000000..115c3a8c429 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/import_method_from_other_file/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'import_method_from_other_file' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/increment_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/increment_abi/Forc.lock new file mode 100644 index 00000000000..c673556eb07 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/increment_abi/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'increment_abi' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.lock new file mode 100644 index 00000000000..2db17084420 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'increment_abi' +dependencies = [] + +[[package]] +name = 'increment_contract' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'increment_abi', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.toml index 28f0077ee8b..55e0fb4b7a6 100644 --- a/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/increment_contract/Forc.toml @@ -6,5 +6,5 @@ entry = "main.sw" [dependencies] increment_abi = { path = "../increment_abi" } -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.lock b/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.lock new file mode 100644 index 00000000000..260adac0a4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'infinite_dependencies' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.toml b/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.toml index bfc815f15aa..5677f21a5c7 100644 --- a/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/infinite_dependencies/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/inline_if_expr_const/Forc.lock b/test/src/e2e_vm_tests/test_programs/inline_if_expr_const/Forc.lock new file mode 100644 index 00000000000..db942ff5698 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/inline_if_expr_const/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'inline_if_expr_const' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/item_used_without_import/Forc.lock b/test/src/e2e_vm_tests/test_programs/item_used_without_import/Forc.lock new file mode 100644 index 00000000000..f5493d91980 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/item_used_without_import/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'item_used_without_import' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/literal_too_large_for_type/Forc.lock b/test/src/e2e_vm_tests/test_programs/literal_too_large_for_type/Forc.lock new file mode 100644 index 00000000000..791d3cbd1e8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/literal_too_large_for_type/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'literal_too_large_for_type' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.lock b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.lock new file mode 100644 index 00000000000..0b6e1c57516 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'local_impl_for_ord' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.1.0#a5b57846089e141c6d205d0037369eb49227caa7' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.toml b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.toml index 9fb3fbaabfb..8ce5e4950d4 100644 --- a/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/Forc.toml @@ -5,5 +5,5 @@ name = "local_impl_for_ord" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.1.0" } diff --git a/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/src/main.sw b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/src/main.sw index 10f1d9f3f45..87f47a3cef8 100644 --- a/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/local_impl_for_ord/src/main.sw @@ -1,15 +1,18 @@ script; -use core::ops::Ord; +use core::ops::{Eq, Ord}; enum X { Y: (), } -impl Ord for X { +impl Eq for X { fn eq(self, other: Self) -> bool { true } +} + +impl Ord for X { fn lt(self, other: Self) -> bool { false } diff --git a/test/src/e2e_vm_tests/test_programs/main_returns_unit/Forc.lock b/test/src/e2e_vm_tests/test_programs/main_returns_unit/Forc.lock new file mode 100644 index 00000000000..f52e08d8474 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/main_returns_unit/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'main_returns_unit' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.lock b/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.lock new file mode 100644 index 00000000000..353684eb8d1 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'match_expressions' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.toml b/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.toml index 97afd313c75..599a5dfff98 100644 --- a/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/match_expressions/Forc.toml @@ -5,5 +5,5 @@ name = "match_expressions" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.lock b/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.lock new file mode 100644 index 00000000000..52d85a0e661 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'match_expressions_enums' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.toml b/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.toml index 81d0383ffa3..a3f6c3e019d 100644 --- a/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_enums/Forc.toml @@ -5,5 +5,5 @@ name = "match_expressions_enums" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.lock b/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.lock new file mode 100644 index 00000000000..4a39b926e2e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'match_expressions_structs' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.toml b/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.toml index a503c72f5f6..5f5cc1cd49f 100644 --- a/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_structs/Forc.toml @@ -5,5 +5,5 @@ name = "match_expressions_structs" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.lock b/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.lock new file mode 100644 index 00000000000..8a868815b54 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'match_expressions_wrong_struct' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.toml b/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.toml index 3eb464b6bf6..7546bf77135 100644 --- a/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/match_expressions_wrong_struct/Forc.toml @@ -5,5 +5,5 @@ name = "match_expressions_wrong_struct" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/method_on_empty_struct/Forc.lock b/test/src/e2e_vm_tests/test_programs/method_on_empty_struct/Forc.lock new file mode 100644 index 00000000000..bdf04277024 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/method_on_empty_struct/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'method_on_empty_struct' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.lock b/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.lock new file mode 100644 index 00000000000..a50c26e8727 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'missing_fn_arguments' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.toml b/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.toml index 3405cc68ed5..3c6674a07b9 100644 --- a/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/missing_fn_arguments/Forc.toml @@ -5,5 +5,5 @@ name = "missing_fn_arguments" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/missing_func_from_supertrait_impl/Forc.lock b/test/src/e2e_vm_tests/test_programs/missing_func_from_supertrait_impl/Forc.lock new file mode 100644 index 00000000000..abe11bf6610 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/missing_func_from_supertrait_impl/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'missing_func_from_supertrait_impl' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/missing_supertrait_impl/Forc.lock b/test/src/e2e_vm_tests/test_programs/missing_supertrait_impl/Forc.lock new file mode 100644 index 00000000000..6fa865b312b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/missing_supertrait_impl/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'missing_supertrait_impl' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/missing_type_parameters/Forc.lock b/test/src/e2e_vm_tests/test_programs/missing_type_parameters/Forc.lock new file mode 100644 index 00000000000..e0008e96d56 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/missing_type_parameters/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'missing_type_parameters' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.lock new file mode 100644 index 00000000000..597db74fa9c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'modulo_uint_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.toml index f446ec569b1..278554df0ae 100644 --- a/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/modulo_uint_test/Forc.toml @@ -5,5 +5,5 @@ name = "modulo_uint_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.lock b/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.lock new file mode 100644 index 00000000000..8d9acba44c6 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'multi_item_import' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.toml b/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.toml index bf4b18c2323..4d1a4ef4fb0 100644 --- a/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/multi_item_import/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.lock new file mode 100644 index 00000000000..8abbf05a254 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'neq_4_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.toml index 17334ab16fe..210b343738b 100644 --- a/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/neq_4_test/Forc.toml @@ -5,5 +5,5 @@ name = "neq_4_test" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/nested_impure/Forc.lock b/test/src/e2e_vm_tests/test_programs/nested_impure/Forc.lock new file mode 100644 index 00000000000..fdc6d679549 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/nested_impure/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'nested_impure' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/new_allocator_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/new_allocator_test/Forc.lock new file mode 100644 index 00000000000..0e6f48cde48 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/new_allocator_test/Forc.lock @@ -0,0 +1,16 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'new_alloc' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.lock b/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.lock new file mode 100644 index 00000000000..b4cc9f4dd50 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'unary_not_basic' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.toml b/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.toml index e025f8a2727..25d6f0baaa7 100644 --- a/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/op_precedence/Forc.toml @@ -5,5 +5,5 @@ name = "unary_not_basic" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.lock b/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.lock new file mode 100644 index 00000000000..2b86709f4ca --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'out_of_order_decl' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.toml b/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.toml index c9e9d91bf57..a9c12ba0892 100644 --- a/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/out_of_order_decl/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/predicate_calls_impure/Forc.lock b/test/src/e2e_vm_tests/test_programs/predicate_calls_impure/Forc.lock new file mode 100644 index 00000000000..c7066b79937 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/predicate_calls_impure/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'script_calls_impure' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/pure_calls_impure/Forc.lock b/test/src/e2e_vm_tests/test_programs/pure_calls_impure/Forc.lock new file mode 100644 index 00000000000..3e6c0ac807f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/pure_calls_impure/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'pure_calls_impure' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/recursive_calls/Forc.lock b/test/src/e2e_vm_tests/test_programs/recursive_calls/Forc.lock new file mode 100644 index 00000000000..6762ffbf7f6 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/recursive_calls/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'recursive_calls' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/retd_b256/Forc.lock b/test/src/e2e_vm_tests/test_programs/retd_b256/Forc.lock new file mode 100644 index 00000000000..a02fc76c090 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/retd_b256/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'retd_b256' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/retd_struct/Forc.lock b/test/src/e2e_vm_tests/test_programs/retd_struct/Forc.lock new file mode 100644 index 00000000000..d6934bc4f07 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/retd_struct/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'retd_struct' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/script_calls_impure/Forc.lock b/test/src/e2e_vm_tests/test_programs/script_calls_impure/Forc.lock new file mode 100644 index 00000000000..c7066b79937 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/script_calls_impure/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'script_calls_impure' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/shadow_import/Forc.lock b/test/src/e2e_vm_tests/test_programs/shadow_import/Forc.lock new file mode 100644 index 00000000000..0237ced03d2 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/shadow_import/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'shadow_import' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/size_of/Forc.lock b/test/src/e2e_vm_tests/test_programs/size_of/Forc.lock new file mode 100644 index 00000000000..639543f230d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/size_of/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'size_of' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] diff --git a/test/src/e2e_vm_tests/test_programs/size_of/Forc.toml b/test/src/e2e_vm_tests/test_programs/size_of/Forc.toml index 2e03a55c696..70e6ac8c310 100644 --- a/test/src/e2e_vm_tests/test_programs/size_of/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/size_of/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "size_of" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/star_import_alias/Forc.lock b/test/src/e2e_vm_tests/test_programs/star_import_alias/Forc.lock new file mode 100644 index 00000000000..771efd77ad9 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/star_import_alias/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'star_import_alias' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/storage_declaration/Forc.lock b/test/src/e2e_vm_tests/test_programs/storage_declaration/Forc.lock new file mode 100644 index 00000000000..2f5e1e813e0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/storage_declaration/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'storage_declaration' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.lock b/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.lock new file mode 100644 index 00000000000..a482952ef34 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'struct_field_access' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.toml b/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.toml index 40730a7c91d..bfc33829c4c 100644 --- a/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/struct_field_access/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.lock b/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.lock new file mode 100644 index 00000000000..9c049dff7f7 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'struct_field_reassignment' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.toml b/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.toml index 64b32e9d5e5..402978da7a2 100644 --- a/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/struct_field_reassignment/Forc.toml @@ -6,7 +6,7 @@ entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/supertrait_does_not_exist/Forc.lock b/test/src/e2e_vm_tests/test_programs/supertrait_does_not_exist/Forc.lock new file mode 100644 index 00000000000..ea4a1e56217 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/supertrait_does_not_exist/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'supertrait_does_not_exist' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/supertraits/Forc.lock b/test/src/e2e_vm_tests/test_programs/supertraits/Forc.lock new file mode 100644 index 00000000000..9f8ff5db494 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/supertraits/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'supertraits' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/supertraits/Forc.toml b/test/src/e2e_vm_tests/test_programs/supertraits/Forc.toml index 2fd656b9b05..edfd7ae143c 100644 --- a/test/src/e2e_vm_tests/test_programs/supertraits/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/supertraits/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "supertraits" [dependencies] -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.lock b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.lock new file mode 100644 index 00000000000..ba489976af9 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.lock @@ -0,0 +1,13 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'test_fuel_coin_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920'] diff --git a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.toml b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.toml index a89ced0c242..ab3801c2251 100644 --- a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_abi/Forc.toml @@ -5,4 +5,4 @@ license = "Apache-2.0" name = "test_fuel_coin_abi" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.2" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.2" } diff --git a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.lock b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.lock new file mode 100644 index 00000000000..0f5a691a072 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.lock @@ -0,0 +1,20 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'test_fuel_coin_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920'] + +[[package]] +name = 'test_fuel_coin_contract' +dependencies = [ + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920', + 'test_fuel_coin_abi', +] diff --git a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.toml b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.toml index 9c4561ffab7..93505ecba2f 100644 --- a/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/test_fuel_coin_contract/Forc.toml @@ -5,5 +5,5 @@ license = "Apache-2.0" name = "test_fuel_coin_contract" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.2" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.2" } test_fuel_coin_abi = { path = "../test_fuel_coin_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.lock new file mode 100644 index 00000000000..7c77eb8c036 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.lock @@ -0,0 +1,26 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.1.0#5ff3559f067f50c9550bf3d1b7c74f5cede78b6f' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'test_fuel_coin_abi' +dependencies = ['std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920'] + +[[package]] +name = 'token_ops_test' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.1.0#5ff3559f067f50c9550bf3d1b7c74f5cede78b6f', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.2#888f0abce5621525af7b8bc6d41a1a570f30c920', + 'test_fuel_coin_abi', +] diff --git a/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.toml b/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.toml index 607a218f4c5..43898c3e2a4 100644 --- a/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/token_ops_test/Forc.toml @@ -5,7 +5,7 @@ license = "Apache-2.0" name = "token_ops_test" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.2" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.1.0" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.2" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.1.0" } test_fuel_coin_abi = { path = "../test_fuel_coin_abi" } diff --git a/test/src/e2e_vm_tests/test_programs/top_level_vars/Forc.lock b/test/src/e2e_vm_tests/test_programs/top_level_vars/Forc.lock new file mode 100644 index 00000000000..88f02afc028 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/top_level_vars/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'top_level_vars' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/trait_import_with_star/Forc.lock b/test/src/e2e_vm_tests/test_programs/trait_import_with_star/Forc.lock new file mode 100644 index 00000000000..78f1506dcbe --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/trait_import_with_star/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'trait_impl_import' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.lock b/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.lock new file mode 100644 index 00000000000..a78d9940b57 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'trait_override_bug' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=master#c3f1b914c7099d5115c72c01fd0ea640cc3ad6dc', +] diff --git a/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.toml b/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.toml index ab0822baa60..2cb4ba0b2b2 100644 --- a/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/trait_override_bug/Forc.toml @@ -6,4 +6,4 @@ license = "Apache-2.0" [dependencies] std = { git = "http://github.com/FuelLabs/sway-lib-std" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/tuple_access/Forc.lock b/test/src/e2e_vm_tests/test_programs/tuple_access/Forc.lock new file mode 100644 index 00000000000..b995756313d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/tuple_access/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'tuple_access' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.lock b/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.lock new file mode 100644 index 00000000000..8c6cdc2050f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'tuple_desugaring' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.toml b/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.toml index 595dddd70a2..8f72b7aeef1 100644 --- a/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/tuple_desugaring/Forc.toml @@ -5,6 +5,6 @@ name = "tuple_desugaring" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/tuple_indexing/Forc.lock b/test/src/e2e_vm_tests/test_programs/tuple_indexing/Forc.lock new file mode 100644 index 00000000000..ddb7405ed8e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/tuple_indexing/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'tuple_indexing' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.lock b/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.lock new file mode 100644 index 00000000000..7050e78319e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'tuple_types' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.toml b/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.toml index 7a072150067..392e466cd89 100644 --- a/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/tuple_types/Forc.toml @@ -5,6 +5,6 @@ name = "tuple_types" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.lock b/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.lock new file mode 100644 index 00000000000..b4cc9f4dd50 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'unary_not_basic' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.toml b/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.toml index e025f8a2727..25d6f0baaa7 100644 --- a/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/unary_not_basic/Forc.toml @@ -5,5 +5,5 @@ name = "unary_not_basic" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.lock b/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.lock new file mode 100644 index 00000000000..88b9de82212 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'unary_not_basic_2' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.toml b/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.toml index c573582856e..bb6b76974a1 100644 --- a/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/unary_not_basic_2/Forc.toml @@ -5,5 +5,5 @@ name = "unary_not_basic_2" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/unify_identical_unknowns/Forc.lock b/test/src/e2e_vm_tests/test_programs/unify_identical_unknowns/Forc.lock new file mode 100644 index 00000000000..679a48e3f2a --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/unify_identical_unknowns/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'unify_identical_unknowns' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/use_full_path_names/Forc.lock b/test/src/e2e_vm_tests/test_programs/use_full_path_names/Forc.lock new file mode 100644 index 00000000000..39c212575c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/use_full_path_names/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'use_full_path_names' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/valid_impurity/Forc.lock b/test/src/e2e_vm_tests/test_programs/valid_impurity/Forc.lock new file mode 100644 index 00000000000..4bcda69568d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/valid_impurity/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'valid_impurity' +dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.lock b/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.lock new file mode 100644 index 00000000000..f8325bbacfd --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.lock @@ -0,0 +1,21 @@ +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +dependencies = [] + +[[package]] +name = 'core' +source = 'git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa' +dependencies = [] + +[[package]] +name = 'std' +source = 'git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226' +dependencies = ['core git+http://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] + +[[package]] +name = 'xos_opcode' +dependencies = [ + 'core git+http://github.com/FuelLabs/sway-lib-core?reference=v0.0.1#45c54ab37abde32a10e20964264cf7362dd73caa', + 'std git+http://github.com/FuelLabs/sway-lib-std?reference=v0.0.1#5a0938f8248d820ef178b6efd9c105463c543226', +] diff --git a/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.toml b/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.toml index 29fe3801848..afc74d2e583 100644 --- a/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/xos_opcode/Forc.toml @@ -5,5 +5,5 @@ name = "xos_opcode" entry = "main.sw" [dependencies] -std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" } -core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" } \ No newline at end of file +std = { git = "http://github.com/FuelLabs/sway-lib-std", tag = "v0.0.1" } +core = { git = "http://github.com/FuelLabs/sway-lib-core", tag = "v0.0.1" } diff --git a/test/src/e2e_vm_tests/test_programs/zero_field_types/Forc.lock b/test/src/e2e_vm_tests/test_programs/zero_field_types/Forc.lock new file mode 100644 index 00000000000..334718882cb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/zero_field_types/Forc.lock @@ -0,0 +1,3 @@ +[[package]] +name = 'zero_field_types' +dependencies = []