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

CI: verify the macros expansion #36

Open
sept-en opened this issue Nov 2, 2022 · 0 comments
Open

CI: verify the macros expansion #36

sept-en opened this issue Nov 2, 2022 · 0 comments
Assignees
Labels
devops enhancement New feature or request

Comments

@sept-en
Copy link

sept-en commented Nov 2, 2022

As plugins are expected to be utilized by smart contracts for vital purposes (ownership, upgradability, ACL, etc.), it's mandatory to ensure the validity of possible near-plugins updates. While the target smart contract repository may have its own rules to ensure this, we may have our ways to verify the regression and absence of the introduction of something unexpected. This is achievable to

To achieve this, we need to add additional verification on examples' contracts. Required steps:

  • expand the code of each smart-contract example using cargo expand;
  • add expanded code (artifact) to the stage;
  • expand the code in CI;
  • verify the difference between staged and stored artifact source code in CI.

When this is added, this will add also have the following positive effects:

  • Examples are always up-to-date: every change in the plugin's functionality will also inherently require updating the source code of appropriate examples.
  • The impact of changes is clearly visible: if new functionality is added to the plugins or something is changed, it's clear in the expanded examples' code how exactly this plugin will "unwind" from macroses to source code. Thus it's possible to notice some unexpected behavior or mistakes while reviewing the expanded code.
@sept-en sept-en added enhancement New feature or request devops labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants