Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Cannot read property undefined in sol-compiler #1645

Closed
PaulRBerg opened this issue Feb 26, 2019 · 2 comments · Fixed by #1652
Closed

Cannot read property undefined in sol-compiler #1645

PaulRBerg opened this issue Feb 26, 2019 · 2 comments · Fixed by #1652
Assignees

Comments

@PaulRBerg
Copy link
Contributor

PaulRBerg commented Feb 26, 2019

Expected Behavior

Contracts should be compiled correctly when the compilerSettings are set in compiler.json.

Current Behavior

The following error is returned:

TypeError: Cannot read property 'Numbers' of undefined

Possible Solution

Well, if I remove the compilerSettings from compiler.json or the config file altogether, everything works fine. Perhaps tweaking the way the settings are interpreted would solve this issue.

Steps to Reproduce

1. git clone [email protected]:PaulRBerg/sol-compiler-bug.git
2. cd sol-compiler-bug
3. npx @0x/sol-compiler

Context

This has originally occurred in the AZTEC repo, in the "protocol" package on the "feat-coverage" branch, but the behaviour is exactly the same in the bug repo I created.

Your Environment

Tool Version
@0x/sol-compiler 3.1.0
npm 6.7.0
node 10.15.0
@LogvinovLeon LogvinovLeon self-assigned this Feb 26, 2019
@LogvinovLeon
Copy link
Contributor

Thanks for a repro. I'm able to repro. Looking into it

@LogvinovLeon
Copy link
Contributor

Ok. So there are two things here:

  1. You should use Numbers.sol instead of contracts/Numbers.sol in compiler.json
  2. The bug on our end: Fix a bug when combining sol-compiler settings from different sources #1652

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants