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

You shall not have another CompilerStack aside me error in Remix when compiling with 0.5.9 #15052

Open
Subway2023 opened this issue Apr 24, 2024 · 1 comment
Labels

Comments

@Subway2023
Copy link

Description

I used the 0.5.9 compiler in Remix to compile the program with an error, but I was able to successfully compile using binary solc

Environment

  • Compiler version: 0.5.9
  • Target EVM version (as per compiler settings): None
  • Framework/IDE (e.g. Truffle or Remix):
  • EVM execution environment / backend / blockchain client: Remix, Command-Line
  • Operating system: Linux

Steps to Reproduce

pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

contract test {
    uint[2][] public originalData;
    uint[2][] public decodedData;
    function encodeData() public returns (uint) {

        originalData.push([1, 2]);
        originalData.push([3, 4]);
        originalData.push([5, 6]);

        bytes memory encodedData=abi.encode(originalData);

        decodedData = abi.decode(encodedData, (uint[2][]));

        return decodedData[1][1];
    }
}

Remix

1713969976519
1713969986986

Command

solc-0509 test.sol --bin

Successfully obtained bytecode

@mehtavishwa30
Copy link
Contributor

mehtavishwa30 commented May 6, 2024

Hey @Subway2023! Thanks for reporting this.

Generally, this issue occurs if the import callback passed to solc-js has an error, but you catch it and continue using the compiler. Throwing exceptions in the callback is invalid. See ethereum/solc-js#675 (comment) for more context.

We need to check whether this is solely an issue of Remix throwing an exception in import callback or if some other bug exists on the application side i.e. Remix (in which case, I would be inclined to close this issue and suggest you open an issue in the Remix codebase).

Could you please share a brief, self-contained code snippet that we can reproduce to understand this better? We aren't able to reproduce the snippet you've provided originally.

@cameel cameel changed the title remix compile error You shall not have another CompilerStack aside me error in Remix when compiling with 0.5.9 May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants