-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: noir-compiler breadth-first resolver (#3307)
This PR fixes an issue hit by @spypsy and @catmcgee last week while working on a sample contract. They were not able to compile their contract because the compiler failed to find all of the needed dependencies. I've identified the issue with `NoirDependencyManager` resolving dependencies in a depth-first manner. This caused issues with libraries that had dependencies of their own linked to by relative paths. This was a problem because the new pipeline using wasm only unpacks the required folder from a github archive (while Nargo gets the whole thing). In the contract's case, it had dependencies on easy_private_state and value_note (in this order) but easy_private_state needed value_note to exist before the manager resolved it. This PR replaces the algorithm with a breadth-first resolver which fixes this. It also adds updates the existing unit test for the manager to check this edge case.
- Loading branch information
Showing
3 changed files
with
43 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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