Mystical mistake on the sames toolchains

hi guys! me with my friend running the same simple smart contract with absolutly similar toolchains and we got this…
my laptop:

@fuel laptop:

My build is ok, but Alex’s is failed. Help us please understand why it happend

Hi, that’s odd. Can you try removing the Forc.lock file and trying again?

result is the same. it dont works,


I believe your $PATH may be favouring different versions of some plugins. Would you mind running forc --version, forc lsp --version, forc build --version and pasting the output here?



My theory is correct. I’ll work on a fix for forc, I’ll enhance the way the plugins are selected, giving preference to plugins defined in the same directory and fallback to the current behaviour (which is scanning $PATH sequentially).

Here is a ticket: Improve the way plugins are selected · Issue #5402 · FuelLabs/sway · GitHub

1 Like

@cr-fuel what can i do now?

After re-reading the output logs, it seems to be an issue with the std and core libraries. Would you mind deleting the git repo inside forc (rm -rf ~/.forc/git) and running the forc build command again?

I’ll keep investigating how it could have gotten to that state.

@cr-fuel i checked… @fuel dont have any mistakes building the same code on same toolchain…

It seems there are two compiler version competing, in the next version forc will show a warning when this happens.

The pow() function changed from Self to u32 in this commit. I’d recommend casting it as u32 instead and the problem should be solved. The underlying issue is that where it compiles, an older std-lib/compiler is used and in the computer where it fails, it is using the newer compiler/std-lib.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.