swayswap icon indicating copy to clipboard operation
swayswap copied to clipboard

Add a way to use a specified version of forc when running locally

Open luizstacio opened this issue 2 years ago • 3 comments

As a developer cloning the repo, I will normally run cargo install forc fuel-core or fuelup install this would result in getting the latest forc version, which could have breaking changes on the current contracts developed on the contract.

Today this is already a issue when trying to run this project with forc v0.15

luizstacio avatar Jun 07 '22 22:06 luizstacio

Related: https://github.com/FuelLabs/fuelup/issues/46 and https://github.com/FuelLabs/fuelup/issues/65

adlerjohn avatar Jun 08 '22 15:06 adlerjohn

I believe I also ran into this when going through the services:setup.

...
Build ./packages/contracts/token_contract
  Compiled library "core".
  Compiled library "std".
  Compiled library "token_abi".
error
  --> /Users/davidma/crypto/swayswap/packages/contracts/swayswap_helpers/src/main.sw:17:19
   |
15 |
16 |         cfei i32;
17 |         srwq r2 r1;
   |                   ^ Expected an identifier.
18 |         r2: b256
19 |     }
   |
____

  Aborting due to 1 error.
Error: Failed to compile swayswap_helpers

I see srwq now has 4 parameters: https://github.com/FuelLabs/fuel-specs/blob/bca3cea8b3060b07229d7c6ccdd8fb6f554794d8/src/vm/instruction_set.md#srwq-state-read-sequential-32-byte-slots

Looks like this is almost unblocked by https://github.com/FuelLabs/fuelup/pull/317

djma avatar Dec 18 '22 06:12 djma

@djma The linked PR https://github.com/FuelLabs/fuelup/pull/317 directly fixes the issue, but would custom toolchains help you in this case? You have to do a bit of manual setup though.

eightfilms avatar Dec 19 '22 02:12 eightfilms