Skip to content

Commit 5064247

Browse files
IGI-111ironcev
andauthored
Stabilize ABI errors (#7241)
## Description Stabilize the `error_type` feature. Fixes #6765 ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: Igor Rončević <ironcev@hotmail.com>
1 parent 1ac3514 commit 5064247

File tree

337 files changed

+511
-578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+511
-578
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,6 @@ jobs:
478478
run: cargo run --locked --release -p forc -- test --release --locked --path ./test/src/sdk-harness
479479
- name: Cargo Test sway-lib-std
480480
run: cargo test --locked --release --manifest-path ./test/src/sdk-harness/Cargo.toml -- --nocapture
481-
- name: Build All Tests - Experimental Feature 'error_type'
482-
run: cargo run --locked --release -p forc -- build --experimental error_type --release --locked --path ./test/src/sdk-harness
483-
- name: Cargo Test sway-lib-std - Experimental Feature 'error_type'
484-
run: cargo test --locked --release --manifest-path ./test/src/sdk-harness/Cargo.toml -- --nocapture
485481

486482
forc-run-benchmarks:
487483
runs-on: buildjet-4vcpu-ubuntu-2204
@@ -548,18 +544,10 @@ jobs:
548544
run: forc test --path sway-lib-std
549545
- name: Run Std Unit Tests (Release)
550546
run: forc test --release --path sway-lib-std
551-
- name: Run Std Unit Tests - Experimental feature 'error_type' (Debug)
552-
run: forc test --experimental error_type --path sway-lib-std
553-
- name: Run Std Unit Tests - Experimental feature 'error_type' (Release)
554-
run: forc test --release --experimental error_type --path sway-lib-std
555547
- name: Run In Language Unit Tests (Debug)
556548
run: forc test --path test/src/in_language_tests
557549
- name: Run In Language Unit Tests (Release)
558550
run: forc test --release --path test/src/in_language_tests
559-
- name: Run In Language Unit Tests - Experimental feature 'error_type' (Debug)
560-
run: forc test --experimental error_type --path test/src/in_language_tests
561-
- name: Run In Language Unit Tests - Experimental feature 'error_type' (Release)
562-
run: forc test --release --experimental error_type --path test/src/in_language_tests
563551

564552
forc-pkg-fuels-deps-check:
565553
runs-on: buildjet-4vcpu-ubuntu-2204

forc-pkg/src/pkg.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,8 +1775,7 @@ pub fn compile(
17751775

17761776
const ENCODING_V0: &str = "0";
17771777
const ENCODING_V1: &str = "1";
1778-
const SPEC_VERSION: &str = "1";
1779-
const SPEC_VERSION_ERROR_TYPE: &str = "1.1";
1778+
const SPEC_VERSION: &str = "1.1";
17801779

17811780
let mut program_abi = match pkg.target {
17821781
BuildTarget::Fuel => {
@@ -1798,11 +1797,7 @@ pub fn compile(
17981797
} else {
17991798
ENCODING_V0.into()
18001799
},
1801-
if experimental.error_type {
1802-
SPEC_VERSION_ERROR_TYPE.into()
1803-
} else {
1804-
SPEC_VERSION.into()
1805-
}
1800+
SPEC_VERSION.into()
18061801
),
18071802
Some(sway_build_config.clone()),
18081803
metrics

forc-plugins/forc-client/proxy_abi/proxy_contract-abi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"programType": "contract",
3-
"specVersion": "1",
3+
"specVersion": "1.1",
44
"encodingVersion": "1",
55
"concreteTypes": [
66
{

forc-plugins/forc-client/src/op/deploy.rs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forc-plugins/forc-client/src/op/run/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl ScriptCallHandler {
6262
mod tests {
6363
use super::{ScriptCallHandler, Type};
6464

65-
const TEST_JSON_ABI: &str = r#"{"programType": "contract","specVersion": "1","encodingVersion": "1","metadataTypes":[],
65+
const TEST_JSON_ABI: &str = r#"{"programType": "contract","specVersion": "1.1","encodingVersion": "1","metadataTypes":[],
6666
"concreteTypes":[{"concreteTypeId":"2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d",
6767
"type":"()"},{"concreteTypeId":"b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903","type":"bool"},
6868
{"concreteTypeId":"c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b","type":"u8"}],

forc-plugins/forc-client/src/util/tx.rs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

forc-plugins/forc-client/test/data/big_contract/big_contract-abi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"programType": "contract",
3-
"specVersion": "1",
3+
"specVersion": "1.1",
44
"encodingVersion": "1",
55
"concreteTypes": [
66
{

forc-plugins/forc-client/test/data/contract_with_types/contract_with_types-abi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"programType": "contract",
3-
"specVersion": "1",
3+
"specVersion": "1.1",
44
"encodingVersion": "1",
55
"concreteTypes": [
66
{

forc-plugins/forc-client/test/data/deployed_predicate/deployed_predicate-abi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"programType": "predicate",
3-
"specVersion": "1",
3+
"specVersion": "1.1",
44
"encodingVersion": "1",
55
"concreteTypes": [
66
{

forc-plugins/forc-client/test/data/deployed_script/deployed_script-abi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"programType": "script",
3-
"specVersion": "1",
3+
"specVersion": "1.1",
44
"encodingVersion": "1",
55
"concreteTypes": [
66
{

0 commit comments

Comments
 (0)