Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix(solc): flatten import loc #946

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

rkrasiuk
Copy link
Contributor

@rkrasiuk rkrasiuk commented Feb 22, 2022

Motivation

The import location detection on solang failure change introduced in this commit erroneously identified the import location within the file contents.
i.e.
import "./Contract.sol"; would capture only ./Contract.sol instead of the full import statement together with import keyword and trailing semicolon.

Solution

Revert the change & add the test case that forces solang failure and ensures the correct flattening of the target file.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

ethers-solc/tests/project.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

@gakonst gakonst merged commit 1f822e4 into gakonst:master Feb 22, 2022
gakonst added a commit to foundry-rs/foundry that referenced this pull request Feb 22, 2022
parse fantom gakonst/ethers-rs#941
fix flattening gakonst/ethers-rs#946
consistent bytecode prefixing gakonst/ethers-rs#948
@rkrasiuk rkrasiuk deleted the fix/solc-flatten-import-loc branch February 22, 2022 15:30
charisma98 added a commit to charisma98/foundry that referenced this pull request Mar 4, 2023
parse fantom gakonst/ethers-rs#941
fix flattening gakonst/ethers-rs#946
consistent bytecode prefixing gakonst/ethers-rs#948
0129general added a commit to 0129general/FoundryProject that referenced this pull request May 8, 2024
parse fantom gakonst/ethers-rs#941
fix flattening gakonst/ethers-rs#946
consistent bytecode prefixing gakonst/ethers-rs#948
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants