-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circuit compilation fail with wasm, if a dependency has no dependencies
tag in Nargo.toml
#4338
Comments
This was referenced Feb 12, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 12, 2024
# Description ## Problem\* ## Summary\* While looking at #4338 I noticed that we weren't linting noir_wasm. This PR adds `eslint` dependencies ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Thanks for making us aware of this. I've added a check so that we return an empty dependencies map rather than |
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 22, 2024
…4344) # Description ## Problem\* Resolves #4338 ## Summary\* This PR returns an empty dependencies map rather than undefined if the package being compiled doesn't have any dependencies. I've also updated the test suite so it also compiles more than just a contract ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I noticed a problem that during compilation if a library that is in a dependency for main project has no
[dependencies]
tag, then thePackage.getDependencies
function will returnundefined
which eventually causes the program to crash when tryingObject.entries(noirPackage.getDependencies()))
with the errorCannot convert undefined or null to object
.I found a simple workaround to just add an empty [dependencies] tag to
Nargo.toml
of the library, which by this point is already copied to the local environment. But that adds a headache : )I think you should add a check for
undefined
before thefor
loop, and if it is, just skip to the next iteration of thewhile
.The text was updated successfully, but these errors were encountered: