Skip to content

Commit

Permalink
Merge branch 'vaivaswatha/metadata' of github.com:FuelLabs/sway into …
Browse files Browse the repository at this point in the history
…vaivaswatha/metadata
  • Loading branch information
vaivaswatha committed Oct 29, 2024
2 parents 56e8958 + 4b51764 commit e0ad271
Show file tree
Hide file tree
Showing 102 changed files with 1,527 additions and 659 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ concurrency:
env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
RUST_VERSION: 1.79.0
NIGHTLY_RUST_VERSION: nightly-2024-07-16
RUST_VERSION: 1.82.0
NIGHTLY_RUST_VERSION: nightly-2024-10-21

jobs:
get-fuel-core-version:
Expand Down Expand Up @@ -412,7 +412,7 @@ jobs:
with:
cache-provider: "buildjet"
- name: Cargo Run E2E Tests (EVM)
run: cargo run --locked --release --bin test -- --target evm --locked --no-encoding-v1
run: cargo run --locked --release --bin test -- --target evm --locked --no-experimental new_encoding

# TODO: Remove this upon merging std tests with the rest of the E2E tests.
cargo-test-lib-std:
Expand Down
18 changes: 18 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ members = [
"sway-ast",
"sway-core",
"sway-error",
"sway-features",
"sway-ir",
"sway-ir/sway-ir-macros",
"sway-lsp",
Expand Down Expand Up @@ -60,6 +61,7 @@ forc-tx = { path = "forc-plugins/forc-tx/", version = "0.66.2" }
sway-ast = { path = "sway-ast/", version = "0.66.2" }
sway-core = { path = "sway-core/", version = "0.66.2" }
sway-error = { path = "sway-error/", version = "0.66.2" }
sway-features = { path = "sway-features/", version = "0.66.2" }
sway-lsp = { path = "sway-lsp/", version = "0.66.2" }
sway-parse = { path = "sway-parse/", version = "0.66.2" }
sway-types = { path = "sway-types/", version = "0.66.2" }
Expand Down Expand Up @@ -164,6 +166,7 @@ libtest-mimic = "0.7"
lsp-types = "0.94"
mdbook = { version = "0.4", default-features = false }
minifier = "0.3"
normalize-path = "0.2.1"
notify = "6.1"
notify-debouncer-mini = "0.4"
num-bigint = "0.4"
Expand Down
4 changes: 3 additions & 1 deletion docs/book/src/blockchain-development/native_assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ use std::{
constants::DEFAULT_SUB_ID,
context::msg_amount,
string::String,
contract_id::ContractId
};
configurable {
Expand Down Expand Up @@ -408,7 +409,8 @@ use std::{
},
context::this_balance,
storage::storage_string::*,
string::String
string::String,
contract_id::ContractId
};
storage {
Expand Down
6 changes: 2 additions & 4 deletions forc-pkg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ forc-tracing.workspace = true
forc-util.workspace = true
fuel-abi-types.workspace = true
futures.workspace = true
git2 = { workspace = true, features = [
"vendored-libgit2",
"vendored-openssl",
] }
git2 = { workspace = true, features = ["vendored-libgit2", "vendored-openssl"] }
gix-url = { workspace = true, features = ["serde"] }
hex.workspace = true
ipfs-api-backend-hyper = { workspace = true, features = ["with-builder"] }
Expand All @@ -33,6 +30,7 @@ serde_json.workspace = true
serde_with.workspace = true
sway-core.workspace = true
sway-error.workspace = true
sway-features.workspace = true
sway-types.workspace = true
sway-utils.workspace = true
tar.workspace = true
Expand Down
18 changes: 1 addition & 17 deletions forc-pkg/src/manifest/build_profile.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
use serde::{Deserialize, Serialize};
use sway_core::{OptLevel, PrintAsm, PrintIr};

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Default)]
#[serde(rename_all = "kebab-case")]
pub struct ExperimentalFlags {
pub new_encoding: bool,
}

/// Parameters to pass through to the `sway_core::BuildConfig` during compilation.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
Expand Down Expand Up @@ -39,8 +33,6 @@ pub struct BuildProfile {
pub reverse_results: bool,
#[serde(default)]
pub optimization_level: OptLevel,
#[serde(default)]
pub experimental: ExperimentalFlags,
}

impl BuildProfile {
Expand All @@ -65,9 +57,6 @@ impl BuildProfile {
error_on_warnings: false,
reverse_results: false,
optimization_level: OptLevel::Opt0,
experimental: ExperimentalFlags {
new_encoding: false,
},
}
}

Expand All @@ -88,9 +77,6 @@ impl BuildProfile {
error_on_warnings: false,
reverse_results: false,
optimization_level: OptLevel::Opt1,
experimental: ExperimentalFlags {
new_encoding: false,
},
}
}
}
Expand All @@ -103,10 +89,9 @@ impl Default for BuildProfile {

#[cfg(test)]
mod tests {
use crate::{BuildProfile, PackageManifest};
use sway_core::{OptLevel, PrintAsm, PrintIr};

use crate::{manifest::build_profile::ExperimentalFlags, BuildProfile, PackageManifest};

#[test]
fn test_build_profiles() {
let manifest = PackageManifest::from_dir("./tests/sections").expect("manifest");
Expand Down Expand Up @@ -160,7 +145,6 @@ mod tests {
error_on_warnings: true,
reverse_results: true,
optimization_level: OptLevel::Opt0,
experimental: ExperimentalFlags { new_encoding: true },
};
let profile = build_profiles.get("release").expect("release profile");
assert_eq!(*profile, expected);
Expand Down
4 changes: 3 additions & 1 deletion forc-pkg/src/manifest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ pub struct Project {
pub entry: String,
pub implicit_std: Option<bool>,
pub forc_version: Option<semver::Version>,
#[serde(default)]
pub experimental: HashMap<String, bool>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -771,7 +773,7 @@ impl std::ops::Deref for PackageManifestFile {
/// This can be configured using environment variables:
/// - use `FORC_IMPLICIT_STD_PATH` for the path for the std-lib;
/// - use `FORC_IMPLICIT_STD_GIT`, `FORC_IMPLICIT_STD_GIT_TAG` and/or `FORC_IMPLICIT_STD_GIT_BRANCH` to configure
/// the git repo of the std-lib.
/// the git repo of the std-lib.
fn implicit_std_dep() -> Dependency {
if let Ok(path) = std::env::var("FORC_IMPLICIT_STD_PATH") {
return Dependency::Detailed(DependencyDetails {
Expand Down
Loading

0 comments on commit e0ad271

Please sign in to comment.