Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
IGI-111 authored Oct 28, 2024
2 parents cd446ef + ddb505d commit 0330206
Show file tree
Hide file tree
Showing 81 changed files with 1,462 additions and 520 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
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
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
2 changes: 2 additions & 0 deletions 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
Loading

0 comments on commit 0330206

Please sign in to comment.