Contract's printer with oneLine=false is broken
Description
Steps to reproduce
Write a contract that includes IF
within LAMBDA
and try to print it.
The result will be an invalid Michelson contract that tezos-client cannot accept.
Expected behaviour
Usually, we print lambdas in one line, but IF
within it will appear printed multiline with wrong indentation.
tezos-client originate
will fail in this contract.
Actual behaviour
tezos-client originate
should pass.
Environment
- Ubuntu, tezos-client=1:0ubuntu7.4-1
-
master
,3de9a9467d
Author notes
This issue is quite hilarious.
First, we always printed instructions in one-liner, so we used oneLine=False
in recursive call of our printed.
Then we wanted to pretty print them when possible, and we started using oneLine=True
in the recursive calls.
Apparently the truth is somewhere in-between.
Edited by Konstantin Ivanov