Default to @layout:comb everywhere
Motivation and Context
Records and variants can either be @layout:comb or @layout:tree (the current default.)
@layout:comb is usually more optimal, especially for records: @layout:comb records are compiled to Michelson combs, which have better support and look prettier. @layout:comb is also more predictable / less surprising, because the fields are in declared order instead of alphabetical order.
@layout:comb can be less efficient for variants, but I don't expect the difference to be significant in most cases.
Description
This change makes @layout:comb the default everywhere -- for all variants, records, and tuple ([a, b, ...]
/a * b * ...
) types.
Component
-
compiler -
website -
webide -
vscode-plugin -
debugger
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to not work as expected) -
Performance improvement (non-breaking change that improves performance) -
None (change with no changelog)
Changelog
Made @layout:comb the default layout for all variants, records, and tuple ([a, b, ...]
/a * b * ...
) types.
This is a BREAKING CHANGE!
If your contract needs to interoperate with existing contracts, contracts compiled with previous LIGO versions or other compilers, or existing standards or off-chain tools/clients/indexers/etc, you MUST verify this interop still works after this change. Testing with ligo test
or by compiling a fresh set of contracts is generally not sufficient! You must test against the actual contracts as they are deployed or will be deployed.
For more info, see the FAQ pages on how to deal with this change and why this happened.
Checklist:
-
If a new syntax has been introduced, put a message on slack ligo-lsp -
Changes follow the existing coding style (use dune @fmt
to check). -
Tests for the changes have been added (for bug fixes / feature). -
Documentation has been updated. -
Changelog description has been added (if appropriate). -
Start titles under ## Changelog
section with #### (if appropriate). -
There is no image or uploaded file in changelog -
Examples in changed behaviour have been added to the changelog (for breaking change / feature).