Repository navigation
fix(cli): keep ABI files with the same name separate during graph build - #2187
Open
GeekyKartikey wants to merge 1 commit into
Open
GeekyKartikey wants to merge 1 commit into
GeekyKartikey wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2182
When a mapping uses both
v1/Token.jsonandv2/Token.json, the build writes them to the same path. The second file overwrites the first, so both entries in the built manifest point to the second ABI.I kept the original filename for the first file and used
Token-2.jsonfor the second. If that name is taken, the compiler tries the next number. References to the same source file can still share a path.The new test follows each path in the built manifest and checks the file contents for both a data source and a template. It also checks that an unrelated filename stays the same. The test failed before the fix and passes now.
The only failure in the CLI unit tests was the Gnosis start block lookup, which also failed on
main.Would you prefer using the ABI names from the manifest for conflicting files, or does the numbered suffix work for you?