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

Document @version syntax #1449

Closed
charles-cooper opened this issue May 24, 2019 · 2 comments · Fixed by #1662
Closed

Document @version syntax #1449

charles-cooper opened this issue May 24, 2019 · 2 comments · Fixed by #1662
Labels
documentation Documentation Easy Pickings Used to denote issues that should be easy to implement

Comments

@charles-cooper
Copy link
Member

You can set a version pragma but it's undocumented. See test cases below for usage:
https://github.com/ethereum/vyper/blob/cdfb36d0c6d4a38ee3d9d34e001b141ec7c6f55f/tests/compiler/test_pre_parser.py#L74-L105

@fubuloubu fubuloubu added the Easy Pickings Used to denote issues that should be easy to implement label May 24, 2019
@jacqueswww jacqueswww added the documentation Documentation label Jun 3, 2019
@charles-cooper
Copy link
Member Author

charles-cooper commented Oct 27, 2019

here's an example:

# foo.vy
#@version0.1.13b

@public
def foo():
  pass

the version validator checks the major and minor version (but not the patch). so against compiler version v0.1.13b, @version0.1.13b or @version0.1.12 will validate but @version0.2.1 will not.

@fubuloubu
Copy link
Member

There can be a space between version and the version number, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation Easy Pickings Used to denote issues that should be easy to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants