You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: disallow dependency package name collision in forc-pkg (#6888)
## Description
closes#6861
`forc` was allowing dependency name being the same (through the use of
`package` alias and the declaration itself) as the project name.
The following two cases are now invalid and produces an error on the
forc-pkg side before going to the compiler.
```TOML
[project]
authors = ["Fuel Labs <contact@fuel.sh>"]
entry = "main.sw"
license = "Apache-2.0"
name = "lib_contract"
[dependencies]
lib_contract = { path = "../lib_contract_abi/", package = "lib_contract_abi" }
```
and
```TOML
[project]
authors = ["Fuel Labs <contact@fuel.sh>"]
entry = "main.sw"
license = "Apache-2.0"
name = "lib_contract_abi"
[dependencies]
lib_contract = { path = "../lib_contract_abi/", package = "lib_contract_abi" }
```
---------
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
0 commit comments