Skip to content
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

Validation is not working if other files included #74

Closed
davidyuk opened this issue Dec 17, 2022 · 1 comment · Fixed by #78
Closed

Validation is not working if other files included #74

davidyuk opened this issue Dec 17, 2022 · 1 comment · Fixed by #78

Comments

@davidyuk
Copy link
Member

--validate argument works fine if my contract doesn't have includes, but it fails if it has.

Includes.aes

include "Library.aes"

contract Includes =
    entrypoint test(x: int): int = Library.sum(x, 4)

Library.aes

namespace Library =
  function sum(x: int, y: int): int = x + y
$ aesophia_cli ./Includes.aes
cb_+JNGA6B51l49GY6JJ6qb/jroQydox6vWgqENgx/qdLdRje0rvsC4Zrg4/kTWRB8ANwA3ABoOgj8BAz/+TbeAOQI3AgcHBxQUAAIA/pKLIDYANwEHBwwDCAwBAAQDEU23gDmoLwMRRNZEHxFpbml0EU23gDkxLkxpYnJhcnkuc3VtEZKLIDYRdGVzdIIvAIU3LjAuMQBZCB3I
$ aesophia_cli ./Includes.aes --validate cb_+JNGA6B51l49GY6JJ6qb/jroQydox6vWgqENgx/qdLdRje0rvsC4Zrg4/kTWRB8ANwA3ABoOgj8BAz/+TbeAOQI3AgcHBxQUAAIA/pKLIDYANwEHBwwDCAwBAAQDEU23gDmoLwMRRNZEHxFpbml0EU23gDkxLkxpYnJhcnkuc3VtEZKLIDYRdGVzdIIvAIU3LjAuMQBZCB3I
Parse error at line 1, col 1:
Couldn't find include file 'Library.aes'

$ aesophia_cli --version
Sophia compiler version 7.0.1
@hanssv
Copy link
Member

hanssv commented Mar 23, 2023

--validate seems to be missing the correct default include path

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

Successfully merging a pull request may close this issue.

2 participants