mario-eth / soldeer

Solidity Package Manager written in rust
MIT License
208 stars 23 forks source link

Does not load its dependencies automatically #188

Open DamirS09 opened 2 weeks ago

DamirS09 commented 2 weeks ago

I have installed the v4-periphery library, but it does not load its internal dependencies automatically. When trying to use functionality that relies on these modules, an error occurs indicating that the required libraries are missing.

Expected behavior: The v4-periphery library should automatically load all its internal dependencies when used, as expected by default.

Actual behavior: When using the library, an error is raised because the necessary dependencies that should be loaded automatically are not available.

Error: 
failed to resolve file: "/Users/user/Documents/work/project/dependencies/v4-periphery-latest/lib/v4-core/src/interfaces/IPoolManager.sol": No such file or directory (os error 2); check configured remappings
  --> /Users/user/Documents/work/project/script/DeployQuoter.s.sol
  @uniswap/v4-core/src/interfaces/IPoolManager.sol
remappings.txt
v4-core/=dependencies/v4-core-latest/src/
v4-periphery/=dependencies/v4-periphery-latest/
mario-eth commented 2 weeks ago

hey did you run it with recursive-deps true? https://book.getfoundry.sh/projects/soldeer#installing-dependencies-of-dependencies-aka-sub-dependencies

DamirS09 commented 2 weeks ago

hey did you run it with recursive-deps true? https://book.getfoundry.sh/projects/soldeer#installing-dependencies-of-dependencies-aka-sub-dependencies

Yes and i tried to use --recursive-deps my foundry.toml

[dependencies]
solady = { version = "latest", git = "https://github.com/Vectorized/solady.git", rev = "5f048036524032e31c692888f3e8bdf55f6c5209" }
v4-core = { version = "latest", git = "https://github.com/Uniswap/v4-core.git", rev = "18b223cab19dc778d9d287a82d29fee3e99162b0" }
v4-periphery = { version = "latest", git = "https://github.com/Uniswap/v4-periphery.git", rev = "5d7fde210eb5f1d6138bf2ee7d2d861d066c641f" }
forge-std = { version = "latest", git = "https://github.com/foundry-rs/forge-std.git", rev = "bf6606142994b1e47e2882ce0cd477c020d77623" }
solmate = { version = "latest", git = "https://github.com/transmissions11/solmate.git", rev = "97bdb2003b70382996a79a406813f76417b1cf90" }

[soldeer]
recursive_deps = true
remappings_regenerate = false
mario-eth commented 2 weeks ago

gonna give it a try during the weekend to see why it does not work...

beeb commented 2 weeks ago

I tested with the upcoming v0.4.0 and everything seems to work fine with this setup: https://github.com/beeb/demo-soldeer-recursive

Note that I do not have defined v4-core as dependency or have remappings for it. Foundry automatically goes and finds the remappings of v4-periphery and uses those.

beeb commented 2 weeks ago

Granted I think it doesn't work with the current version that you get with foundry, not sure why to be honest (looks like it doesn't recursively clone the submodules), but since it's fixed in the next version I think there's nothing else we must do.

DamirS09 commented 2 weeks ago

I tested with the upcoming v0.4.0 and everything seems to work fine with this setup: https://github.com/beeb/demo-soldeer-recursive

Note that I do not have defined v4-core as dependency or have remappings for it. Foundry automatically goes and finds the remappings of v4-periphery and uses those.

Thanks for the answers and an example, tell me when to wait for v0.4.0

mario-eth commented 2 weeks ago

We are gonna try a hotfix as well in 0.3 before 0.4.0

mario-eth commented 3 days ago

sorry, we were a bit busy with this and did not manage to do a hotfix yep, will prioritize.