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

fix(solc): process all imports even input files #2136

Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Feb 10, 2023

Motivation

This fixes a multi version build bug that caused foundry-rs/foundry#4320

the previous graph import resolve step did not take into account that a dependency can be used by multiple versions in the same project.

Solution

  • process all dependencies of each file regardless if its a file of the project itself or an import.
  • Keep track of handled dependencies for efficiency

With this fix sources are cloned (because they could be used by multiple versions), this is negligible but could be improved by wrapping the file content in an Arc.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

@gakonst gakonst merged commit c436eae into gakonst:master Feb 10, 2023
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