vyper
vyper copied to clipboard
remove `-f ast` from compiler outputs
Version Information
- vyper Version (output of
vyper --version): 533682df9895dabab3033df776953c595ea0107c
What's your issue about?
- remove
-f astoption and decrease the compiler's surface - in most cases the annotated ast is the preferred option
- leaving this open for discussion in case someone might have a usecase for ast without annotations (e.g. error recovery)
- as per the referenced version, the output doesn't even contain imports making it even less useful
further, the following deepcopy:
https://github.com/vyperlang/vyper/blob/533682df9895dabab3033df776953c595ea0107c/vyper/compiler/phases.py#L166
should be most likely run after the imports are resolved.
if the imports were added to the ast output, the output might be incorrect as the imports would not get deepcopied and thus could be annotated if we requested (in this specific order) -f annotated_ast, ast
we could raise a DeprecationWarning for a few releases and see if anybody complains
It's really useful for tooling that want to parse Vyper code that might not be compiling (e.g. Language servers) https://github.com/trocher/couleuvre