You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
when emitting duplicated file + contract name pairs we end up overwriting them.
This is a scenario I did not anticipate when implementing the output handler and a limitation of the current layout file/contract-name.sol
we handle multiple versions with a version suffix in the file name.
if there are multiple file+name pairs it's guaranteed that the file is in another folder, meaning parent(file) is always unique. so perhaps if there are conflicts, we add the parent(file)|project roo to the output path.
either has out/parent(file)/file/contract.sol
The text was updated successfully, but these errors were encountered:
I would have expected this to be an anti pattern..agree it's an edge case we hadn't considered.
I think we end up having to add directory nesting e.g. out/inner/a.json & out/a.json next to each other? But maybe we only "unflatten" the artifacts that are conflicting?
Artifacts are in out/<filename>/<contract>.json, so if you have something like:
src/a/Token.sol
src/b/Token.sol
and both of them have a similar named contract (e.g. Token), then you'd have a conflict in the out directory, more specifically for this example, both would be trying to write to out/Token.sol/Token.json. Doesn't happen often I think, but does happen sometimes - I can imagine this is "worse" for us because dependencies might have contracts/file names similar to yours as well
as highlighted here foundry-rs/foundry#1488
when emitting duplicated file + contract name pairs we end up overwriting them.
This is a scenario I did not anticipate when implementing the output handler and a limitation of the current layout
file/contract-name.sol
we handle multiple versions with a version suffix in the file name.
if there are multiple file+name pairs it's guaranteed that the file is in another folder, meaning
parent(file)
is always unique. so perhaps if there are conflicts, we add theparent(file)|project roo
to the output path.either has
out/parent(file)/file/contract.sol
The text was updated successfully, but these errors were encountered: