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

🔁 Upgrade to Solidity Version 0.8.21 #148

Closed
pcaversaccio opened this issue Jul 19, 2023 · 4 comments · Fixed by #149
Closed

🔁 Upgrade to Solidity Version 0.8.21 #148

pcaversaccio opened this issue Jul 19, 2023 · 4 comments · Fixed by #149
Assignees
Labels
dependencies 🔁 Pull requests that update a dependency file good first issue 🎉 Good for newcomers
Milestone

Comments

@pcaversaccio
Copy link
Owner

pcaversaccio commented Jul 19, 2023

@pcaversaccio pcaversaccio added good first issue 🎉 Good for newcomers dependencies 🔁 Pull requests that update a dependency file labels Jul 19, 2023
@pcaversaccio pcaversaccio added this to the 0.0.3 milestone Jul 19, 2023
@pcaversaccio pcaversaccio self-assigned this Jul 19, 2023
@pcaversaccio pcaversaccio changed the title 🔁 Upgrade to Solidity Version 0.8.20 🔁 Upgrade to Solidity Version 0.8.21 Jul 19, 2023
@pcaversaccio
Copy link
Owner Author

It looks like emitting events from other contracts is currently not possible due to an ICE: ethereum/solidity#14430

@nikola-matic
Copy link

It looks like emitting events from other contracts is currently not possible due to an ICE: ethereum/solidity#14430

Emitting events from other contracts itself works just fine; requesting --userdoc or --devdoc when you have such events is what causes the ICE. Hope that helps.

@pcaversaccio
Copy link
Owner Author

pcaversaccio commented Jul 24, 2023

Emitting events from other contracts itself works just fine; requesting --userdoc or --devdoc when you have such events is what causes the ICE. Hope that helps.

I'm having a hard time to make a contract compile however; let's take the following contract (Test.sol):

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

contract X {
    event E();
}

contract C {
    function g() public {
        emit X.E();
    }
}

Now invoking something like solc --asm .\Test.sol (not requesting userdoc nor devdoc), will still throw:

Internal compiler error:
C:\Users\circleci\project\libsolidity\interface\Natspec.cpp(89): Throw in function class Json::Value __cdecl solidity::frontend::Natspec::userDocumentation(const class solidity::frontend::ContractDefinition &)
Dynamic exception type: struct boost::wrapexcept<struct solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[struct solidity::util::tag_comment * __ptr64] = Solidity assertion failed

Can you elaborate on what am doing wrong? Version: Version: 0.8.21+commit.d9974bed.Windows.msvc

@nikola-matic
Copy link

Emitting events from other contracts itself works just fine; requesting --userdoc or --devdoc when you have such events is what causes the ICE. Hope that helps.

I'm having a hard time to make a contract compile however; let's take the following contract (Test.sol):

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

contract X {
    event E();
}

contract C {
    function g() public {
        emit X.E();
    }
}

Now invoking something like solc --asm .\Test.sol (not requesting userdoc nor devdoc), will still throw:

Internal compiler error:
C:\Users\circleci\project\libsolidity\interface\Natspec.cpp(89): Throw in function class Json::Value __cdecl solidity::frontend::Natspec::userDocumentation(const class solidity::frontend::ContractDefinition &)
Dynamic exception type: struct boost::wrapexcept<struct solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[struct solidity::util::tag_comment * __ptr64] = Solidity assertion failed

Can you elaborate on what am doing wrong? Version: Version: 0.8.21+commit.d9974bed.Windows.msvc

In that case nothing - essentially, any steps that require userdoc or devdoc (asm, metadata, etc.) will indeed fail - I was just commenting in case you just read the issue and didn't try to compile anything. I guess you'll have to wait for the 0.8.22 release like most everyone else :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 🔁 Pull requests that update a dependency file good first issue 🎉 Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants