akosba / xjsnark

A high-level framework for developing efficient zk-SNARK circuits
MIT License
184 stars 34 forks source link

Util.java of zerocash example is broken #31

Closed m1cm1c closed 3 years ago

m1cm1c commented 3 years ago

Steps to reproduce

  1. Clone the XJSnark repo. I used this command: git clone --recurse-submodules https://github.com/akosba/xjsnark.git
  2. Launch MPS.
  3. Hit Alt+1.
  4. Right-click xjsnark.sandbox in xjsnark and choose Make Solution 'xjsnark.sandbox'.

This window will pop up (I reproduced this on multiple systems, including Ubuntu 20.04):

  1. Choose Ignore Errors.

You will see the following output:

This output includes:

compilation finished : errors: 115 warnings: 0
Compilation problems
xjsnark/zerocash/Util.java : Syntax error, insert "}" to complete ClassBody (line: 9)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 12)
xjsnark/zerocash/Util.java : Syntax error on token(s), misplaced construct(s) (line: 12)
xjsnark/zerocash/Util.java : Syntax error on token "for", = expected (line: 12)
xjsnark/zerocash/Util.java : Syntax error on token(s), misplaced construct(s) (line: 12)
xjsnark/zerocash/Util.java : Invalid character constant (line: 12)
xjsnark/zerocash/Util.java : Syntax error on token ">", byte expected after this token (line: 12)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 12)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 14)
xjsnark/zerocash/Util.java : Syntax error on token ")", { expected after this token (line: 15)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 18)
xjsnark/zerocash/Util.java : Syntax error on token ">", byte expected after this token (line: 18)
xjsnark/zerocash/Util.java : Syntax error on token "<", delete this token (line: 18)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 18)
xjsnark/zerocash/Util.java : Syntax error on token ";", invalid Expression (line: 18)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 20)
xjsnark/zerocash/Util.java : Syntax error on token ">", byte expected after this token (line: 20)
xjsnark/zerocash/Util.java : Syntax error on tokens, ( expected instead (line: 20)
xjsnark/zerocash/Util.java : Syntax error on token "!", @ expected (line: 20)
xjsnark/zerocash/Util.java : Syntax error on token(s), misplaced construct(s) (line: 20)
xjsnark/zerocash/Util.java : Syntax error on token "for", < expected (line: 20)
xjsnark/zerocash/Util.java : Syntax error, insert ">" to complete ReferenceType1 (line: 20)
xjsnark/zerocash/Util.java : Syntax error, insert "ClassType ( )" to complete Expression (line: 20)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 20)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 21)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 21)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 21)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 22)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 22)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 22)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 23)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 23)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 23)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 24)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 24)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 24)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 25)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 25)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 25)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 26)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 26)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 26)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 27)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 27)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 27)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 28)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 28)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 28)
xjsnark/zerocash/Util.java : Syntax error on token ";", [ expected (line: 30)
xjsnark/zerocash/Util.java : Syntax error on token ";", [ expected (line: 30)
xjsnark/zerocash/Util.java : Syntax error on token ")", invalid AssignmentOperator (line: 30)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 31)
xjsnark/zerocash/Util.java : Syntax error on token ";", , expected (line: 34)
xjsnark/zerocash/Util.java : Syntax error on token ";", , expected (line: 34)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 34)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 35)
xjsnark/zerocash/Util.java : Syntax error on token "=", <= expected (line: 35)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 35)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 36)
xjsnark/zerocash/Util.java : Syntax error on token "=", <= expected (line: 36)
xjsnark/zerocash/Util.java : Syntax error on token ";", , expected (line: 36)
xjsnark/zerocash/Util.java : Syntax error on tokens, ( expected instead (line: 37)
xjsnark/zerocash/Util.java : Syntax error on token ";", [ expected (line: 40)
xjsnark/zerocash/Util.java : Syntax error on token ";", [ expected (line: 40)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 40)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 41)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 41)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 41)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 42)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 42)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 42)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 43)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 43)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 43)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 45)
xjsnark/zerocash/Util.java : Syntax error on token ">", ( expected (line: 45)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 45)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert "]" to complete Expression (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert "]" to complete ArrayAccess (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert ")" to complete Expression (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert ")" to complete Expression (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert ")" to complete Expression (line: 46)
xjsnark/zerocash/Util.java : Syntax error, insert ")" to complete Expression (line: 46)
xjsnark/zerocash/Util.java : Syntax error on token "<", delete this token (line: 46)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 46)
xjsnark/zerocash/Util.java : Syntax error on token(s), misplaced construct(s) (line: 46)
xjsnark/zerocash/Util.java : Syntax error on token ";", delete this token (line: 46)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 48)
xjsnark/zerocash/Util.java : Syntax error on token "=", <= expected (line: 48)
xjsnark/zerocash/Util.java : Syntax error on token "+", ++ expected (line: 48)
xjsnark/zerocash/Util.java : Syntax error on tokens, delete these tokens (line: 48)
xjsnark/zerocash/Util.java : Syntax error on token ";", [ expected (line: 48)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 49)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 50)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 51)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 52)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 53)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 54)
xjsnark/zerocash/Util.java : Syntax error on token ";", -> expected (line: 55)
m1cm1c commented 3 years ago

For anyone having the problem that you cannot run anything because of this error: Simply delete the zerocash module, restart MPS, and rebuild xjsnark.sandbox.

akosba commented 3 years ago
  1. Clone the XJSnark repo. I used this command: git clone --recurse-submodules https://github.com/akosba/xjsnark.git
  2. Launch MPS.
  3. Hit Alt+1.
  4. Right-click xjsnark.sandbox in xjsnark and choose Make Solution 'xjsnark.sandbox'.

The following should be done between steps 3 and 4. This is listed in the readme file.

Please let me know if the error persists.

m1cm1c commented 3 years ago

Thank you, it worked! Sorry for having overlooked that.