Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Change annotations to match the standardese style #426

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

iamveritas
Copy link
Contributor

@iamveritas iamveritas commented Jan 1, 2020

Change Description

Change annotations to be Standardese compatible.
Resolves #392

  • Deployment Changes

  • API Changes

  • Documentation Additions

Notes

@iamveritas iamveritas added the documentation Requires attention of documentation team. e.g. documentation is expected to be generated. label Jan 1, 2020
@iamveritas iamveritas requested a review from dskvr January 1, 2020 10:53
@iamveritas iamveritas self-assigned this Jan 1, 2020
*/
[[eosio::action]]
void exec( ignore<name> executer, ignore<transaction> trx );
[[eosio::action]] void exec( ignore<name> executer, ignore<transaction> trx );
Copy link
Contributor Author

@iamveritas iamveritas Jan 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

N.B. this type of change is a must, otherwise standardese chokes with a critical error and aborts its execution, that is, the [[eosio::action]] has to be on the same line with the function declaration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larryk85 Does this cause issues? There is no way around this requirement when using Standardese. When the C++ style declarations are multi-line Standardese does not find the entity.

It could be possible to fix this, but not sure if we have the resources. Are multi-line declaration/entity signatures a compiler requirement?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not a compiler requirement, the attributes are only lexically linked to the first binding token. So you can place them on the same line or 100 lines between them, the compiler doesn't care. That is odd that standardese would fail on that, it should be using Clang to parse the code and working off of the AST that it generates. I would've expected it to fail in both cases then.

Copy link
Contributor Author

@iamveritas iamveritas Feb 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larryk85 @dskvr
status: if we want standardese annotations we have to either live with this constraint mentioned above (eosio action attribute has to be on the same line with the function declaration) or we should find a way in our clang patch to address this matter.
which one should we go with?

@lparisc lparisc changed the title Change annotations to match the standardise style Change annotations to match the standardese style Mar 11, 2020
@iamveritas iamveritas removed the request for review from dskvr June 18, 2020 21:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Requires attention of documentation team. e.g. documentation is expected to be generated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants