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

Strip comments before looking for imports with regexes #26

Merged

Conversation

LogvinovLeon
Copy link
Contributor

@LogvinovLeon LogvinovLeon commented Feb 9, 2021

Description

When we search for dependencies with regexes - we sometimes accidentally catch the commented out imports.
This PR fixes that.

Ideally - we would use a parser and operate on an AST (there is a TODO in code for that), but this seems to solve the problem for now

Testing instructions

Try compiling https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f#code
Before: Fails on a commented out import
After: Succeeds

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

Copy link
Contributor

@dorothy-zbornak dorothy-zbornak left a comment

Choose a reason for hiding this comment

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

tyty, will publish soon

@dorothy-zbornak dorothy-zbornak merged commit 55fc12a into 0xProject:development Feb 17, 2021
@dorothy-zbornak
Copy link
Contributor

published

@LogvinovLeon LogvinovLeon deleted the strip-comments-imports branch February 17, 2021 06:36
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.

2 participants