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

refactor(test-helpers): remove test-helpers part one: contracts folder #1977

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

ottodevs
Copy link
Member

@ottodevs ottodevs commented Feb 10, 2020

Even if this commit looks huge, it is actually quite simple:

  • It removes contracts folder from @tps/test-helpers and its content
  • Moves ADynamicForwarder and DynamicScriptHelpers locally to DotVoting
  • Change DotVoting imports
  • Inline IForwarder and rename to solve issues with coverage
  • Removing pre and post coverage hooks, unnecessary for validation after
    inlining the interface

Note: ADynamicForwarder and DynamicScriptHelpers are now part of DotVoting app, that is why coverage was decreased. I decided to not ignore those files, as I think they should be tested as well.

Even if this commit looks huge, it is actually quite simple:
- It removes `contracts` folder from `@tps/test-helpers` and its content
- Moves ADynamicForwarder and DynamicScriptHelpers locally to DotVoting
- Change DotVoting imports
- Inline IForwarder and rename to solve issues with coverage
- Removing pre and post coverage hooks, unnecessary for validation after
inlining the interface
@ottodevs ottodevs requested review from a team as code owners February 10, 2020 07:02
@ghost ghost requested review from a team and removed request for a team February 10, 2020 07:02
Copy link
Collaborator

@topocount topocount left a comment

Choose a reason for hiding this comment

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

We should discuss making the IForwarder change without addressing the bug in the coverage tool. Curious what @Quazia thinks

// TODO: Research why using the @aragon/os version breaks coverage
import "@aragon/os/contracts/common/IForwarder.sol";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's not re-implement this until we decide how to proceed with renaming this import during coverage

"precommit": "lint-staged",
"precoverage": "sed -i 's+@aragon/os/contracts/common/IForwarder.sol+./IForwarder.sol+g' ../shared/test-helpers/contracts/common/ADynamicForwarder.sol",
Copy link
Collaborator

@topocount topocount Feb 17, 2020

Choose a reason for hiding this comment

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

It doesn't make sense to remove this since it addresses a bug in the coverage tool. We should upgrade our coverage tool before removing this since it doesn't make sense to create our own duplicated import when it already exists in a dependency we're using

style: remove trailing whitespaces everywhere
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

Successfully merging this pull request may close these issues.

None yet

2 participants