sablier-labs / docs

Documentation and guides for Sablier
https://docs.sablier.com
GNU General Public License v3.0
16 stars 7 forks source link

Problem with local environment guide #43

Closed maxdesalle closed 1 year ago

maxdesalle commented 1 year ago

Followed the steps outlined here, and encountered the following issue with forge version forge 0.2.0 (d8f2434 2023-01-20T00:19:01.043527Z).

➜  ~ forge init my-project
Initializing /Users/mdesalle/my-project...
Installing forge-std in "/Users/mdesalle/my-project/lib/forge-std" (url: Some("https://github.com/foundry-rs/forge-std"), tag: None)
    Installed forge-std v1.5.6
    Initialized forge project.
➜  ~ cd my-project
➜  my-project git:(main) forge install sablier-labs/v2-core sablier-labs/v2-periphery
Installing v2-core in "/Users/mdesalle/my-project/lib/v2-core" (url: Some("https://github.com/sablier-labs/v2-core"), tag: None)
    Installed v2-core v1.0.0
Installing v2-periphery in "/Users/mdesalle/my-project/lib/v2-periphery" (url: Some("https://github.com/sablier-labs/v2-periphery"), tag: None)
    Installed v2-periphery v1.0.0
➜  my-project git:(main) echo "@sablier/v2-core=lib/v2-core/src" >> remappings.txt

➜  my-project git:(main) echo "@sablier/v2-periphery=lib/v2-periphery/src" >> remappings.txt
➜  my-project git:(main) rm src/Counter.sol
➜  my-project git:(main) rm test/Counter.t.sol
➜  my-project git:(main) touch test/StreamCreator.t.sol
➜  my-project git:(main) vim src/StreamCreator.sol
➜  my-project git:(main) forge build
The application panicked (crashed).
Message:  failed to extract foundry config:
foundry config error: Unknown evm version: paris for setting `evm_version`

Location: config/src/lib.rs:446

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[1]    44400 abort      forge build
PaulRBerg commented 1 year ago

@maxdesalle you are using an old version of Forge (dated Jan 20, 2023). The fix is to:

  1. Re-install foundryup by running: curl -L https://foundry.paradigm.xyz | bash
  2. Run foundrup
maxdesalle commented 1 year ago

Works @PaulRBerg, thanks!

PaulRBerg commented 1 year ago

No prob - would you like to add an admonition at the top of that guide that says something like this:

Make sure you are using the latest version of Foundry by running foundryup

maxdesalle commented 1 year ago

Great idea! Implemented in 7aaa501.