Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member "exitCode" not found or not visible after argument-dependent lookup in struct VmSafe.FfiResult memory. #224

Closed
marchev opened this issue Oct 26, 2023 · 2 comments

Comments

@marchev
Copy link
Contributor

marchev commented Oct 26, 2023

I get the following compile-time error when I try to run a very simply test with Vulcan's println:

❯ forge test
[⠆] Compiling...
[⠒] Compiling 35 files with 0.8.21
[⠑] Solc 0.8.21 finished in 195.43ms
Error:
Compiler run failed:
Error (9582): Member "exitCode" not found or not visible after argument-dependent lookup in struct VmSafe.FfiResult memory.
   --> lib/vulcan/src/_modules/Commands.sol:176:31:
    |
176 |             output.exitCode = ffiResult.exitCode;
    |                               ^^^^^^^^^^^^^^^^^^

This is the test I am trying to run:

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.21;

import { Test, println } from "vulcan/test.sol";

contract VulcanTest is Test {

    function testFoo() public {
        println("Foo!");
    }
}

Forge version:

❯ forge --version
forge 0.2.0 (9fd44a7 2023-10-26T00:23:32.602895000Z)
@gnkz
Copy link
Contributor

gnkz commented Oct 26, 2023

Het @marchev ! Thanks for opening an issue. I think the problem here is that you are using an older version of forge-std. There was a breaking change introduced with the release of forge-std@v1.7.0 where exit_code was renamed to exitCode.

More details:
#214
foundry-rs/forge-std#458

You can solve this by installing a newer version of forge-std, v1.7.1 is the latest at the moment

forge install foundry-rs/forge-std@v1.7.1 should do the trick

Let me know if that works 😄

@gnkz
Copy link
Contributor

gnkz commented Oct 26, 2023

Seems like this was already solved. @marchev let me know if you keep having problems. Feel free to reopen this issue or create another one.

Thanks again!

@gnkz gnkz closed this as completed Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants