Skip to content

`ligo compile` command now infer compilation target in some cases

Rémi requested to merge remi@single_contract_inference into dev

Motivation and Context

user request ( no issue )

Description

ligo compile command now infer compilation target in some cases

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

ligo compile contract now infers the compilation target when the top-level is not a contract and defines only one contract module. In this case, the module becomes the compilation target (to avoid usage of -m).

This following contract

(* myfile.mligo *)
module Single = struct
  [@entry] let main () () : operation list * unit = [],()
end

can now be compiler using `ligo compile contract myfile.mligo`

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).
Edited by Laurent Canis

Merge request reports

Loading