forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: error out if more than one package declares the same package na…
…me in a workspace (FuelLabs#3840) closes FuelLabs#3650
- Loading branch information
1 parent
3998c10
commit d1a3f07
Showing
12 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
test/src/e2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/Forc.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[package]] | ||
name = 'contract' | ||
source = 'member' | ||
|
||
[[package]] | ||
name = 'contract2' | ||
source = 'member' |
3 changes: 3 additions & 0 deletions
3
test/src/e2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[workspace] | ||
|
||
members = ["contract", "contract2", "script", "script2"] |
8 changes: 8 additions & 0 deletions
8
...2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/contract/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "contract" | ||
implicit-std = false | ||
|
||
[dependencies] |
11 changes: 11 additions & 0 deletions
11
..._vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/contract/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
contract; | ||
|
||
abi MyContract { | ||
fn test_function() -> bool; | ||
} | ||
|
||
impl MyContract for Contract { | ||
fn test_function() -> bool { | ||
true | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/contract2/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "contract" | ||
implicit-std = false | ||
|
||
[dependencies] |
11 changes: 11 additions & 0 deletions
11
...vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/contract2/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
contract; | ||
|
||
abi MyContract { | ||
fn test_function() -> bool; | ||
} | ||
|
||
impl MyContract for Contract { | ||
fn test_function() -> bool { | ||
true | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
.../e2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/script/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "script" | ||
implicit-std = false | ||
|
||
[dependencies] |
5 changes: 5 additions & 0 deletions
5
...2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/script/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
script; | ||
|
||
fn main() { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...e2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/script2/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "script" | ||
implicit-std = false | ||
|
||
[dependencies] |
5 changes: 5 additions & 0 deletions
5
...e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/script2/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
script; | ||
|
||
fn main() { | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
test/src/e2e_vm_tests/test_programs/should_fail/duplicate_pkg_names_in_workspace/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
category = "fail" | ||
|
||
# check: Duplicate package names detected in the workspace: |