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

Reset imported src files on each call to flatten #4

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

prathamesh0
Copy link
Collaborator

@prathamesh0 prathamesh0 commented Dec 21, 2021

Part of cerc-io/watcher-ts#23

  • Reset imported src files on each call to flatten:
    • Earlier, on multiple calls to the exported function flatten, if the input contracts had common imports, they would be placed in the output of just a single contract and not all the contracts where they are used. The issue was caused due to usage of a global variable (importedSrcFiles) to store the imported files.
    • Now that the variable to store the imported source files is reset on each call to flatten a contract, the common imports are output for every contract that imports them.

@prathamesh0 prathamesh0 self-assigned this Dec 21, 2021
@ashwinphatak ashwinphatak merged commit 144ef6c into master Dec 21, 2021
@ashwinphatak ashwinphatak deleted the pm-reset-importsrcfiles branch December 21, 2021 05:45
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