Open cameel opened 1 week ago
The immediate cause is that the callback has this weird flow, where the sources are not stored in a single place, but independently in both FileReader
and CompilerStack
. We initially fill the FileReader
, then pass the sources into CompilerStack
, which may add new ones loaded by the callback, but the reader still exists and updates its m_sourceCodes
map: https://github.com/ethereum/solidity/blob/3ee5f2dfc09b35019fcf887f7a5e1d0054e250c5/libsolidity/interface/FileReader.cpp#L163-L165
We should get rid of that. It would be best to separate the storage of the sources from the callback. The callback should know its settings but be stateless otherwise.
@cameel please assign it to me
Description
When the same path is specified under
urls
of multiple contracts in Standard JSON input, we get an ICE in the import callback.Environment
Steps to Reproduce
input.json
:/tmp/test.sol
Output: