Skip to main content
Version: 1.7.0

LIGO Changelog

next

Run this release with Docker: docker run ligolang/ligo:next

Added :

1.7.0

Run this release with Docker: docker run ligolang/ligo:1.7.0

Added :

  • tree sitter foreign function interface (!3238 by leo.unoki)

    Details :

    Add tree-sitter and tree-sitter-typescript libraries

  • [#2187] Support import decls up to Ast_core (!3227 by krendelhoff)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [JsLIGO] Allow parenthesised type expressions as summands of sum types ("discriminated union") (!3194 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Union types (!3192 by alistair.obrien)

    Details :

    feat(lang): Improves support for discriminant unions by adding union types.

    A union type describes a value that can be one of several types. We use the vertical bar (|) to separate the types. For instance, int | string is the type of a value that can be either an int or a string.

    const a = { a: 1 } as { a: int } | { b: bool };

    Common Fields

    When working with a union type of records, we can only access members common to all types in the union.

    type Car = {
    driver: string;
    fuel: nat;
    }
    type Bike = {
    driver: string;
    hasTrainingWheels: bool;
    }
    const getDriver = (vehicle: Car | Bike): string => vehicle.driver;

    If a value has the type Car | Bike, we can only access driver because it is the only member common to both types. We cannot access fuel or hasTrainingWheels without additional type checks, as accessing fuel on a Bike would result in a runtime error.

    Discriminant Unions

    A common pattern for using union types is to include a single field with a singleton type to distinguish between the types. This allows the type checker to infer the specific type in a conditional statement.

    type IntValue = { typ: "INT"; x: int };
    type StrValue = { typ: "STR"; s: string };
    type Value = IntValue | StrValue;

    All types in the Value union have a common field typ. Since typ is a singleton type, we can compare its value to determine the specific type being used. Here’s how to use a switch statement to narrow down the type:

    const valueToInt = (val: Value): int => {
    switch (val.typ) {
    case "INT":
    return val.x;
    case "STR":
    return int(String.length(val.s));
    }
    return -1;
    }

    In this example, typ helps to discriminate between the IntValue and StrValue types, allowing us to safely access their specific fields.

  • [#2183] Add LSP runtime analytics (!3176 by heitor.toledo)

    Details :

    The language server can now collect analytics such as the number of restarts, execution time of methods, and number of crashes. Analytics are sent only if the user has agreed to let LIGO collect analytics.

    Crashes should be a bit better handled too.

  • Constant disambiguate (!3168 by theeduardorfs)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#2183] Implement LSP initialize analytics (!3165 by heitor.toledo)

    Details :

    Added analytics to the initialization of the language server (only if the user has agreed to let LIGO collect them).

  • Small improvement and a fix to the front-end (!3162 by rinderkn)

    Details :

    Preprocessing directives are not allowed between declarations inside a structure.

  • feat: add nix derivation and shell for LIGO (!3161 by alistair.obrien)

    Details :

    feat: add nix derivation and shell for LIGO

  • feat(lsp): add support for selection range (!3160 by alistair.obrien)

    Details :

    feat(lsp): add support for selection range

  • feat: remove environment library and deprecate --protocol flag (!3146 by alistair.obrien)

    Details :

    Deprecate the --protocol flag.

    ligo compile contract unit.mligo --protocol parisb
    Warning: the flag `-p` (aliases: `--protocol`) is deprecated and will be ignored
    { parameter unit ;
    storage unit ;
    code { DROP ; UNIT ; NIL operation ; PAIR } }

Fixed :

  • fix(interpreter): allow performing operations on tickets in tests (!3237 by alistair.obrien)

    Details :

    fix(interpreter): allow performing operations on tickets in tests

    For instance, the following demonstrates the use of create_ticket and read_ticket, which previously resulted in an error.

    let () =
    let ticket = Tezos.create_ticket "Hi" 10n in
    let (ticketer, _, _, _) = Tezos.read_ticket ticket in
    Test.log ticketer
  • [#2173] Fix inlay hints for functions (!3214 by krendelhoff)

    Details :

    Inlay hints are shown correctly for all combinations of parameter type annotations and return type.

  • [#2171] Hide ghost idents with appropriate comment (!3206 by krendelhoff)

    Details :

    Ghost identifiers in inlay hints are replaced with appropriate comment.

  • [#1683] Handle case user tries to include directory (!3202 by krendelhoff)

    Details :

    Attempt to include a directory is highlighted as an error with proper message.

  • [#2181] Handle more cases for record completions (!3181 by krendelhoff)

    Details :

    Makes completions work for polymorphic record types.

  • [#2185] Do not check for pattern anomalies on type mismatch with error recovery (!3179 by heitor.toledo)

    Details :

    If typer error recovery is enabled (on for the language server), and the user writes code where there is a mismatch between a scrutinee's type and a pattern's type, it will probably lead to a crash. For example, in the following code:

    type t = Unit
    let Unit = ()
    let () =
    match () with
    | Unit -> ()

    The scrutinee (Unit : t) and the pattern (() : unit) have mismatched types (t is not the same as unit), leading to a crash.

    With the changes from this changelog, this crash should no longer occur.

  • [#2184] Forbid empty modules in the parser (!3177 by heitor.toledo)

    Details :

    Fixed "Failure tl" crash in the compiler and language server when writing an empty module in CameLIGO.

  • fix(aggregation): on includes, don't include the module environment (!3157 by alistair.obrien)

    Details :

    fix(aggregation): on includes, don't include the module environment

  • Remove need for parentheses in object updates (!3154 by alan.marko)

    Details :

    Fixed a bug requiring extra parentheses when doing object update.

  • [#2611] Avoid inlay hints for signature items (!3153 by krendelhoff)

    Details :

    Fixed inlay hints being displayed in signatures and interfaces even in the presence of annotations.

  • [#2069] Distinguish between tez and mutez at CST level (!3125 by alan.marko)

    Details :

    Support added for distinguishing tez and mutez in LIGO pretty printer.

Performance :

  • [#2143] Optimize aggregation pass (!3180 by DK318)

    Details :

    Improved performance for LSP and compilation pipeline.

    The LSP should now take less time between keystrokes.

    This is done by optimizing aggregation pass.

  • [#2143] Strip references pass and collect them in checking (!3170 by DK318)

    Details :

    Improved performance for LSP.

    The LSP should now take less time between keystrokes.

    This is done by stripping the references pass and moving their collection to the type checker.

  • [#2143] Optimize following passes in LSP (!3166 by DK318)

    Details :

    Improved performance for LSP and compilation pipeline.

    The LSP should now take less time between keystrokes.

    This is done by optimizing self_ast_typed and self_mini_c passes.

1.6.0

Run this release with Docker: docker run ligolang/ligo:1.6.0

Breaking :

Added :

  • Disambiguate array tuples from lists using typing information (!3138 by theeduardorfs)

    Details :

    Support typed-based disambiguation for lists and tuples, in JSLigo.

    const a : unit = [];
    const b : list<int> = [1, 2];
    const c : [int, int, int] = [1, 2, 3];

Fixed :

Performance :

  • [#2143] Run aggregation pass only once in following passes (!3137 by DK318)

    Details :

    The LSP should now take less time between keystrokes.

    This is done by running aggregation pass only once per doc processing.

  • [#2143] Improve the performance for inline mangled modules pass (!3133 by heitor.toledo)

    Details :

    Small performance boost for the LSP. The time between keystrokes will decrease.

  • [#2143] Move generated variables replacement into checking (!3129 by DK318)

    Details :

    The LSP should now take less time between keystrokes.

    This is done by moving generated type variables replacements into checking pass.

1.5.0

Run this release with Docker: docker run ligolang/ligo:1.5.0

Breaking :

  • perf: fix polynomial decoding induced by #imports (!3112 by alistair.obrien)

    Details :

    perf!: fix polynomial decoding induced by #imports

Added :

  • Stdlib: introducing Tezos.Next module and Assert (!3121 by er433)

    Details :

    New factorization on certain components of the stdlib have been introduced: A new version of Tezos module/namespace, which is accessible as Tezos.Next.Grouped commands dealing with assertions in Assert module/namespace.Grouped commands dealing with binary tuples in Tuple2 (including curry/uncurry). (see the documentation on each module/namespace of the API for further information)

    Warning messages signaling to use these new variants have been added to the old functions.

  • [#2098] Implement inlay hints for inferred types (!3104 by DK318)

    Details :

    Add a support for inlay hints in LSP. Now you can see type annotation hints in your code.

  • Made singleton types inhabitable, and subtypes of the type of the value (!3103 by xavierm02)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Allowing expressions {...}.x (!3102 by rinderkn)

    Details :

    The parser now accepts immediate projection of record expressions, e.g. "{x=1}.x".

  • Draft: [#1751] Implement typer error recovery (!3098 by heitor.toledo)

    Details :

    The type-checker now supports error recovery, which the LSP turns on. This allows for more diagnostics to be reported, for more variables to have resolved types, and due to some technicalities, also improves the performance.

  • Adding top-level definition of type 'a big_set. (!3096 by rinderkn)

    Details :

    It is now possible to use 'a big_set instead of 'a Big_set.t.

  • Testing framework: add primitive for timelock verification (!3087 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#2084] Add attribute for TZIP-16 compatibility (!3086 by Martoon)

    Details :

    Added tzip16_compatible attribute for indicating that the given storage value is expected to satisfy TZIP-16 metadata rules.

    This attribute does nothing on itself at the moment, but some IDEs may provide additional verification.

    Example (CameLIGO):

    type storage =
    {
    data : int;
    metadata : (string, bytes) big_map
    }
    [@tzip16_compatible]
    let storage_sample : storage =
    {
    data = 5;
    metadata =
    Big_map.literal
    [
    ("",
    [%bytes
    "https://ipfs.io/ipfs/QmSBc8QuynU7bArUGtjwCRhZUbJyZQArrczKnqM7hZPtfV"])
    ]
    }

    Example (JsLIGO):

    type storage = { data: int; metadata: big_map<string, bytes> }
    @tzip16_compatible
    const storage_sample: storage = {
    data: 5,
    metadata: Big_map.literal(
    list(
    [
    [
    "",
    (
    bytes
    `https://ipfs.io/ipfs/QmSBc8QuynU7bArUGtjwCRhZUbJyZQArrczKnqM7hZPtfV`
    )
    ]
    ]
    )
    )
    }

Fixed :

  • [Chore] Prevent crash in typer error recovery (!3124 by heitor.toledo)

    Details :

    The LSP should now be a bit more resilient against crashes, and better log exceptions.

  • Stdlib: remove usage of include (!3122 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: use CONCAT instead of fold + uncurry concat (!3119 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Performance :

  • Draft: [#2143] Optimizations in references and nanopasses (!3120 by DK318)

    Details :

    Improved performance for LSP and compilation pipeline.

    The LSP should now take less time between keystrokes.

    This is done by reducing the number of tree traversals in nanopasses compilation stage.

  • [#2143] Reuse the normalization table LSP-wide (!3118 by heitor.toledo)

    Details :

    The LSP should now take less time between keystrokes.

    This is done by creating a table for file canonicalization, which accounted for a huge time spent by the LSP.

  • [#2143] New, faster algorithm for scopes completion, and caching for path normalization (!3117 by heitor.toledo)

    Details :

    The LSP should now have faster times between keystrokes.

    This happens because the LSP would previously calculate all scopes for all points between keystrokes for use in completions. Now, it will do so lazily, only when document symbols or completions for scopes are requested. Moreover, a new algorithm was implemented, that should be much faster.

    Also, the LSP would try to normalize paths in a loop for all definitions in case a document symbol or inlay hints request was received. It will now cache those to avoid normalizing paths that were previously normalized, giving a performance boost.

  • optimize aggregation (!3100 by lesenechal.remi)

    Details :

    Performance improvement on module inclusion

1.4.0

Run this release with Docker: docker run ligolang/ligo:1.4.0

Added :

  • Stdlib: add extra functions in Test.Next (!3085 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Stdlib: add deprecated messages on Test (for Test.Next) (!3082 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1965] Show polymorphic types in LSP + replace generated type variables (!3079 by DK318)

    Details :

    Show polymorphic values in hovers instead of raw ones. For example, in this code

    type 'a t = { x : 'a; y : string }
    let x : int t = { x = 42; y = "42" }

    on x hover you'll see int t instead of { x : int; y : string }.

  • Added syntax for typed object expressions. (!3076 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • ligo compile command now infer compilation target in some cases (!3075 by lesenechal.remi)

    Details :

    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

  • Deprecation attribute: unique identifiers and module support (!3073 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • preprocessor define option (!3070 by lesenechal.remi)

    Details :

    You can now pass a list of defines to LIGO preprocessor using flag -D.

    (* myfile.mligo *)
    #if FOO
    [@entry] let toto () () : operation list * unit = failwith "lol"
    #endif

    ligo compile contract myfile.mligo -D FOO

  • [#2130] Add disc union fields to scopes (!3066 by DK318)

    Details :

    Support disc union fields in LSP. Now you can see hovers on these fields and use "go to definition" capability.

  • Rewrite of the standard library (!3064 by rinderkn)

    Details :

    Added a module Big_set (lazily accessed sets, based on Big_map)Documentation for CameLIGO and JsLIGO.Introduced local type t aliases in modules Set, List, Map etc.Renamed the type parameters for maximum readability.Added, when meaningful, functions of_list that can take a list expression that may not be a literal.Deprecated some functions and added equivalent ones with a better name (e.g, List.head and List.head_opt). Added either a function size or length so all modules have both.Same for sub and slice whenever meaningful.Added functions empty in all modules.Simplified implementations, made them uniform (order of constructors in pattern maching, for example), tried to avoid relying on built-ins.The module Option was messy.

  • Draft: [#2101] Find all references project-wise (!3060 by heitor.toledo)

    Details :

    "Find All References"/"Go to References" and "Rename" will now look for all references from the project root (closest directory with ligo.json looking from the current path and parents). Previously, those references would only be found in files that had been previously opened.

  • Draft: [#1676] Add missing items to scopes (!3042 by DK318)

    Details :

    Support function type parameters.Add support for constructors and record fields into LSP. Now you can see their types on hover and use other capabilities like "go to definition".

  • [#2120] Implement autocompletion for CLI (!3031 by DK318)

    Details :

    Added CLI autocompletion script. All the instructions are available in README.md

Fixed :

  • big set literal fix (!3083 by lesenechal.remi)

    Details :

    fix a bug where Big_set literals where not typing

  • Internal: use bigger params. in memo_rec (!3081 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added escaping with pretty-printing tokens (including strings). (!3078 by rinderkn)

    Details :

    Strings are now properly escaped upon formatting.

  • [#2148] Fix comparison for regions (!3074 by heitor.toledo)

    Details :

    Fixed comparison for regions not being well formed, which could cause crashes in the LSP.

  • Fix "Not en entrypoint" errors pointing to the wrong entrypoint (!3072 by xavierm02)

    Details :

    If an entrypoint signature was wrong, the diagnostic was on the first entrypoint. Now it's fixed and target the wrong one.

  • [#2101] Fix list_directory skipping directories (!3067 by heitor.toledo)

    Details :

    Fixed the LSP sometimes skipping some directories while looking for completions and references.

  • Fix ligo install the first time a package is installed (!3065 by melwyn95)

    Details :

    When a package was installed for the first time. Compiler was not able to resolve it without a second ligo install. Now packages are resolved after the first installation.

  • [Chore] Fix project file creation (!3062 by heitor.toledo)

    Details :

    When the language server asks the user to create a project file, it would create an empty ligo.json file. It now initializes the file with a minimal skeleton so the file is usable.

  • [#2132] Fix record field completions for modules (!3056 by DK318)

    Details :

    Fix the next bugs in completions after the dot symbol for modules: Lack of items in aliases.Extra items Now completion items are more accurate for modules.

  • oxford flag update (!3054 by lesenechal.remi)

    Details :

    Fix the protocol flag description to target Oxford2

  • [#2131] Handle capability modes when declaring capabilities (!3049 by heitor.toledo)

    Details :

    The LSP server will now correctly declare its list of supported server capabilities in the presence of all capabilities, only semantic tokens, or no semantic tokens flags.

  • [#1922] Suggest restarting when LIGO path is changed (!3041 by Martoon)

    Details :

    When changing LIGO path in settings, a suggestion will pop up to restart VSCode.

  • [#2113] Update diagnostics as soon max diagnostics setting changes (!3038 by Martoon)

    Details :

    Diagnostics will be updated automatically after changing Max Number of Problems config option.

Performance :

  • Backend: add a new opt. for simplyfing GET_AND_UPDATE ; DROP to UPDATE (!3092 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

1.3.0

Run this release with Docker: docker run ligolang/ligo:1.3.0

Added :

  • Time-lock support (!3035 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1647] Implement document highlight request (!3034 by Martoon)

    Details :

    Added highlighting of all encounters of the variable/type/module under the cursor.

  • Protocol: update to support v19.0-ligo (Oxford 2) (!3030 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1650] Implement document symbol (!3029 by heitor.toledo)

    Details :

    Added support for document symbols in the language server.

  • Stdlib: introduce Test.Next (!3028 by er433)

    Details :

    This MR introduces Test.Next, a submodule to Test that is a re-organization, and that could be used to replace Test.

    For now, we avoid using include, as there are some performance issues related to it.

  • [#2056] Handle module and top-level includes (!3021 by heitor.toledo)

    Details :

    includes are now handled for CameLIGO for modules and at the top-level in the language server.

  • Distribute ligo arm64 unix binary attached to release (!3019 by Laucans)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#2056] Better signature items support (!2981 by heitor.toledo)

    Details :

    Made various improvements to signatures and interfaces in the language server:

    Changed "go to definition" to try to find the signatures/interfaces that define some module element.Implemented "go to implementations" to try to find the modules/namespaces that implement some signature item.Also added support to look for implementations from signature names themselves.Implemented "go to declaration" to point to where a variable was originally defined (mimics the original "go to definition" behavior before this patch).Fixed hovers to properly distinguish between modules/namespaces and signatures/interfaces.Fixed "find references" (and "rename") to include signature items.[VSCode/Vim/Emacs extensions] Fixed syntax highlighting for signatures and interfaces.

  • [#1642] Implement semantic tokens (!2722 by heitor.toledo)

    Details :

    Added support for semantic tokens for all three dialects in the LIGO Language Server.

Fixed :

  • Fix: use memoization for refresh_env in aggregation (!3036 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1964] Preserve module path in orig_var (!3027 by heitor.toledo)

    Details :

    Preserve a type's module location in hover. So if there is M.t, it will be displayed as such rather than just t.

  • [#2080] Improve completions for modules (!3026 by DK318)

    Details :

    Improved completions for modules. Now they behave like completions for types and values.Mangled module names are stripped from completions.

  • [#1957] Fix go to type definition for inferred records (!3025 by heitor.toledo)

    Details :

    Fixes go to type definition pointing to a record expression's body rather than the actual type definition when there is no type annotation in the LSP.

  • [#2110] Fix the inferred type for complex patterns in the LSP (!3024 by heitor.toledo)

    Details :

    Fixed a problem where the LSP would display the wrong types for complex patterns. For example, previously, let a, b = 1, "hello" would show both a and b as having type int * string. Now, it will correctly display a : int and b : string.

  • [#1811] Preserve more info for types decompilation in JsLIGO (!3023 by DK318)

    Details :

    Fixed a bug with wrong hovers for named functions and discriminated union types in JsLIGO.

Performance :

  • [#1985] Optimize scope completions (!3033 by DK318)

    Details :

    Improve performance for scope completions. Now they're working significantly faster.

  • [#2122] Improve performance for file completions (!3032 by DK318)

    Details :

    Improved performance for file completions. Now we list files only on demand.

1.2.0

Run this release with Docker: docker run ligolang/ligo:1.2.0

Added :

  • [JsLIGO] Extended interface entries so parametric types are valid type expressions. (!2999 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Enable multiple decorators of statements not separated by semicolons (!2997 by rinderkn)

    Details :

    More optional semicolons between statements.

  • Fixed some optional semicolons. Added making attributes from @comment. (!2996 by rinderkn)

    Details :

    More optional semicolons.

  • [JsLIGO] For-of loops with patterns instead of a variable ranging over the collection. (!2994 by rinderkn)

    Details :

    We can now write for ([key, value] of map) { ... }.

  • Draft: [#2094] Translate Ast_typed into TypeScript for docs generation (!2993 by DK318)

    Details :

    Added a ligo doc command which will generate documentation for your project. At this moment only JsLIGO is supported and it requires typedoc to be installed.

    Related MR

  • [#2094] Add documentation to LSP hovers (!2991 by Sorokin-Anton)

    Details :

    Now we show documentation comments (like (** *) in CameLIGO and /** */ in JsLIGO) in LSP hovers

  • [#2091] Show completions for files in imports (!2980 by DK318)

    Details :

    Added completions for files. Now if you press Ctrl + Space in vscode inside quotes in the #import/#include directive then you'll see files that you can import.

  • [#1740] Add extended comparator functions to the Test module + show errors on wrong test primitive usages (!2972 by DK318)

    Details :

    Added extended comparators to the Test module. They could be used to compare values that couldn't be compared via regular = (e.g. lists and big maps).

    Handle wrong test primitives usage in the LSP. Now you can see an error at the beginning of your file.

  • Draft: Reworking parametric types in CameLIGO and JsLIGO (concrete syntax, CST, pretty-printing) (!2968 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1675] Add module signatures on hover (!2953 by DK318)

    Details :

    Added signatures for modules on hovering. They're displayed like:

    module Bytes : sig
    val concats : bytes list -> bytes
    val pack : a -> bytes
    val unpack : bytes -> a option
    val length : bytes -> nat
    val concat : bytes -> bytes -> bytes
    val sub : nat -> nat -> bytes -> bytes
    end
  • Print module signature (!2924 by lesenechal.remi)

    Details :

    A new command ligo print signature to print module signature.

  • [#2021] Allow user to choose faster implementations for LSP completions (!2827 by Sorokin-Anton)

    Details :

    Added new faster implementations for the LSP completion request. If LIGO LSP stuck while computing completions, you can choose other implementations in the VSCode extension settings.

Fixed :

  • Fix: handle tick ' in CameLIGO's T_ForAll (!3006 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#2087] Fix false negative for dynamic entrypoints (!3004 by DK318)

    Details :

    Fix false negative errors for dynamic entry points (Cannot unify ...). Now dynamic entry points are typed correctly in the LSP.

  • [Chore] Remove ghost_ident from hover (!3000 by XJIE6)

    Details :

    Unresolved appears instead of ghost tokens on hover request

  • Fix: interpreter case for loops (!2983 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: make monomorphisation descent into E_raw_code for %michelson (!2982 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Print attribute values between quotes in CameLIGO + remove blank line after comments (!2978 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: dynamic entries in top-level module and stdlib (!2976 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • #1689 Filter errors related to tokens generated by error recovery (!2971 by XJIE6)

    Details :

    The LSP now filters false-negative errors about ghost identifiers.

  • Draft: [#1962] Fix broken links to library files (!2967 by DK318)

    Details :

    Fixed a bug with broken document links to library files. Now if you ctrl+click them it'll show you the correct file.

  • Module name mangling for #import (!2965 by rinderkn)

    Details :

    The internal name mangling for imported modules was incomplete and non-injective.

  • [#1748] Fix mangled module names on hovering (!2961 by DK318)

    Details :

    Fixed mangled module names on imports hovering. Now you can see the correct file paths like:

    module K = "../A.mligo"
  • Fix changelog generation (!2959 by Laucans)

    Details :

    No details provided for this change. Please visit the MR to learn more

1.1.0

Run this release with Docker: docker run ligolang/ligo:1.1.0

Added :

  • Interfaces and module types: implement extends/include (!2936 by er433)

    Details :

    Here is an example showing include in module type:

    module type FA0 = sig
    type t
    [@entry] val transfer : unit -> t -> operation list * t
    end
    module type FA0EXT = sig
    include FA0
    [@entry] val transfer2 : unit -> t -> operation list * t
    end
    module FA0Impl : FA0 = struct
    type t = unit
    [@entry] let transfer (_ : unit) (_ : t) : operation list * t = ([], ())
    end
    module FA0EXTImpl : FA0EXT = struct
    include FA0Impl
    [@entry] let transfer2 (_ : unit) (_ : t) : operation list * t = ([], ())
    end

    Here is an example showing JsLIGO's new features:

    interface FABase {
    type t;
    };
    interface FA0 extends FABase {
    @entry const transfer : (_u : unit, s : t) => [list<operation>, t];
    };
    interface FA0Ext extends FA0 {
    @entry const other1 : (_u : unit, s : t) => [list<operation>, t];
    };
    interface FA1 extends FABase {
    @entry const other2 : (_u : unit, s : t) => [list<operation>, t];
    };
    namespace Impl implements FA0Ext, FA1 {
    type t = int;
    @entry const transfer = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @entry const other1 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @entry const other2 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    };
    interface FAAll extends FA0Ext, FA1 {
    @entry const other3 : (_u : unit, s : t) => [list<operation>, t];
    @view const v1 : (_u : unit, s : t) => t;
    };
    namespace ImplAll implements FAAll {
    type t = int;
    @entry const transfer = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @entry const other1 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @entry const other2 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @entry const other3 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @view const v1 = (_u : unit, s : t) : t => s;
    /* foo, other4 and v2 are not in FAAll, but still added, because filtering
    is not enabled */
    export const foo = (s : t) : t => s;
    @entry const other4 = (_u : unit, s : t) : [list<operation>, t] => [list([]), s];
    @view const v2 = (_u : unit, s : t) : t => s;
    }
    const test = do {
    let orig = Test.originate(contract_of(ImplAll), ImplAll.foo(42), 0tez);
    let p : parameter_of ImplAll = Other4();
    Test.transfer_exn(orig.addr, p, 1mutez);
    }
  • Draft: [#2076] Support entrypoint and view related errors in LSP (!2927 by Sorokin-Anton)

    Details :

    LSP server now displays errors related to invalid entrypoints/views

  • Internal: add new @deprecated attribute to CameLIGO (!2926 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Draft: [#1762] Implement dumping CST in the compiler (!2620 by DK318)

    Details :

    Adds a ligo info dump-cst command which is useful for the debugger. It prints contracts CST in JSON format (supported only for CameLIGO and JsLIGO).

Fixed :

  • [fix] Ensure BLST_PORTABLE is 'y' during build on CI (!2952 by Laucans)

    Details :

    Fix old processor can raise an illegal hardware instruction which can be raised with old processors. Avoid Tezos submodule emit ADX instructions.

  • Error handling: use passes errors instead of failwith in 04-nanopasses' trivial (!2949 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • List-declarations: fix --only-ep for non-generated @entry marked (!2947 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#2056] Add basic support for sig items in scopes (!2946 by heitor.toledo)

    Details :

    Resolved some false negative errors in the LSP regarding interfaces and signatures and added some very basic support for them. Support for code navigation will come later.

  • Package management: fixes wrong error message when package is not found (!2939 by prometheansacrifice)

    Details :

    When a package cannot be found on the registry, error message now says "Package cannot be found", instead of the earlier "Unable to access registry..."

  • Suppress opt_cond Michelson optimization for debugging (!2935 by tomjack)

    Details :

    Disable opt_cond Michelson optimization when debugging.

  • Fixes link-dev version parsing (!2931 by shubham-kumar)

    Details :

    Fixes #2077 by adding an additional check on the input string when parsing the nodes in the lockfile. This check of input string looks for the default node which is why the install part is breaking. In future the default node would be removed. So this is a fix to manage the temporary pattern of lockfile which was adopted to carry the same pattern of lockfile as esy.

  • Replace protocol list with Oxford (!2921 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1741] Add project root support (!2830 by XJIE6)

    Details :

    ligo lsp now looks for ligo.json to determine the project root. If not present, the language server will request the user to create one when opening a new file.

1.0.0

Run this release with Docker: docker run ligolang/ligo:1.0.0

Breaking :

  • stdlib: Cleanup of Test module (!2893 by lesenechal.remi)

    Details :

    standard library: Refactoring of the Test module

  • Replace _esy directory with _ligo directory in package management alpha (!2883 by shubham-kumar)

    Details :

    Replace _esy/ligo/installation.json to _ligo/ligo/installation.json

  • Remove PascaLIGO (except parser) from compiler and tools (!2880 by Sorokin-Anton)

    Details :

    Remove the --deprecated flag that allowed users to work with PascaLIGO contracts. To compile a PascaLIGO contract you can use LIGO 0.73.0 with the --deprecated flag or an older LIGO version.

  • Upgrade syntax for JsLIGO decorators (!2873 by rinderkn)

    Details :

    Decorators in JsLIGO now follow the official format @foo and @foo("bar").

  • Deprecate uncurried entrypoints and views (!2818 by alistair.obrien)

    Details :

    Deprecate uncurried entrypoints and views

  • Internal: make import in JsLIGO exported (!2815 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Deprecate CLI entry declaration (!2814 by lesenechal.remi)

    Details :

    Deprecation: entry-points can no longer be declared through the CLI. One must one the entry annotation in the source

  • New design for code generation and contract typing/kinding (!2810 by lesenechal.remi)

    Details :

    Deprecate main contracts. Single entry-point contract will now require a [@entry]/@entry annotation

  • [Deprecation] View declaration through CLI (!2805 by lesenechal.remi)

    Details :

    Deprecation: views can no longer be declared through the CLI. One must one the view annotation in the source

  • File import: make export mandatory to export values/types/namespaces when importing modules from other files (!2796 by er433)

    Details :

    When importing a file with #import, every definition was imported, even those not marked with export explicitly in JsLIGO, e.g. in previous versions we had:

    $ ligo compile expression jsligo y --init-file modules_export_importer.jsligo
    42
    $ cat modules_export_imported.jsligo
    type t = int;
    const x : t = 42;
    $ cat modules_export_importer.jsligo
    #import "modules_export_imported.jsligo" "M"
    const y : M.t = M.x;

    After this change, export is needed in JsLIGO to effectively export a declaration:

    $ ligo compile expression jsligo y --init-file modules_export_importer.jsligo
    File "modules_export_importer.jsligo", line 3, characters 10-13:
    2 |
    3 | const y : M.t = M.x;
    Type "t" not found.

    The same applies for CameLIGO: after this change, declarations marked with @private are not exported.

  • Jsligo: adopt TypeScript behavior on _ variable [PLEASE DO NOT MERGE BEFORE 1.0] (!2674 by lesenechal.remi)

    Details :

    Breaking change: if multiple _ variable are bound in the same scope, it will result in an error (duplicate block-scoped variable) just as in TypeScript

  • [JsLIGO] Refactoring of the CST and grammar (!2661 by rinderkn)

    Details :

    New pattern matching in JsLIGO

    It follows a variant of tc39 proposal pattern matching.

    E.g.

    match (action) {
    when(Add(n)): n;
    when(Sub(n)): -n;
    }
  • Draft: Default to @layout:comb everywhere (!1816 by tomjack)

    Details :

    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.

Added :

  • deprecate --package-management-alpha flag (!2909 by shubham-kumar)

    Details :

    Package management backend no longer uses esy by default. Using esy is now opt-in and requires --legacy-package-management option

  • JsLIGO: added _ as a parameter in function types. (!2891 by rinderkn)

    Details :

    We allow _ as a parameter name in JsLIGO's function types.

  • [JsLIGO] Allow _ as an expression (!2890 by rinderkn)

    Details :

    Underscore is now accepted everywhere a variable is accepted.

  • CLI: Forgot password command (!2875 by prometheansacrifice)

    Details :

    Adds a CLI command for ligo registry users to reset their password.

    ligo registry forgot-password

    For security reasons, existing users would need a valid session token already since we dont have their emails. The CLI would ask them for their email to send the password reset link. If they don't have a valid session token, they'll have to reach out to support.

    New users dont need this, since we start asking their emails when they create an account with us.

  • Code injection: new code injection for directly using CREATE_CONTRACT + of_file (!2860 by er433)

    Details :

    A new code injection is available for calling CREATE_CONTRACT of a .tz file.

    In CameLIGO, [%create_contract_of_file "file.tz"] will be expanded to a function of type key_hash option -> tez -> 's -> operation * address. It can be used as follows:

    [@entry]
    let main (u : unit) (_ : unit) : operation list * unit =
    let op, _addr = [%create_contract_of_file "./interpreter_tests/contract_under_test/compiled.tz"] None 1tez u in
    [op], ()

    In JsLIGO, (create_contract_of_file file.tz) will be expanded to a function of type <s>(k: option<key_hash>, t: tez, s:storage) => [operation, address]. It can be used as follows:

    @entry
    const main = (u : unit, _ : unit) : [list<operation>, unit] => {
    let [op, _addr] = (create_contract_of_file `./interpreter_tests/contract_under_test/compiled.tz`)(None(), 1tez, u);
    return [list([op]), []]
    }

    Notice that the parameter passed for storage must have a type that compiles to the type expected as storage of the contract in the .tz file. In case of a mismatch, a type error will be present when typing the resulting Michelson contract. In the examples above, the contract's storage type is unit, and the argument passed as storage to the function (u) has that type.

  • Some minor improvements on the refactoring of JsLIGO (!2853 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Prompt user for email in case they lose their password (!2840 by prometheansacrifice)

    Details :

    add-user now prompts for email so that users can reset their passwords.

  • Draft: Dynamic entries V3 (!2831 by lesenechal.remi)

    Details :

    Dynamic entrypoints helpers in LIGO

  • [#1994] Display TZIP-16 storage checks in the LSP (!2820 by heitor.toledo)

    Details :

    Warnings related to a contract's storage should now be displayed by the language server for TZIP-16 compliance. These warnings are only visible if there is a top-level definition called storage with an appropriate storage type.

    In addition, more diagnostics will be shown, such as ones for unused variables.

  • Package management: use ligo.json instead of package.json or esy.json (!2817 by prometheansacrifice)

    Details :

    Users can now use a ligo.json file to manage dependencies instead of package.json Existing projects with esy.json or package.json will be prompted to rename their manifests. ligo will automatically generate new lock files under the directory ligo.esy.lock. Users can check this folder into their version controll system for reproducibility.

  • Compilation: add --function-body to expression compilation (!2811 by er433)

    Details :

    Add a new flag --function-body to CLI compile expression command to compile function bodies (useful for compiling views)

  • Remove Esy usage for package management in install.ml with the following... (!2785 by shubham-kumar)

    Details :

    Removing esy from ligo package management - phase 1. This encompasses installing and updating packages from package.json. While trying to maintain compatibility with the current pre-processor (hence _esy and esy.lock still remains the names of the directories for index.json and installation.json) This doesn't include ad-hoc addition of packages to a ligo project using ligo install <pkg-name>

    To use the new package manager use --package-management-alpha flag

Fixed :

  • Make view non-removed even if not exported (!2912 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • CLI: Package management: Adds ligo install package-name (!2904 by prometheansacrifice)

    Details :

    Alpha package management feature parity: Users can now specify package name via CLI

    ligo install package-name --package-management-alpha
  • Signatures: preserve them in ast-typed (!2900 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Compile parameter: alternative handling of single @entry contracts (!2898 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Interfaces: fix extra entries error (!2897 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • ligo dry-run bug fix (!2876 by lesenechal.remi)

    Details :

    Bug fix: ligo dry-run was not working on a single module-contract file

  • [#2024] Fix promoted folding range tests (!2866 by heitor.toledo)

    Details :

    Fixed an issue with folding ranges using an incorrect range for JsLIGO variant types with a leading vertical bar.

  • More tweaks to JsLIGO (!2859 by rinderkn)

    Details :

    [JsLIGO] Documented do { ... } expression (in pattern matching).[JsLIGO] Fixed pretty-printing of constant constructors.[JsLIGO] Fixed spacing after pretty-printing of contract_of.

  • JsLIGO: fix function type ascr. (!2852 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [CameLIGO] Signature annotations in module declarations were not pretty-printed. (!2826 by rinderkn)

    Details :

    Fixed the formatting (a.k.a. pretty-printing) of signatures in module declarations.

0.73.0

Run this release with Docker: docker run ligolang/ligo:0.73.0

Added :

  • Update to 018-Proxford (!2833 by ulrikstrid)

    Details :

    Upgrade LIGO to use the oxford protocol

  • CLI: adds unpublish command to remove a package from registry (!2794 by prometheansacrifice)

    Details :

    Group publish, login and add-user commands under a ligo registry subcommand.Add ligo registry unpublish command to remove a package or a specific version of it from the registry Summary

    [--package-name Name] . of the package on which publish/unpublish is
    executed
    [--package-version Version]
    . of the package on which publish/unpublish is
    executed

    To unpublish a package, run ligo registry unpublish --package-name <name> --package-version <version> from anywhere on the CLI (not necessarily from within a project)

    Examples,

    ligo registry unpublish --package-name foo --package-version 1.0.0

    --package-version is optional, omitting which the entire package is unpublished.

0.72.0

Run this release with Docker: docker run ligolang/ligo:0.72.0

Added :

  • new checking rules on contextual expressions (!2795 by lesenechal.remi)

    Details :

    Improve typechecker inference across contextual expressions (e.g. let .. in, type .. in, module .. in)

Fixed :

  • Internal: add missing case E_let_mut_in for contextual expressions checking (!2809 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [JsLIGO] Fixed pretty-printing of line comments (!2803 by rinderkn)

    Details :

    [JsLIGO] Fixed pretty-printing of line comments within conditionals.

0.71.1

Run this release with Docker: docker run ligolang/ligo:0.71.1

Added :

  • CameLIGO: Add mutability , for loops, and while loops (!2254 by alistair.obrien)

    Details :

    Add mutable variables, the assignment operator, for loops, and while loops to CameLIGO.

    let do_something g n =
    let mut x = 1 in
    for j = 1 to n do
    while x < 10 do
    x := g i j x;
    done
    end;
    x

Fixed :

  • Get back esy from Docker image (!2797 by prometheansacrifice)

    Details :

    Fixes the docker image which was missing esy

  • [Chore] Fix updating the newest version of LIGO (!2790 by heitor.toledo)

    Details :

    Bump version to 0.0.20230804 to follow LIGO's version and make the extension recognize this LIGO version.

  • Mutation: complete E_application decompilation case for multisig (!2789 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

0.71.0

Run this release with Docker: docker run ligolang/ligo:0.71.0

Added :

  • Added --no-layout and --no-regions to ParserMain.exe (!2783 by rinderkn)

    Details :

    I added --no-layout and --no-regions to ParserMain.exe

  • Metadata TZIP-16: add warning on metadata URI/JSON when compiling storage (Michelson) (!2718 by er433)

    Details :

    New checks for metadata TZIP-16 are included.

Fixed :

0.70.1

Run this release with Docker: docker run ligolang/ligo:0.70.1

Fixed :

  • Preserve bound vars in match compiler (using lets) (!2756 by tomjack)

    Details :

    Debugger: preserve bound variables in pattern matching.

  • fix module open in module_open_restriction (!2723 by lesenechal.remi)

    Details :

    Fix a bug where nested namespace module type application were rejected

0.70.0

Run this release with Docker: docker run ligolang/ligo:0.70.0

Added :

  • CLI: add --skip-generated in list-declarations sub-command (!2747 by er433)

    Details :

    A new flag for info list-declarations allows to prevent printing the generated $main entrypoint:

    $ cat b.jsligo
    type storage = int;
    type ret = [list<operation>, storage];
    @entry
    const increment = (delta: int, store: storage): ret => [list([]), store + delta];
    @entry
    const decrement = (delta: int, store: storage): ret => [list([]), store - delta];
    @entry
    const reset = (_: unit, _: storage): ret => [list([]), 0];
    $ ligo info list-declaration --display-format dev --only-ep --skip-generated b.jsligo
    b.jsligo declarations:
    reset
    decrement
    increment
  • New sub-command: compile view for off-chain view compilation (!2737 by er433)

    Details :

    The new sub-command compile view allows to compile views directly. This can be useful for compiling off-chain views to be used in metadata:

    $ cat off_view.mligo
    let main (p : int) (s : int) : operation list * int = [], p + s
    let v (p : string) (s : int) : int = String.length p + s
    $ ligo compile view off_view.mligo v --michelson-format json
    {"parameter":{"prim":"string"},"returnType":{"prim":"int"},"code":[{"prim":"UNPAIR"},{"prim":"SIZE"},{"prim":"ADD"}]}
  • CameLIGO: add modules inclusion directive (!2629 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

Fixed :

  • Fixed pretty-printing of JsLIGO annotations (attributes) when they have no arguments. (!2748 by rinderkn)

    Details :

    Predefined, constant JsLIGO annotations, like @entry, are now formatted outside of a line comment.

  • [Chore] Dialect config bugfix (!2741 by XJIE6)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [JsLIGO] Bug fix: The Attributes self-pass used Make instead of MakeDefault,... (!2733 by rinderkn)

    Details :

    Fixed bug in the lexing of JsLIGO: the CLI was incorrectly read and could lead to a runtime error.

  • [Chore] Menhir version upgrade (!2706 by XJIE6)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • list-declaration also lists entries with attributes (!2635 by lesenechal.remi)

    Details :

    list-declaration command also print entries (declaration with attribute entry) when used with --only-ep

0.69.0

Run this release with Docker: docker run ligolang/ligo:0.69.0

Breaking :

  • [Chore] Remove ligo daemon (!2690 by heitor.toledo)

    Details :

    Removed the ligo daemon command. It was previously used by the old language server to create a persistent LIGO process, but it is hacky and offered no performance improvements, so we delete it.

  • JsLIGO: enforce export keyword (!2684 by er433)

    Details :

    In JsLIGO, the export keyword was not enforced, thus effectively exporting all declarations in namespace.

    With this change, the export becomes mandatory to export from namespaces (and top-level .jsligo when imported from another file).

Added :

  • Implicit casting: booleans (!2704 by er433)

    Details :

    When checking an expression for a boolean, certain values are "casted" implicitly: n : nat is true iff 0 < n``n : int is true iff 0 <> n``n : tez is true iff 0 < n``s : string is true iff "" < s``b : bytes is true iff empty-bytes < b``xs : 'a list is true iff xs = []``xs : 'a set is true iff 0 < Set.cardinal xs``m : ('a, 'b) map is true iff 0 < Map.size m Now values of types such as nat, int, tez, string, bytes, lists, maps and sets can be used in conditions, and are casted automatically to bool:

    const f = (s : list<int>) => {
    let _s = s;
    let k = 0;
    while (_s && k < 3) {
    _s = Option.unopt(List.tail_opt(_s));
    k++;
    };
    return k;
    };
  • [#1698][#1674] Make LSP hovers prettier (!2465 by Sorokin-Anton)

    Details :

    Improve the LSP hovers

Fixed :

  • Fixed transpilation of "True", "False" and "Unit". (!2717 by rinderkn)

    Details :

    Fixed transpilation from PascaLIGO to JsLIGO of predefined data constructors "True", "False" and "Unit" as values (patterns remain unchanged).

  • [JsLIGO][Formatter] Force hardline after each field of a compound structure, so a possible line comment does not absorb the next component (!2714 by rinderkn)

    Details :

    Fixed a bug in pretty-printing JsLIGO record fields followed by line comments.

  • Fixing source positions in bytes (!2711 by rinderkn)

    Details :

    Fixed source position counting for tokens.

  • [Chore] Fix pretty printing of CameLIGO parametric types (!2710 by heitor.toledo)

    Details :

    Code using parametric types in CameLIGO would be formatted invalidly. For example, given this:

    let id (type t) : t -> t = fun x -> x

    After formatting, it would produce invalid code, like so:

    let id(typet) : t -> t = fun x -> x

    This has now been fixed.

  • Resolve "Functional record update is broken for nested records" (!2707 by lesenechal.remi & melwyn95)

    Details :

    The change fixes a bug in record update

    Example

    type level1 = {
    foo : int;
    bar : int;
    buz : int;
    }
    type level2 = {
    l1 : level1;
    fiz : int;
    }
    type level3 = {
    l2 : level2;
    buz : int;
    }
    let update (s , n: level3 * int) : level3 =
    { s with
    buz = n;
    l2.fiz = n;
    l2.l1.foo = n;
    l2.l1.bar = n;
    }
    let test () : level3 =
    let s : level3 = {
    buz = 0;
    l2 = {
    fiz = 0;
    l1 = {
    foo = 0;
    bar = 0;
    buz = 0;
    }
    }
    } in
    let s1 = update (s, 5) in
    let () = assert (s1.buz = 5) in
    let () = assert (s1.l2.fiz = 5) in
    let () = assert (s1.l2.l1.bar = 5) in
    let () = assert (s1.l2.l1.foo = 5) in
    s1

    Before (0.68.0)

    $ ligo.68 run interpret 'test ()' --init-file update.mligo
    failed with: "failed assertion"

    After

    $ ligo run interpret 'test ()' --init-file update.mligo
    record[buz -> 5 ,
    l2 -> record[fiz -> 5 , l1 -> record[bar -> 5 , buz -> 0 , foo -> 5]]]
  • [Chore] Fix bug with wrong to_point to_byte conversion (!2699 by XJIE6)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Chore] Fix document links on Linux (!2698 by Sorokin-Anton)

    Details :

    Fixed a regression where document links were not appearing for Linux.

  • [#1950] Fix completion stack overflow with shadowed module (!2697 by heitor.toledo)

    Details :

    Fix a stack overflow with a module alias shadowing a module during a completion. For example, in this:

    namespace X {
    const x = 1
    };
    import X = X;
    const y = X.

    Trying to complete X. would cause a failure.

  • Fixing transpilation PascaLIGO to JsLIGO (!2693 by rinderkn)

    Details :

    Transpilation from PascaLIGO to JsLIGO was fixed. Pretty-printing of JsLIGO was fixed.

0.68.0

Run this release with Docker: docker run ligolang/ligo:0.68.0

Added :

  • Contract Metadata - Check storage metadata type (!2628 by nicolas.van.phan)

    Details :

    For a contract with TZIP-16 non-compliant metadata, such as the following :

    // metadata with incorrect format
    type storage = {
    data : int,
    metadata : nat, // Should be big_map<string, bytes>
    };
    type param = int;
    type ret = [list<operation>, storage];
    // Dummy entrypoint
    const main = (_p : param, s : storage) : ret =>
    [list([]), s];

    The compiler will now throw a warning on ligo compile contract and ligo compile storage.

    The warning is suppressible using the --no-metadata-check flag.

    Before

    > ligo compile contract 'example.jsligo'
    { parameter int ;
    storage (pair (int %data) (nat %metadata)) ;
    code { CDR ; NIL operation ; PAIR } }

    After

    > ligo compile contract 'example.jsligo' --no-color
    File "example.jsligo", line 4, characters 13-16:
    3 | data : int,
    4 | metadata : nat, // Should be big_map<string, bytes>
    5 | };
    :
    Warning: If the following metadata is meant to be TZIP-16 compliant,
    then it should be a 'big_map' from 'string' to 'bytes'.
    Hint: The corresponding type should be :
    big_map<string, bytes>
    You can disable this warning with the '--no-metadata-check' flag.
    { parameter int ;
    storage (pair (int %data) (nat %metadata)) ;
    code { CDR ; NIL operation ; PAIR } }
    > ligo compile contract --no-metadata-check 'example.jsligo'
    { parameter int ;
    storage (pair (int %data) (nat %metadata)) ;
    code { CDR ; NIL operation ; PAIR } }
  • Support [%of_file] and string code injection in [%michelson] (!2556 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1651] Implement completion (!2527 by heitor.toledo)

    Details :

    Added support for completion in the LIGO Language Server. Supported completions include:

    Variable, module, and type names.Record fields.Module fields.Keywords and operators.

Fixed :

  • regression: cameligo type puning (!2688 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix (nanopass LET_SYNTAX): use location from rhs instead of global one (!2652 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fixed pretty-printing of for-loops (extra semicolon). (!2651 by rinderkn)

    Details :

    Fixed pretty-printing of for-loops in JsLIGO.

  • [Hotfix] Fix regression in the compilation process (!2650 by melwyn95)

    Details :

    Fixed a bug related to compiling functions

  • Draft: [#1920] Prevent diags from other files to be shown (!2646 by heitor.toledo)

    Details :

    Fixed an issue causing diagnostics from other files to be incorrectly shown in the current file.

  • [#1744] Fix document link on Windows (!2640 by Sorokin-Anton)

    Details :

    Fixed LSP "document link" feature on Windows

  • CameLIGO: add support for module access in type application (!2639 by melwyn95)

    Details :

    Type application for parametric types inside modules is fixed in this MR

    Example

    module Foo = struct
    type 'a t = Bar of 'a
    type ('a, 'b) s = 'a t
    end
    type ('a, 'b) baz = ('a, 'b) Foo.s
    let test1 : int Foo.t = Bar 42
    let test2 : (int, string) baz = test1

    Result

    $ ligo run test x.mligo
    Everything at the top-level was executed.
    - test1 exited with value Bar (42).
    - test2 exited with value Bar (42).
  • Fix Testing Framework in the JSOO build (!2470 by prometheansacrifice)

    Details :

    Fixes testing framework in ligo.js

Performance :

  • Perf: Implement a new algorithm for pattern matching compilation to reduce code size (!2655 by melwyn95)

    Details :

    We implement a new algorithm for the pattern-matching compiler which reduces the size of generated code in some cases.

    In some cases we observed upto 80% reduction in generated code.

    Example

    type t = A | B
    type p = (t * t * t * t)
    let main (p : p) (_ : int) : operation list * int =
    [], (match p with
    A,A,A,A -> 1
    | B,B,B,B -> 1
    | _,A,A,A -> 2
    | _,B,B,B -> 2
    | _,_,A,A -> 3
    | _,_,B,B -> 3
    | _,_,_,A -> 4
    | _,_,_,B -> 4)

    Before

    $ ligo.67 info measure-contract x.mligo
    3920 bytes

    After

    $ ligo info measure-contract x.mligo
    468 bytes

0.67.1

Run this release with Docker: docker run ligolang/ligo:0.67.1

0.67.0

Run this release with Docker: docker run ligolang/ligo:0.67.0

Breaking :

  • [JsLIGO] Support for a set of TS decorators (!2619 by rinderkn)

    Details :

    [JsLIGO] TypeScript decorators can now be used in stead of predefined attributes. Documentation to follow in another MR.

Added :

  • JsLIGO: simple interfaces for namespace contracts (!2631 by er433)

    Details :

    There's a new interface keyword for defining interfaces to be used in contracts (as namespaces):

    interface ID {
    type storage;
    type ret = [list<operation>, storage];
    @entry const increment : (k: int, s: storage) => ret;
    @entry const decrement : (k: int, s: storage) => ret;
    @entry const reset : (_u: unit, s: storage) => ret;
    };
    namespace IncDec implements ID {
    type storage = int;
    type ret = [list<operation>, storage];
    @entry
    const increment = (delta : int, store : storage) : ret =>
    [list([]), store + delta];
    @entry
    const decrement = (delta : int, store : storage) : ret =>
    [list([]), store - delta];
    @entry
    const reset = (_ : unit, _ : storage) : ret =>
    [list([]), 0];
    };

    Using implements, when defining a namespace, we can check that the namespace (contract) implements the interface. Type declarations in interfaces can be left without definition (e.g. storage above), and the implementation can choose the concrete instance for the type.

  • Move to Nairobi (!2608 by prometheansacrifice)

    Details :

    Upgrade LIGO to use the Nairobi protocol

  • CameLIGO: simple interfaces support (!2605 by er433)

    Details :

    In CameLIGO we introduce module type for describing simple contracts:

    module type I = sig
    (* `storage` is a type we don't know at this point *)
    type storage
    (* `result` is a type declaration *)
    type result = operation list * storage
    (* we can declare values to be entries *)
    [@entry] val foo : int -> storage -> result
    (* or just values *)
    val initial_storage : storage
    end

    We can attach a signature to a module in a module declaration:

    module C : I = struct
    type storage = int
    type result = operation list * storage
    [@entry] let foo (x : int) (y : storage) : result = [], x + y
    let initial_storage : storage = 42
    end

Fixed :

  • JsLIGO: allow final uppercase in module path for types (!2634 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Printing trailing comments (attached to EOF) (!2623 by rinderkn)

    Details :

    Bug fix: Comments ending a contract are now pretty-printed (formatted by the editor).

  • Fix bug in pattern matching compiler (!2618 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

0.66.0

Run this release with Docker: docker run ligolang/ligo:0.66.0

Breaking :

  • Clean up: remove support for mutate cst (!2607 by er433)

    Details :

    Removed mutate cst sub-command (which was already previously disabled). Please use AST mutation from the testing framework.

Added :

  • Preserving of placement of line comments preceded by a token (CameLIGO and JsLIGO) (!2611 by rinderkn)

    Details :

    Line comments on the same line as a token are printed where they should be.

  • [JsLIGO] Add for( ... ; ... ; ... ) { ... } loop (!2601 by melwyn95)

    Details :

    JsLIGO now supports for loops

    Example

    const getChar = (s: string, idx: nat): string => String.sub(idx, 1 as nat, s)
    const isPalindrome = (s: string): bool => {
    let length = String.length(s);
    let isP = true;
    for (let i = 0, j = length - 1 ; i <= j ; i++, j--) {
    isP = isP && getChar(s, abs(i)) == getChar(s, abs(j))
    }
    return isP;
    }
    const testPalindrome = (() => {
    Test.assert(isPalindrome("abba"));
    Test.assert(isPalindrome("ababa"));
    Test.assert(!isPalindrome("abcd"));
    Test.assert(!isPalindrome("abcde"));
    })();

    Result

    $ ligo run test x.jsligo
    Everything at the top-level was executed.
    - testPalindrome exited with value ().
  • Comment-preserving pretty-printing (!2596 by rinderkn)

    Details :

    Comment-preservation when formatting CameLIGO and JsLIGO.

  • CameLIGO: support for let mut, assignment and iteration (!2591 by er433)

    Details :

    Add mutable variables, the assignment operator, for loops, and while loops to CameLIGO.

    let do_something g n =
    let mut x = 1 in
    for j = 1 upto n do
    while x < 10 do
    x := g i j x;
    done
    end;
    x
  • [JsLIGO]: Add increment & decrement operators (++ & --) (!2587 by melwyn95)

    Details :

    This MR adds to increment & decrement operators (++ && --) to JsLIGO.

    For example

    const testIncDec = (() => {
    let inc = 0;
    // Prefix increment operator
    assert(++inc == 1);
    // Postfix increment operator
    assert(inc++ == 1);
    assert(inc == 2);
    let dec = 10;
    // Prefix decrement operator
    assert(--dec == 9);
    // Postfix decrement operator
    assert(dec-- == 9);
    assert(dec == 8);
    })();

    Result

    $ ligo run test x.jsligo
    Everything at the top-level was executed.
    - testIncDec exited with value ().

Fixed :

  • JsLIGO: allow uppercase type parameters (!2614 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Draft: [JsLIGO] Removal of automatic insertion of vertical bars in type expressions (!2613 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: Rejected return type (!2609 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Preserving comment type (block or line) by pretty-printing. (!2606 by rinderkn)

    Details :

    With the last release of LIGO, the pretty-printers of CameLIGO and JsLIGO transformed all comments into block comments. This is a mistake, as block comments can be nested.

Performance :

  • Internal: replace environment for signature and do separate typing (!2577 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

0.65.0

Run this release with Docker: docker run ligolang/ligo:0.65.0

Added :

  • Add --library CLI option to commands (!2579 by melwyn95)

    Details :

    The --library CLI option is now supported in all relevant LIGO commands

  • Internal: move environment with types to stdlib (!2551 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Fixed :

  • Testing framework: set gas_limit to maximum for all operations (!2568 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [#1741] Set --project-root in files (!2557 by heitor.toledo)

    Details :

    When trying to import packages downloaded from the LIGO registry, the LSP would show that the file was not found. This behavior has been fixed.

    Currently, the project root is set as the directory of the currently opened file. This will be resolved in a later issue.

0.64.3

Run this release with Docker: docker run ligolang/ligo:0.64.3

Added :

  • JsLIGO: list concatenation helper (!2560 by er433)

    Details :

    Introduce a new way of doing list concatenation in JsLIGO:

    const xs = list([1, 2, 3]);
    const ys = list([4, 5]);
    const zs = list([...xs, ...ys]);
  • Mumbai protocol: fix Windows and Macos CI (!2535 by prometheansacrifice)

    Details :

    Fix windows & macos builds. Now LIGO with the tezos protocol Mumbai is available on Windows & MacOS

Fixed :

  • Fix CLI option -e for compile parameter & compile storage (!2570 by melwyn95)

    Details :

    The CLI option -e for passing entrypoint has been fixed ligo compile parameter & ligo compile storage

    Example

    let main (_ : unit) (_ : unit) : operation list * unit = [], ()
    let ep2 (_ : string) (s : int) : operation list * int = [], s

    Before

    $ ligo.64 compile parameter x.mligo '"Hello"' -e ep2
    Invalid command line argument.
    The provided parameter does not have the correct type for the given entrypoint.
    File "x.mligo", line 1, characters 0-63:
    1 | let main (_ : unit) (_ : unit) : operation list * unit = [], ()
    2 |
    Invalid type(s).
    Expected: "unit", but got: "string".
    $ ligo.64 compile storage x.mligo '1' -e ep2
    Invalid command line argument.
    The provided storage does not have the correct type for the contract.
    File "x.mligo", line 1, characters 0-63:
    1 | let main (_ : unit) (_ : unit) : operation list * unit = [], ()
    2 |
    Invalid type(s).
    Expected: "unit", but got: "int".

    After

    $ ligo compile parameter x.mligo '"Hello"' -e ep2
    "Hello"
    $ _build/install/default/bin/ligo compile storage x.mligo '1' -e ep2
    1
  • [#1755] Fix Polymorphism errors look strange in LSP (!2559 by melwyn95)

    Details :

    Fixes the difference in error messages between CLI & LSP dianostics. Now the type error messages will be consistent across CLI & LSP.

Performance :

0.64.2

Run this release with Docker: docker run ligolang/ligo:0.64.2

Breaking :

  • Rework transpilation syntax CLI options (!2501 by nicolas.van.phan)

    Details :

    Before

    > ligo transpile contract input.ligo
    Error parsing command line:
    missing anonymous argument: SYNTAX
    For usage information, run
    ligo transpile contract -help
    > ligo transpile contract --from-syntax pascaligo input.ligo --to-syntax jsligo
    Error parsing command line:
    unknown flag --from-syntax
    For usage information, run
    ligo transpile contract -help
    ligo transpile contract input.ligo -o output.jsligo
    Error parsing command line:
    missing anonymous argument: SYNTAX
    For usage information, run
    ligo transpile contract -help

    After

    > ligo transpile contract input.ligo
    Transpilation target syntax is not specified.
    Please provide it using the --to-syntax option
    or by specifying an output file with the -o option
    > ligo transpile contract --from-syntax pascaligo input.ligo --to-syntax jsligo
    # 1 "input.ligo"
    # 1 "input.ligo"
    type storage = int;
    type parameter = | ["Increment", int] | ["Decrement", int] | ["Reset"];
    ...
    const main =
    (action: parameter, store: storage): @return =>
    [list([]) as list<operation>, match(action, { Increment: n => add(store, n), Decrement: n => sub(store, n), Reset: () => 0})];
    > ligo transpile contract input.ligo -o output.jsligo
  • Deprecate katmandu (!2500 by lesenechal.remi)

    Details :

    deprecation of protocol Kathmandu

  • Entrypoints parameter_of: new keyword for obtaining contract's (from module) parameter (!2476 by er433)

    Details :

    A new keyword is introduced: parameter_of. It can be used to obtain the type of a contract (from a module/namespace):

    namespace C {
    type storage = int;
    // @entry
    const increment = (action: int, store: storage) : [list <operation>, storage] => [list([]), store + action];
    // @entry
    const decrement = (action: int, store: storage) : [list <operation>, storage] => [list([]), store - action];
    };
    const test_increment = (() => {
    let initial_storage = 42;
    let [taddr, _, _] = Test.originate_module(contract_of(C), initial_storage, 0 as tez);
    let contr : contract<parameter_of C> = Test.to_contract(taddr);
    let p : parameter_of C = Increment(1);
    let _ = Test.transfer_to_contract_exn(contr, p, 1 as mutez);
    return assert(Test.get_storage(taddr) == initial_storage + 1);
    }) ();

    As in the case of contract_of, now parameter_of becomes reserved. To still use parameter_of as an identifier, @ can be prepended.

Added :

  • Underline red snippet output in no-color mode (!2547 by nicolas.van.phan)

    Details :

    For the following piece of code, with a string that has nothing to do here :

    let main {| I should be underlined in
    error message with no-color and
    I am a long message spreading
    on 4 lines |} blah-blah

    Before

    > ligo compile contract --no-color contract.mligo
    File "contract.mligo", line 2, character 9 to line 5, character 15:
    1 |
    2 | let main {| I should be underlined in
    3 | error message with no-color and
    4 | I am a long message spreading
    5 | on 4 lines |} blah-blah
    Ill-formed value declaration.
    At this point, one of the following is expected:
    * parameters as irrefutable patterns, e.g. variables, if defining a
    function;
    * the assignment symbol '=' followed by an expression;
    * a type annotation starting with a colon ':';
    * a comma ',' followed by another tuple component, if defining a
    tuple.

    After

    > ligo compile contract --no-color contract.mligo
    File "contract.mligo", line 2, character 9 to line 5, character 15:
    1 |
    2 | let main {| I should be underlined in
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 | error message with no-color and
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 | I am a long message spreading
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    5 | on 4 lines |} blah-blah
    ^^^^^^^^^^^^^^^
    Ill-formed value declaration.
    At this point, one of the following is expected:
    * parameters as irrefutable patterns, e.g. variables, if defining a
    function;
    * the assignment symbol '=' followed by an expression;
    * a type annotation starting with a colon ':';
    * a comma ',' followed by another tuple component, if defining a
    tuple.
  • Add Proxy_ticket to std_lib (!2528 by melwyn95)

    Details :

    The new Proxy_ticket module available in the LIGO std_lib provides a way to test contrast with tickets

    For example

    If we want to originate a contract with ticket values as its initial storage, we can do

    type storage = (bytes ticket) option
    type unforged_storage = (bytes unforged_ticket) option
    let main (() : unit) (s : storage) : operation list * storage =
    [] , (
    match s with
    | Some ticket ->
    let (_ , t) = Tezos.read_ticket ticket in
    Some t
    | None -> None
    )
    let test_originate_contract =
    let mk_storage = fun (t : bytes ticket) -> Some t in
    let ticket_info = (0x0202, 15n) in
    let addr = Test.Proxy_ticket.originate ticket_info mk_storage main in
    let storage : michelson_program = Test.get_storage_of_address addr in
    let unforged_storage = (Test.decompile storage : unforged_storage) in
    (* the ticket 'unforged_storage' can be manipulated freely without caring about ticket linearity *)
    match unforged_storage with
    | Some { ticketer=_ ; value ; amount } ->
    let () = Test.log ("unforged_ticket", unforged_storage) in
    let () = assert (value = ticket_info.0) in
    let () = assert (amount = ticket_info.1) in
    ()
    | None -> failwith "impossible"

    Result

    $ ligo run test x.mligo
    ("unforged_ticket" , Some ({amount = 15n ; ticketer = KT1GAXjgbyNsXRj4trR23YRzQdLQV3uA2oXG ; value = 0x0202}))
    Everything at the top-level was executed.
    - test_originate_contract exited with value ().
  • Testing framework: add support for mutation of modules (!2526 by er433)

    Details :

    New primitives for doing mutation testing on module/namespace contracts in Test:

    let originate_module_and_mutate : (contract: module_contract<'p, 's>, init: 's, balance: tez, (tester: (originated_address: typed_address<'p, 's>, code: michelson_contract, size: int) => 'b)) => option<['b, mutation]>
    let originate_module_and_mutate_all : (contract: module_contract<'p, 's>, init: 's, balance: tez, (tester: (originated_address: typed_address<'p, 's>, code: michelson_contract, size: int) => 'b)) => list<['b, mutation]>

    Example in JsLIGO

    #import "./contract_under_test/module_adder.mligo" "Adder"
    const _tester = (a : typed_address<parameter_of Adder, int>, _ : michelson_contract, _ : int) : unit => {
    let c : contract<parameter_of Adder> = Test.to_contract(a);
    /* Test 1 */
    let _ = Test.transfer_to_contract_exn(c, Add(0), (0 as tez));
    Test.assert(Test.get_storage(a) == 0);
    /* Test 2 */
    let _ = Test.transfer_to_contract_exn(c, Add(1), (0 as tez));
    Test.assert(Test.get_storage(a) == 1);
    };
    const test = (() : unit => {
    let l = Test.originate_module_and_mutate_all(contract_of(Adder), 0, (0 as tez), _tester);
    Test.log(l);
    })();

    Example in CameLIGO

    #import "./contract_under_test/module_adder.mligo" "Adder"
    let _tester (a : (Adder parameter_of, int) typed_address) (_ : michelson_contract) (_ : int) : unit =
    let c : (Adder parameter_of) contract = Test.to_contract a in
    (* Test 1 *)
    let _ = Test.transfer_to_contract_exn c (Add 0) 0tez in
    let () = assert (Test.get_storage a = 0) in
    ()
    let test =
    Test.originate_module_and_mutate_all (contract_of Adder) 0 0tez _tester
  • Ligo analytics collection (!2506 by Laucans)

    Details :

    Why

    Deprecation of Pascaligo has been done following the result of a google form.

    After deprecation, community disagree. Looks like the community who answer to form is not representative to the one who use the compiler. We want to have a better understanding of our users for the future.

    For this we will bring analytics into ligo which gonna be passive collection of feedback from our user.

    Agreement

    Interactive

    Because privacy is important for us, datas are anonymized. If you don't want to collect data you can deny. Still possible to change your mind by using ligo analytics accept or ligo analytics deny Agreement answer will be stored in ~/.ligo/term_acceptance.

    Docker, non-interactive

    In docker analytics is activated by default. It's possible to use the environment variable LIGO_SKIP_ANALYTICS or the flag --skip-analytics describe below

    Using the CLI

    A new flag --skip-analytics has been introduced on every command to skip analytics collection once.

    Through environment variable

    If the environment variable LIGO_SKIP_ANALYTICS is set, it'll skip analytics

    How datas are anonymized

    To identify your project, unique ID is generated and stored in .ligo/repository_id. Commit and push this file will help us to understand our users.

    To identify you as user, a file is generated in ~/.ligo/user_id. If you are using ligo in docker. user_id will not be generated and replaced by docker in our data.

    If you denied analytics, these file still generated

    CI

    If ligo is used through scripts or CI analytics will not be collected.

    If your CI use docker, Use the new image ligo_ci to avoid metrics to be collected.

    Analytics example

    Example of data collected : When user use compile command. We collect the id of the user, the id of the project, the version of ligo used, the syntax and protocol used and also the size of the project which has been compiled. When user use ligo init. We collect the id of the user, the id of the project, the version of ligo used, the syntax and protocol used and also the template used to generate project

  • Upgrade to protocol Mumbai (!2505 by melwyn95)

    Details :

    Upgrade LIGO to use the Mumbai protocol

    Additions

    Add support for bitwise operators on bytesAdd support for byest-nat & bytes-int conversionThe protocol supports working with txr1 & scr1 addresses

    Deprecation

    The type tx_rollup_l2_address has been disabled in the Mumbai protocol

    Example

    [@entry] let main (_ : unit) (_ : bytes) : operation list * bytes =
    let b = bytes 123n in
    [], b land 0xffff
    let test =
    let (taddr, _, _) = Test.originate main 0xffff 0tez in
    let contr = Test.to_contract taddr in
    let _ = Test.transfer_to_contract_exn contr () 1mutez in
    assert (Test.get_storage taddr = 0xffff land bytes 123n)

    Compilation

    $ ligo compile contract x.mligo
    { parameter unit ;
    storage bytes ;
    code { DROP ;
    PUSH nat 123 ;
    BYTES ;
    PUSH bytes 0xffff ;
    AND ;
    NIL operation ;
    PAIR } }

    Tests

    $ ligo run test x.mligo
    Everything at the top-level was executed.
    - test exited with value ().
  • [#1658] Support configuration: part 2 (!2503 by heitor.toledo)

    Details :

    The LIGO Language Server now supports a few new changes and fixes related to configuration, notably:

    It's now possible to disable specific features from the Visual Studio Code extension. Check the README for more details.Fixed an exception that would be thrown when using the language server with Emacs related to decoding null from the configuration.The language server now respects Deprecated from the Visual Studio Code configuration and emits a warning when opening a PascaLIGO file if that is not set.Configuration changes may now be done dynamically. Previously, a language server restart would be required for changes to take effect.

  • [#1655] LSP: Implement range formatting for toplevel statements (!2502 by Sorokin-Anton)

    Details :

    Added range formatting to LSP. It can be used to format all toplevel declarations in a given range.

  • Transpilation from PascaLIGO to JsLIGO (!2497 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Enable attributes after keyword "export" for declarations (!2489 by rinderkn)

    Details :

    Attributes are now allowed after the keyword "export" on declarations.

  • Disable declaration-shadowing warning on transpiled JsLIGO contracts (!2460 by nicolas.van.phan)

    Details :

    For a JsLIGO contracts with re-declared variables, like the following, with x re-declared :

    const x = 42;
    const x = 33;
    const main = ([_action, store] : [int, int]) : [list <operation>, int] => {
    return [
    (list([]) as list <operation>), // No operations
    store
    ]
    };

    Compilation will throw the following error :

    > ligo compile contract 'transpile_warn_shadowing.jsligo'
    File "transpile_warn_shadowing.jsligo", line 2, characters 10-12:
    11 | const x = 42;
    12 | const x = 33;
    13 |
    Cannot redeclare block-scoped variable.

    Compilation using the --transpiled flag will disable the warning.

    Before

    > ligo compile contract 'transpile_warn_shadowing.jsligo' --transpiled
    Error parsing command line:
    unknown flag --transpiled
    For usage information, run
    ligo compile contract -help

    After

    > ligo compile contract 'transpile_warn_shadowing.jsligo' --transpiled
    { parameter int ; storage int ; code { CDR ; NIL operation ; PAIR } }
  • Emit E_inline_michelson directly from %michelson (!2238 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Fixed :

  • [#1701] Fix searching of references in other files (!2548 by heitor.toledo)

    Details :

    Fixed a bug where references would not be found sometimes in included/imported files. For example, suppose we have two contracts:

    included.mligo:

    let x = 1

    includer/includer.mligo:

    #include "../included.mligo"
    let y = x

    Then opening includer/includer.mligo and looking for references of x would only find it in this file unless included.mligo has been opened previously. It will now find it in both.

    Note that this fix does not allow "back-includes" yet; looking for x in included.mligo will find it in includer/includer.mligo if and only if that file has been previously opened as well.

  • Resolve "Typo in warning message" (!2544 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Draft: [#1694] Disallow looking for defs from stdlib in rename/definition/type (!2543 by heitor.toledo)

    Details :

    The LSP previously allowed the users to try to see the definition of things defined in the stdlib. However, the stdlib is not available on the user's computer, so there is nothing to show.

    To make things worse, the user could try to rename stdlib definitions and the LSP would try (but only rename local usages, not the definition).

    For now, these operations are disallowed.

  • Bug: mixing export with attributes (!2540 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Bugfix: jsligo match (!2530 by lesenechal.remi)

    Details :

    Fix a bug in jsligo matching

  • Testing framework: internal management of views (!2524 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • unification: don't emit sub blocks in test clauses (!2523 by lesenechal.remi)

    Details :

    fix a bug where controlflow within if clauses was rejected

  • Testing framework: add support for untranspilation of bls12_381_g1/g2/fr (!2516 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Inline true, false, and unit (!2514 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix debugger environment edge case (!2509 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: add proper error message for Tezos.call_view with non-literal string as name (!2508 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix some debugger issues with source_type propagation (!2507 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: improve support for view uncurried functions (!2499 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • CLI: enable dry-run to use @entry (!2496 by er433)

    Details :

    Additional fix: dry-run sub-command has been fixed to work with @entry in top-level.

  • Add support for attributes before namespace in jsligo parser (!2487 by melwyn95)

    Details :

    For a jsligo file

    // @foo
    export namespace D {
    export type titi = int;
    };
    // @foo
    namespace E {
    export type titi = int;
    export const toto = 42
    };
    /* @no_mutation */ export
    const toto: D.titi = E.toto;

    Before

    $ ligo.62 print cst y.jsligo
    File "y.jsligo", line 2, characters 7-16:
    1 | // @foo
    2 | export namespace D {
    3 | export type titi = int;
    Ill-formed export declaration.
    At this point, a value or type declaration is expected.

    After

    $ ligo print cst y.jsligo
    <ast>
    ├ Directive (y.jsligo:1:0-14)
    ├ PP_Linemarker (1, "y.jsligo", None)
    ├ SExport (y.jsligo:2:0-4:1)
    ├ SNamespace (y.jsligo:2:7-4:1)
    <namespace> (y.jsligo:2:7-16)
    <attributes>
    |<attribute>
    | └ private
    ...
  • [#1715] Various improvements to the JsLIGO pretty printer (!2483 by heitor.toledo)

    Details :

    Improve the JsLIGO pretty-printer to have a more sensible output. For example suppose a code like this:

    namespace C {
    export type bar = int;
    export type foo = [bar, bar];
    };

    Previously, the user might see something like this:

    namespace C{export type bar = int;
    export type foo =
    [bar,
    bar]};

    Now, it will be much more sensible (like the original code).

  • Resolve "Ligo 0.59.0+ breaks MR 2048 (Make [@annot:] mean no annotation)." (!2475 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

Performance :

  • Performance: changes in build paths and typer's application (!2512 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Nanopasses (!2425 by lesenechal.remi)

    Details :

    frontend: syntax unification and nanopasses (replacing old abstraction)

0.63.2

Run this release with Docker: docker run ligolang/ligo:0.63.2

0.63.0

Run this release with Docker: docker run ligolang/ligo:0.63.0

Breaking :

Added :

  • Stdlib: filter_map function for Set (!2463 by er433)

    Details :

    New function in module Set: val filter_map : ('a -> b option) -> 'a set -> 'b set.

  • Add CLi option for PascaLIGO to JsLIGO syntax-level transpilation (!2453 by nicolas.van.phan)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Stdlib: list updating functions (!2451 by er433)

    Details :

    New functions in stdlib's List module: val filter_map : ('a -> 'b option) -> 'a list -> 'b list``val update : ('a -> 'a option) -> 'a list -> 'a list``val update_with : ('a -> 'a option) -> 'a -> 'a list -> 'a list

  • Transpilation: add ad-hoc typers for map/big_map operations (!2431 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Fixed :

  • [#1718][JsLIGO]: Fix automatic semicolon insertion for if-else statements (!2472 by melwyn95)

    Details :

    For a JsLIGO file like

    export const foo = (b: bool) => {
    if (b)
    return 42
    else
    return 21
    }

    Before

    $ ligo.62 compile expression jsligo foo --init-file y.jsligo
    File "y.jsligo", line 2, characters 9-8:
    1 | export const foo = (b: bool) => {
    2 | if (b)
    3 | return 42
    Ill-formed conditional statement.
    At this point, the statement executed when the condition is true is
    expected.

    After

    $ ligo compile expression jsligo foo --init-file y.jsligo
    { IF { PUSH int 42 } { PUSH int 21 } }
  • Errors: improve comparable error by showing the context type (!2454 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: better error managing when entrypoint is not annotated (!2452 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fixed a transpilation error (!2440 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

0.62.0

Run this release with Docker: docker run ligolang/ligo:0.62.0

Breaking :

  • Attribute for entries (!2379 by er433)

    Details :

    New attribute @entry allows to define entries for a module/namespace, or from the top-level of a file.

    For example, the file contract.jsligo

    type storage = int;
    // @entry
    const increment = (action: int, store: storage) : [list <operation>, storage] => [list([]), store + action];
    // @entry
    const decrement = (action: int, store: storage) : [list <operation>, storage] => [list([]), store - action];
    // @entry
    const reset = (_u: unit, _store: storage) : [list<operation>, storage] => [list([]), 0];

    can be compiled directly:

    $ ligo compile contract contract.jsligo
    { parameter (or (or (int %decrement) (int %increment)) (unit %reset)) ;
    storage int ;
    code { UNPAIR ;
    IF_LEFT { IF_LEFT { SWAP ; SUB } { ADD } } { DROP 2 ; PUSH int 0 } ;
    NIL operation ;
    PAIR } }

    Moreover, when using the testing framework, a contract_of keyword can be used to originate a module as a contract with the help of the new function Test.originate_module:

    $ cat src/test/contracts/interpreter_tests/test_originate_module.jsligo
    namespace C {
    type storage = int;
    // @entry
    const increment = (action: int, store: storage) : [list <operation>, storage] => [list([]), store + action];
    // @entry
    const decrement = (action: int, store: storage) : [list <operation>, storage] => [list([]), store - action];
    };
    const test_increment = (() => {
    let initial_storage = 42;
    let [taddr, _, _] = Test.originate_module(contract_of(C), initial_storage, 0 as tez);
    let contr = Test.to_contract(taddr);
    let _ = Test.transfer_to_contract_exn(contr, (Increment (1)), 1 as mutez);
    return assert(Test.get_storage(taddr) == initial_storage + 1);
    }) ();
    $ ligo run test src/test/contracts/interpreter_tests/test_originate_module.jsligo
    Everything at the top-level was executed.
    - test_increment exited with value ().

    Breaking changes

    Notice that this feature is breaking as contract_of becomes a keyword, rending invalid contracts that use this name as a variable. In this case, the fix is simple, and just amounts to change the name of the variable, or use @contract_of:

    $ cat contract.jsligo
    // @entry
    const increment = (action: int, store: int) : [list <operation>, int] => [list([]), store + action];
    const contract_of = 42;
    $ ligo compile contract contract.jsligo
    File "contract.jsligo", line 4, characters 6-17:
    3 |
    4 | const contract_of = 42;
    Ill-formed value declaration.
    At this point, a pattern is expected, e.g. a variable.

    After modifying contract.jsligo with @contract_of:

    $ cat contract.jsligo
    // @entry
    const increment = (action: int, store: int) : [list <operation>, int] => [list([]), store + action];
    const @contract_of = 42;
    $ ligo compile contract contract.jsligo
    { parameter int ;
    storage int ;
    code { UNPAIR ; ADD ; NIL operation ; PAIR } }

    This MR also modifies the parameters for the sub-command evaluate-call (-e is not used anymore to signal the function to compile).

Added :

  • Ligo is distributed through AUR for Arch linux (!2410 by Laucans)

    Details :

    You can now install ligo through AUR

    git clone https://aur.archlinux.org/ligo-bin.git
    cd ligo-bin
    makepkg -si

    or

    yay -S ligo-bin
  • [#1658] Support getting configuration from VSCode (!2406 by heitor.toledo)

    Details :

    Add support for decoding "maximum number of problems" and "verbosity" from the VS Code configuration.

  • [#1655] Fix and enable LSP formatting (!2404 by Sorokin-Anton)

    Details :

    Added support for document formatting request to ligo lsp.

  • CLI: new -m parameter for module selection (!2386 by er433)

    Details :

    A new argument is available when compiling a contract: -m, which allows to select a module path where the entrypoint (and views) is located.

    Example file increment.jsligo

    type storage = int;
    type parameter =
    ["Increment", int]
    | ["Decrement", int]
    | ["Reset"];
    type ret = [list<operation>, storage];
    const add = (store : storage, delta : int) : storage => store + delta;
    const sub = (store : storage, delta : int) : storage => store - delta;
    namespace C {
    const main = (action : parameter, store : storage) : ret => {
    return [list([]) as list<operation>,
    match (action, {
    Increment:(n: int) => add (store, n),
    Decrement:(n: int) => sub (store, n),
    Reset :() => 0})]
    };
    }

    Compilation using -m

    $ ligo compile contract increment.jsligo -m C
    { parameter (or (or (int %decrement) (int %increment)) (unit %reset)) ;
    storage int ;
    code { UNPAIR ;
    IF_LEFT { IF_LEFT { SWAP ; SUB } { ADD } } { DROP 2 ; PUSH int 0 } ;
    NIL operation ;
    PAIR } }

Fixed :

  • Fix bugs in ligo publish (!2423 by melwyn95)

    Details :

    For a LIGO package with name @ligo/fa

    Before

    $ ligo.61 publish --dry-run
    ==> Reading manifest... Done
    ==> Validating manifest file... Done
    ==> Finding project root... Done
    ==> Packing tarball... An internal error ocurred. Please, contact the developers.
    (Sys_error "/tmp/@ligo/fa675f7d1.0.1: No such file or directory").

    After

    $ ligo publish --dry-run
    ==> Reading manifest... Done
    ==> Validating manifest file... Done
    ==> Finding project root... Done
    ==> Packing tarball... Done
    publishing: @ligo/fa@1.0.1
    === Tarball Details ===
    name: @ligo/fa
    version: 1.0.1
    filename: @ligo/fa-1.0.1.tgz
    package size: 36.4 kB
    unpacked size: 249.5 kB
    shasum: a1755ccfecb90d06440aef9d0808ec1499fc22f4
    integrity: sha512-c986ef7bc12cd[...]9b6f8c626f8fba7
    total files: 49
  • Use js_of_ocaml's --enable=effects flag to fix stackoverflows (!2417 by prometheansacrifice)

    Details :

    Fixes stackoverflows during Lexing in the browser

  • Adds a js_of_ocaml setup with Dune and a PoC IDE to demo the bundle (!2381 by prometheansacrifice)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Make linearity checking apply inside modules (!2314 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Internal :

0.61.0

Run this release with Docker: docker run ligolang/ligo:0.61.0

Breaking :

  • [JsLIGO] Update syntax for generic functions (!2315 by melwyn95)

    Details :

    In JsLIGO, the syntax for defining generic functions was misleading.

    This MR fixes this issue by adding the syntatic contruct to bind type variables in function expressions.

    Before

    const concat : <T>(xs : list<T>, ys : list<T>) => list<T> = (xs : list<T>, ys : list<T>) : list<T> => {
    let f = ([x, ys] : [T, list<T>]) : list<T> => list([x, ...ys]);
    return List.fold_right(f, xs, ys)
    }

    Before the type variables were bound in the LHS type annotation in the type expression.

    After

    const concat = <T>(xs : list<T>, ys : list<T>) : list<T> => {
    let f = ([x, ys] : [T, list<T>]) : list<T> => list([x, ...ys]);
    return List.fold_right(f, xs, ys)
    }

    After this change type variables can be bound in function expression like above.

  • Deprecation of PascaLIGO (!2271 by rinderkn)

    Details :

    Deprecation of PascaLIGO.

  • JsLIGO: abstractor generate curried definitions (!2241 by er433)

    Details :

    Previously, multiparameter functions in JsLIGO were compiled to a function taking a tuple of parameters.

    After this MR, multiparameter functions in JsLIGO are compiled to curried functions.

    Contracts do still require taking a tuple (parameter, storage) (as in Michelson). However, LIGO will transform curried contracts to its uncurried form when using compile contract. The same is true for views, taking still tuples (argument, storage), but curried views will be uncurried automatically as well.

    New functions are introduced at top-level:

    val curry : ('a -> 'b -> 'c) -> ('a * 'b -> 'c)``val uncurry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c For testing, Test.originate will take an curried contract of the form parameter -> storage -> operation list * storage. The old (uncurried) alternative is still available as Test.originate_uncurried.

Added :

  • [Chore] Add a changelog documenting the initial write of the LSP (!2393 by heitor.toledo)

    Details :

    Add a new subcommand (ligo lsp) whose purpose is to allow LSP clients (Visual Studio Code, Emacs, Vim, etc) to communicate with the new LIGO Language Server, which is being rewritten in OCaml. This command is not meant to be launched manually by users, but rather by editors. The rewrite was officially made in !2303.

    The initial release supports diagnostics (errors only), go to definition, hover, rename (only in open files), references (only in open files), and type definition.

    As the rewrite is new, it does not yet support feature parity with the old language server, and bugs are to be expected.

    Other LSP features (hover, folding range, document link, warnings for diagnostics, prepare rename) have since been implemented in other merge requests.

    Official support for the Vim, Emacs, and Visual Studio Code plugins will come soon, as well as the VS Code plugin release on the Marketplace and OpenVSX.

  • [#1648] Implement folding range for the LSP (!2371 by heitor.toledo)

    Details :

    Folding ranges allow the language server client to collapse or expand regions of code. Although some clients like Visual Studio Code can try to automatically deduce ranges based on regions, others like Emacs or Vim might not, so we implement the folding range requests from LSP in ligo lsp.

  • [#1653] Implement document link request, add get_cst function (!2358 by Sorokin-Anton)

    Details :

    Added support for document link request to ligo lsp

  • Extend JsLIGO nested update syntax (!2331 by nicolas.van.phan)

    Details :

    For a contract with nested record update using the new syntaxes, like below.

    type storage = int;
    type parameter = int;
    const main = (_action: parameter, store: storage) : [ list<operation> , storage ] => {
    let r = { x : { y : [ 1 , 2 , { z : "World" , z1 : 7 } , 3] } };
    r["x"].y[2]["z"] = "Hello";
    return [list([]), store]
    };

    Before

    > ligo compile contract 'test.jsligo'
    File "test.jsligo", line 6, characters 2-28:
    5 | let r = { x : { y : [ 1 , 2 , { z : "World" , z1 : 7 } , 3] } };
    6 | r["x"].y[2]["z"] = "Hello";
    7 | return [list([]), store]
    Not supported assignment.

    After

    > ligo compile contract 'test.jsligo'
    { parameter int ; storage int ; code { CDR ; NIL operation ; PAIR } }
  • [#1645]Hover upgrade (!2326 by XJIE6)

    Details :

    Improves behavior of LSP requests in case of modules. Adds syntax highlighting to hover request. Adds support for hover over modules

  • [#1652] Implement prepare rename request (!2317 by heitor.toledo)

    Details :

    Implements the prepare rename request from the LSP specification. It checks the validity of a rename so that users won't get a prompt for renaming lexemes such as a keyword (like let) or a built-in identifier (like int).

  • Draft: Enable shorter JsLIGO syntax for nested record updates (!2309 by nicolas.van.phan)

    Details :

    For a contract with the new syntax for record update

    type storage = int;
    type parameter = int;
    type user = {
    id : int,
    name : string
    };
    const user1 : user = {
    id : 24,
    name : "User1",
    };
    const main = (_action: parameter, store: storage) : [ list<operation> , storage ] => {
    let p = user1;
    p.id = 42; // Record field update
    return [list([]), store]
    };

    Before

    > ligo compile contract 'contract.jsligo'
    File "contract.jsligo", line 17, characters 2-11:
    16 | let p = user1;
    17 | p.id = 42; // Record field update
    18 | return [
    Not supported assignment.

    After

    > ligo compile contract 'contract.jsligo'
    { parameter int ; storage int ; code { CDR ; NIL operation ; PAIR } }
  • Stdlib: add is_none, is_some, value and value_exn in module Option (!2300 by er433)

    Details :

    New functions available in module Option: val is_none : 'a option -> bool: returns a boolean signaling if the value is None.val is_some : 'a option -> bool: returns a boolean signaling if the value is a Some.val value : 'a -> 'a option -> 'a: returns the value if the second argument is wrapped in the Some constructor, or returns the first argument if it is None.val value_exn : 'e -> 'a option -> 'a: returns the value if the second argument is wrapped in the Some constructor, or fails with the first value if it is None.

    Example

    type foobar = option <int>;
    const s : foobar = Some (42);
    const n : foobar = None ();
    const f = (m : foobar) : int => {
    if (Option.is_none(m)) {
    return Option.value(1, m);
    } else {
    if (Option.is_some(m)) {
    return Option.value_exn("won't happen", m);
    } else {
    return -1;
    }
    }
    }
    const j = f(s);
    const k = f(n);

    j evaluates to 42, while k evaluates to 1.

  • Small syntactic fixes to JsLIGO grammar to get closer to TS (!2272 by rinderkn)

    Details :

    Semicolons can now be used in describing objects (records), as well as commas. Discriminated unions can now have a leading vertical bar.

    For a contract like

    type planetType =
    | { kind: "Tellurian" }
    | { kind: "Gaseous" }
    | { kind: "Other" };
    type planet = {
    name: string;
    planetType: planetType;
    lord: option<address>;
    };
    const main = (p: planet, _: int): [list<operation>, int] => {
    let state = 0;
    let planetType = p.planetType;
    switch(planetType.kind) {
    case "Tellurian":
    state += 1;
    break
    case "Gaseous":
    state -= 2;
    break
    case "Other":
    state = 0;
    break
    }
    return [list([]), state]
    }

    Before

    $ ligo.59 compile contract y.jsligo
    File "y.jsligo", line 2, characters 4-5:
    1 | type planetType =
    2 | | { kind: "Tellurian" }
    3 | | { kind: "Gaseous" }
    Ill-formed variant of a sum type.
    At this point, one of the following is expected:
    * attributes for the variant;
    * an opening bracket '[' followed by a data constructor as a string.

    After

    $ ligo compile contract y.jsligo
    { parameter
    (pair (pair (option %lord address) (string %name))
    (or %planetType (or (unit %gaseous) (unit %other)) (unit %tellurian))) ;
    storage int ;
    code { CAR ;
    PUSH int 0 ;
    SWAP ;
    CDR ;
    IF_LEFT
    { IF_LEFT { DROP ; PUSH int 2 ; SWAP ; SUB } { DROP 2 ; PUSH int 0 } }
    { DROP ; PUSH int 1 ; ADD } ;
    NIL operation ;
    PAIR } }
  • Support for compiling non-tail recursive functions (!2232 by er433)

    Details :

    Now non-tail-recursive functions can be compiled. E.g.

    $ cat lambdarec.mligo
    let rec fib (n : int) : int =
    if n <= 1 then
    1
    else
    fib (n - 1) + fib (n - 2)
    let rec cat (type a) (xs : a list) (ys : a list) : a list =
    match xs with
    | [] -> ys
    | (x :: xs) -> x :: (cat xs ys)
    $ ligo compile expression cameligo "cat [fib 1; fib 2; fib 3] [fib 4; fib 5; fib 6; fib 7]" --init-file lambdarec.mligo
    { 1 ; 2 ; 3 ; 5 ; 8 ; 13 ; 21 }

Fixed :

  • [#1683] Handle Is a directory error (!2377 by XJIE6)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix condition for disabling colors in CLI output (!2361 by nicolas.van.phan)

    Details :

    Using flag --no-color in CI can be ignored if variable TERM is not set. Here a fix to make --no-color flag valid even if TERM is not defined.

  • Fix: unused variables pass not taking into account E_mod_in (!2342 by melwyn95)

    Details :

    For a contract like

    let fst (x, _) = x
    let snd (_, x) = x
    let main (_ : unit * nat ticket) : operation list * nat ticket =
    let n = 10n in
    module B = struct
    let ticket = Option.unopt (Tezos.create_ticket n n)
    let y = ticket, ticket
    end in
    [], Option.unopt (Tezos.join_tickets (fst B.y, snd B.y))

    Before

    ligo.60 compile contract y.mligo
    File "y.mligo", line 6, characters 6-7:
    5 | let main (_ : unit * nat ticket) : operation list * nat ticket =
    6 | let n = 10n in
    7 | module B = struct
    :
    Warning: unused variable "n".
    Hint: replace it by "_n" to prevent this warning.
    Error(s) occurred while type checking the contract:
    Ill typed contract:
    ...

    After

    $ _build/install/default/bin/ligo compile contract y.mligo
    File "y.mligo", line 8, characters 8-14:
    7 | module B = struct
    8 | let ticket = Option.unopt (Tezos.create_ticket n n)
    9 | let y = ticket, ticket
    :
    Warning: variable "ticket" cannot be used more than once.
    File "y.mligo", line 9, characters 4-26:
    8 | let ticket = Option.unopt (Tezos.create_ticket n n)
    9 | let y = ticket, ticket
    10 | end in
    :
    Warning: variable "B.y" cannot be used more than once.
    Error(s) occurred while type checking the contract:
    Ill typed contract:
    ...
  • Refactor Layout and Row to use rose trees (!2341 by lesenechal.remi)

    Details :

    Fix problem regarding unification of layout in record/sum types.

  • [CameLIGO] Fix type variable binding in expressions (!2330 by melwyn95)

    Details :

    For a cameligo file like

    let foo (type a) : a list -> a list =
    let id = fun (type b) (xs : b list) : b list -> xs in
    fun (xs : a list) : a list -> id xs
    let main (_ : unit * int list) : operation list * int list =
    [], foo [1 ; 2 ; 3]

    Before

    $ ligo.60 compile contract x.mligo
    File "x.mligo", line 2, characters 31-32:
    1 | let foo (type a) : a list -> a list =
    2 | let id = fun (type b) (xs : b list) : b list -> xs in
    3 | fun (xs : a list) : a list -> id xs
    Type "b" not found.

    After

    $ ligo compile contract x.mligo
    { parameter unit ;
    storage (list int) ;
    code { DROP ;
    NIL int ;
    PUSH int 3 ;
    CONS ;
    PUSH int 2 ;
    CONS ;
    PUSH int 1 ;
    CONS ;
    NIL operation ;
    PAIR } }
  • [#1666] Extract warnings from scopes (!2329 by heitor.toledo)

    Details :

    For the LIGO LSP, only errors were being displayed and warnings were skipped. Users will now be able to see warnings as well as errors.

  • Fix: JsLigo attributes not propagated in the pipeline (!2304 by melwyn95)

    Details :

    For a contract like

    type action_t =
    // @layout:comb
    | ["A"]
    | ["B", int]
    | ["C", [int, int]];
    type storage_t =
    // @layout comb
    {
    x: int,
    y: int,
    z: int
    };
    type return_t = [list<operation>, storage_t];
    const main = (action: action_t, _: storage_t): return_t =>
    [
    list([]),
    match(action, {
    A: () => ({ x: 10, y: 10, z: 10 }),
    B: (_) => ({ x: 20, y: 20, z: 20 }),
    C: (_) => ({ x: 20, y: 20, z: 20 })
    })
    ];

    Before

    $ ligo.60 compile contract y.jsligo
    { parameter (or (or (unit %a) (int %b)) (pair %c int int)) ;
    storage (pair (pair (int %x) (int %y)) (int %z)) ;
    code { CAR ;
    IF_LEFT
    { IF_LEFT
    { DROP ; PUSH int 10 ; PUSH int 10 ; PUSH int 10 }
    { DROP ; PUSH int 20 ; PUSH int 20 ; PUSH int 20 } }
    { DROP ; PUSH int 20 ; PUSH int 20 ; PUSH int 20 } ;
    PAIR ;
    PAIR ;
    NIL operation ;
    PAIR } }

    After

    $ ligo compile contract y.jsligo
    { parameter (or (unit %a) (or (int %b) (pair %c int int))) ;
    storage (pair (int %x) (int %y) (int %z)) ;
    code { CAR ;
    IF_LEFT
    { DROP ; PUSH int 10 ; PUSH int 10 ; PUSH int 10 }
    { IF_LEFT
    { DROP ; PUSH int 20 ; PUSH int 20 ; PUSH int 20 }
    { DROP ; PUSH int 20 ; PUSH int 20 ; PUSH int 20 } } ;
    PAIR 3 ;
    NIL operation ;
    PAIR } }
  • JsLIGO: add support for module access in type application (!2299 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • fixing ligo info list-declarations (!2297 by lesenechal.remi)

    Details :

    Fixing ligo info list-declarations for JsLIGO entrypoints

  • CameLIGO: use params field when abstracting local types (!2289 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: make run test --display-format json output the same JSON as Test.to_json (!2287 by er433)

    Details :

    The output given by run test --display-format json is an array containing the name of the test entrypoint, followed by its value as a JSON (same format as Test.to_json, see API reference for further documentation on it). E.g.

    $ cat display_format_json.mligo
    let test_x =
    let x = 42 in
    x + 23
    let test_y =
    "hello"
    $ ligo run test display_format_json.mligo --display-format json
    [
    [ "test_x", [ "constant", [ "int", "65" ] ] ],
    [ "test_y", [ "constant", [ "string", "hello" ] ] ]
    ]
  • Fix: Missing definitions from imported modules in get-scope (!2253 by melwyn95)

    Details :

    For ligo files with #imported modues

    #import "y.mligo" "X"
    let z = X.x.a

    Before

    $ ligo.59 info get-scope x_test.mligo --format dev --with-types
    Scopes:
    [ X#0 ] File "x_test.mligo", line 3, characters 8-13
    Variable definitions:
    (z#1 -> z)
    Range: File "x_test.mligo", line 3, characters 4-5
    Body Range: File "x_test.mligo", line 3, characters 8-13
    Content: |unresolved|
    references: []
    Type definitions:
    Module definitions:
    (X#0 -> X)
    Range: File "x_test.mligo", line 1, characters 7-8
    Body Range: File "x_test.mligo", line 1, characters 11-36
    Content: Alias: Mangled_module_y____mligo
    references: File "x_test.mligo", line 3, characters 8-9

    After

    $ ligo info get-scope x_test.mligo --format dev --no-stdlib --with-types
    Scopes:
    [ X#4 Mangled_module_y____mligo#3 x#2 y#1 x#0 ] File "x_test.mligo", line 3, characters 8-13
    [ x#0 ] File "y.mligo", line 3, characters 8-9
    [ y#1 x#0 ] File "y.mligo", line 4, characters 14-15
    [ y#1 x#0 ] File "y.mligo", line 4, characters 22-24
    Variable definitions:
    (z#5 -> z)
    Range: File "x_test.mligo", line 3, characters 4-5
    Body Range: File "x_test.mligo", line 3, characters 8-13
    Content: |resolved: int|
    references: []
    Type definitions:
    Module definitions:
    (Mangled_module_y____mligo#3 -> Mangled_module_y____mligo)
    Range:
    Body Range:
    Content: Members: Variable definitions:
    (x#2 -> x)
    Range: File "y.mligo", line 4, characters 4-5
    Body Range: File "y.mligo", line 4, characters 8-25
    Content: |resolved: x|
    references: File "x_test.mligo", line 3, characters 8-13
    (y#1 -> y)
    Range: File "y.mligo", line 3, characters 4-5
    Body Range: File "y.mligo", line 3, characters 8-9
    Content: |resolved: int|
    references: File "y.mligo", line 4, characters 14-15
    Type definitions:
    (x#0 -> x)
    Range: File "y.mligo", line 1, characters 5-6
    Body Range: File "y.mligo", line 1, characters 9-33
    Content: : |record[a -> int , b -> string]|
    references: []
    Module definitions:
    references: File "x_test.mligo", line 1, characters 11-36
    (X#4 -> X)
    Range: File "x_test.mligo", line 1, characters 7-8
    Body Range: File "x_test.mligo", line 1, characters 11-36
    Content: Alias: Mangled_module_y____mligo#3
    references: File "x_test.mligo", line 3, characters 8-9

0.60.0

Run this release with Docker: docker run ligolang/ligo:0.60.0

Breaking :

  • Remove remainder of ReasonLIGO (except debugger) (!2244 by SanderSpies)

    Details :

    Remove remainder of ReasonLIGO from compiler, editor tooling, website, fuzzer, LSP, etc. But not the debugger.

  • improve Jsligo proper return handling (!2229 by SanderSpies)

    Details :

    Improve the return handling in JsLIGO

Added :

  • CameLIGO: Add mutability , for loops, and while loops (!2254 by alistair.obrien)

    Details :

    Add mutable variables, the assignment operator, for loops, and while loops to CameLIGO.

    let do_something g n =
    let mut x = 1 in
    for j = 1 to n do
    while x < 10 do
    x := g i j x;
    done
    end;
    x
  • Relax view restrictions under arrow types (!2252 by tomjack)

    Details :

    Allow forbidden types in views when they occur under lambda/arrow types.

  • add publication to AUR into release process (!2251 by Laucans)

    Details :

    Ligo can be installed on archlinux through the Arch linux User repository. The artifact name is ligo-bin (https://aur.archlinux.org/packages/ligo-bin)

  • ligo init templates & libraries from LIGO registry (!2249 by melwyn95)

    Details :

    New Feature

    $ ligo init library --template @ligo/bigarray
    Folder created: @ligo_bigarray
    $ tree .
    .
    └── @ligo_bigarray
    ├── LICENSE
    ├── Makefile
    ├── README.md
    ├── examples
    │ ├── main.mligo
    │ └── package.json
    ├── lib
    │ └── bigarray.mligo
    ├── package.json
    └── test
    └── bigarray.test.mligo
    4 directories, 8 files

    Before

    $ ligo.59 init contract --template nft-factory-cameligo
    Error: Unrecognized template
    Hint: Use the option --template "TEMPLATE_NAME"
    Please select a template from the following list:
    - NFT-factory-cameligo
    - NFT-factory-jsligo
    - advisor-cameligo
    ...

    After

    $ ligo init contract --template nft-factory-cameligo
    Cloning into 'nft-factory-cameligo'...
    remote: Enumerating objects: 166, done.
    remote: Counting objects: 100% (17/17), done.
    remote: Compressing objects: 100% (15/15), done.
    remote: Total 166 (delta 2), reused 7 (delta 2), pack-reused 149
    Receiving objects: 100% (166/166), 216.51 KiB | 6.98 MiB/s, done.
    Resolving deltas: 100% (63/63), done.
    Folder created: nft-factory-cameligo
  • Error checking for closure capturing big maps/operation/contract (!2231 by er433)

    Details :

    Before fix

    $ ligo compile expression cameligo "fun (x : operation) -> fun (y : int) -> x"
    Error(s) occurred while checking the contract:
    At (unshown) location 16, operation type forbidden in parameter, storage and constants

    After fix

    $ ligo compile expression cameligo "fun (x : operation) -> fun (y : int) -> x"
    Invalid capturing, term captures the type operation.
    Hint: Uncurry or use tuples instead of high-order functions.
  • Implement String.concats and Bytes.concats in stdlib (!2228 by er433)

    Details :

    New functions have been implemented for concatenating lists of strings and bytes: String.concats : string list -> string``Bytes.concats : bytes list -> bytes

Fixed :

  • Resolve "Wrong references in ligo info get-scope" (!2261 by melwyn95)

    Details :

    For a ligo program like

    let x = 42
    let f x = 0
    let g = x

    Before

    $ ligo.59 info get-scope x.mligo --format dev --with-types
    Scopes:
    [ ] File "x.mligo", line 1, characters 8-10
    [ x#1 ] File "x.mligo", line 2, characters 10-11
    [ f#2 x#0 ] File "x.mligo", line 3, characters 8-9
    Variable definitions:
    (f#2 -> f)
    Range: File "x.mligo", line 2, characters 4-5
    Body Range: File "x.mligo", line 2, characters 6-7
    Content: |resolved: ∀ gen#563 : * . gen#563 -> int|
    references: []
    (g#3 -> g)
    Range: File "x.mligo", line 3, characters 4-5
    Body Range: File "x.mligo", line 3, characters 8-9
    Content: |resolved: int|
    references: []
    (x#0 -> x)
    Range: File "x.mligo", line 1, characters 4-5
    Body Range: File "x.mligo", line 1, characters 8-10
    Content: |resolved: int|
    references: [] <---- The reference of top-level binding is not updated
    (x#1 -> x)
    Range: File "x.mligo", line 2, characters 6-7
    Body Range: File "x.mligo", line 2, characters 10-11
    Content: |resolved: gen#563|
    references: File "x.mligo", line 3, characters 8-9 <---- The reference of local binding is updated :(
    Type definitions:
    Module definitions:

    After

    $ ligo info get-scope x.mligo --with-types --format dev
    Scopes:
    [ ] File "x.mligo", line 1, characters 8-10
    [ x#1 ] File "x.mligo", line 2, characters 10-11
    [ f#2 x#0 ] File "x.mligo", line 3, characters 8-9
    Variable definitions:
    (f#2 -> f)
    Range: File "x.mligo", line 2, characters 4-5
    Body Range: File "x.mligo", line 2, characters 6-7
    Content: |resolved: ∀ gen#563 : * . gen#563 -> int|
    references: []
    (g#3 -> g)
    Range: File "x.mligo", line 3, characters 4-5
    Body Range: File "x.mligo", line 3, characters 8-9
    Content: |resolved: int|
    references: []
    (x#0 -> x)
    Range: File "x.mligo", line 1, characters 4-5
    Body Range: File "x.mligo", line 1, characters 8-10
    Content: |resolved: int|
    references: File "x.mligo", line 3, characters 8-9 <---- The reference of level binding is updated correctly
    (x#1 -> x)
    Range: File "x.mligo", line 2, characters 6-7
    Body Range: File "x.mligo", line 2, characters 10-11
    Content: |resolved: gen#563|
    references: []
    Type definitions:
    Module definitions:
  • 🐛 Fix: Layout Unification (!2259 by alistair.obrien)

    Details :

    🐛 fix: layout unification.

  • Add missing cases/fix wrong cases in tail recursiveness check (!2256 by er433)

    Details :

    Example file

    $ cat error_no_tail_recursive_function2.mligo
    let rec foo (xs : int list) : int =
    let rec loop (xs : int list) : int =
    loop (foo xs :: xs)
    in
    loop xs

    Before fix

    $ ligo compile expression cameligo foo --init-file error_no_tail_recursive_function2.mligo
    An internal error ocurred. Please, contact the developers.
    Corner case: foo not found in env.

    After fix

    $ ligo compile expression cameligo foo --init-file error_no_tail_recursive_function2.mligo
    File "error_no_tail_recursive_function2.mligo", line 3, characters 10-13:
    2 | let rec loop (xs : int list) : int =
    3 | loop (foo xs :: xs)
    4 | in
    Recursive call not in tail position.
    The value of a recursive call must be immediately returned by the defined function.
  • Improve error message when compiling functions which capture meta-LIGO types (!2220 by er433)

    Details :

    Example file

    $ cat test_capture_meta_type.mligo
    type t = { x : int ; y : (unit, unit) typed_address }
    let main ((_, _) : unit * unit) : operation list * unit = [], ()
    let ta, _, _ =
    Test.originate main () 0tez
    let v = { x = 42 ; y = ta }
    let w = v.x
    let f = fun (_ : unit) -> v.x
    let g = fun (_ : unit) -> f ()
    let test = Test.eval g

    Before fix

    $ ligo run test test_capture_meta_type.mligo
    File "test_capture_meta_type.mligo", line 16, characters 11-22:
    15 |
    16 | let test = Test.eval g
    Cannot decompile value KT1KAUcMCQs7Q4mxLzoUZVH9yCCLETERrDtj of type typed_address (unit ,
    unit)

    After fix

    $ ligo run test test_capture_meta_type.mligo
    File "test_capture_meta_type.mligo", line 12, characters 26-27:
    11 |
    12 | let f = fun (_ : unit) -> v.x
    13 |
    Invalid usage of a Test type: typed_address (unit ,
    unit) in record[x -> int , y -> typed_address (unit , unit)] cannot be translated to Michelson.

0.59.0

Run this release with Docker: docker run ligolang/ligo:0.59.0

Breaking :

  • Remove ReasonLIGO tests and remove ReasonLIGO from CLI. (!2234 by SanderSpies)

    Details :

    Remove ReasonLIGO tests and remove ReasonLIGO from CLI.

  • Remove ReasonLIGO documentation. (!2225 by SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

Added :

0.58.0

Run this release with Docker: docker run ligolang/ligo:0.58.0

Breaking :

Added :

  • [Package Management] Resolve main file when only the package name is provided in #import/#include (!2224 by melwyn95)

    Details :

    For a file like

    #import "@ligo/bigarray" "BA"
    let test = BA.concat [1 ; 2 ; 3] [4 ; 5 ; 6]

    Before change

    $ ligo.55 run test main.mligo
    File "main.mligo", line 1, characters 0-29:
    1 | #import "@ligo/bigarray" "BA"
    2 |
    File "@ligo/bigarray" not found.

    After change

    $ ligo run test main.mligo
    Everything at the top-level was executed.
    - test exited with value [1 ; 2 ; 3 ; 4 ; 5 ; 6].
  • [PyLIGO] Standalone preprocessor, lexer and parser (!2210 by rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Build ligo on Macos(intel), Linux and Windows and bundle into NPM tarball (!2200 by prometheansacrifice)

    Details :

    Users can now install LIGO via NPM. npm i -g ligolang will install the Ligo compiler on Windows, Linux and MacOS (intel). https://www.npmjs.com/package/ligolang Also adds a GUI installer for Windows. Can be downloaded from here

  • CLI: add a run test-expr to run expressions in test framework without need of a file (!2195 by er433)

    Details :

    New sub-command can evaluate expressions directly in the testing framework:

    $ ligo run test-expr cameligo "Test.log 42"
    42
    Everything at the top-level was executed.
    - eval exited with value ().
  • Miscellaneous improvements for ligo-debugger-vscode (!2114 by tomjack)

    Details :

    Miscellaneous improvements for ligo-debugger-vscode

Fixed :

  • Testing framework: issue with long tuples in matching (!2227 by er433)

    Details :

    Example file

    $ cat tuple_long.mligo
    type big_tuple = int * int * int * int * int * int * int * int * int * int * int * int
    let br : big_tuple = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
    let f (x : big_tuple) =
    match x with
    | (x0, _x1, _x2, _x3, _x4, _x5, _x61, _x7, _x8, _x9, _x45, _x111) -> x0
    let test = Test.assert (f br = 0)

    Before fix

    $ ligo run test tuple_long.mligo
    File "tuple_long.mligo", line 9, characters 24-28:
    8 |
    9 | let test = Test.assert (f br = 0)
    No pattern matched

    After fix

    $ ligo run test tuple_long.mligo
    Everything at the top-level was executed.
    - test exited with value ().
  • 🐛 Fix: Type Variable Shadowing Error (!2221 by alistair.obrien)

    Details :

    Fixed type variable shadowing issues.

  • Fix unresolved types in get-scope (!2219 by melwyn95)

    Details :

    For a file like

    type user = {
    is_admin : bool,
    };
    const alice : user = {
    is_admin : true,
    };
    const alice_admin : bool = alice.i

    Before fix

    $ ligo.57 info get-scope y.jsligo --format dev --with-types
    ...
    Variable definitions:
    (alice#1 -> alice)
    ...
    Content: |unresolved|
    ...
    (alice_admin#2 -> alice_admin)
    ...
    Content: |unresolved|
    ...
    ...

    After fix

    $ ligo info get-scope y.jsligo --format dev --with-types
    ...
    Variable definitions:
    (alice#1 -> alice)
    ...
    Content: |core: user|
    ...
    (alice_admin#2 -> alice_admin)
    ...
    Content: |core: bool|
    ...
    ...
  • Add --project-root for missing commands (!2212 by melwyn95)

    Details :

    Before:

    $ ligo info list-declarations src/test/projects/include_include/main.mligo
    File "src/test/projects/include_include/main.mligo", line 1, characters 0-41:
    1 | #import "include-include/index.mligo" "M"
    2 | #include "include-include/index.mligo"
    File "include-include/index.mligo" not found.

    After

    $ ligo info list-declarations src/test/projects/include_include/main.mligo --project-root src/test/projects/include_include/
    src/test/projects/include_include/main.mligo declarations:
    main
    hello
  • JsLIGO: improve semicolon handling for #1511 (!2209 by SanderSpies)

    Details :

    Improve semicolon insertion after rbrace '}'.

  • Resolve "Internal error: ligo compile storage" (!2205 by er433)

    Details :

    Example file

    $ cat annotated_storage_and_parameter.mligo
    type storage = (int, int) map
    type parameter = int list
    let main ((_p, s) : parameter * storage) : operation list * storage =
    ([], s)

    Before fix

    $ ligo compile storage annotated_storage_and_parameter.mligo "Map.empty"
    File "src/passes/14-spilling/compiler.ml", line 180, characters 36-43
    corner case: For all type uncaught
    Sorry, we don't have a proper error message for this error. Please report this use case so we can improve on this.

    After fix

    $ ligo compile storage annotated_storage_and_parameter.mligo "Map.empty"
    {}
  • Improve monomorphisation error message (!2204 by er433)

    Details :

    Example file

    $ cat annotate_arrow.mligo
    let f (_:unit) (_:nat option) = None

    After fix

    $ ligo compile expression cameligo "f" --init-file annotate_arrow.mligo
    File "annotate_arrow.mligo", line 1, characters 0-36:
    1 | let f (_:unit) (_:nat option) = None
    Cannot monomorphise the expression.
    The inferred type was "unit -> ∀ a . option (nat) -> option (a)".
    Hint: Try adding additional annotations.
  • Fix missing semicolon before comments in jsligo (!2158 by melwyn95)

    Details :

    Improves the semi-colon insertion for jsligo

    Example file

    const test1 = 1
    /* Hello */
    // There
    /* Hello */
    // Again
    const test2 = 2

    Before Fix

    $ ligo.57 run test y.jsligo
    File "y.jsligo", line 6, characters 0-5:
    5 | // Again
    6 | const test2 = 2
    Ill-formed top-level statement.
    At this point, if the statement is complete, one of the following is
    expected:
    * a semicolon ';' followed by another statement;
    * a semicolon ';' followed by the end of file;
    * the end of the file.

    After Fix

    $ ligo run test y.jsligo
    Everything at the top-level was executed.
    - test1 exited with value 1.
    - test2 exited with value 2.

0.57.0

Run this release with Docker: docker run ligolang/ligo:0.57.0

Added :

  • Deliver beta for native Windows installation (!2198 by prometheansacrifice)

    Details :

    The documentation to install ligo on windows is available here : https://ligolang.org/docs/next/intro/installation?lang=jsligo.

    You can install it through NPM or through windows installer.

  • [Package Management] Improvements to ligo publish (!2080 by melwyn95)

    Details :

    Adds Support --dry-run flag to ligo publishBetter CLI report for ligo publishAdd validation before publishing packagesAdd support for .ligoignore file & Improve support for .ligorc file change in CLI report:

    $ ligo publish --ligorc-path ./.ligorc
    ==> Reading manifest... Done
    ==> Validating manifest file... Done
    ==> Finding project root... Done
    ==> Packing tarball... Done
    publishing: ligo-list-helpers@1.0.0
    === Tarball Details ===
    name: ligo-list-helpers
    version: 1.0.0
    filename: ligo-list-helpers-1.0.0.tgz
    package size: 895 B
    unpacked size: 1.1 kB
    shasum: 37737db2f58b572f560bd2c45b38e6d01277395d
    integrity: sha512-a904c5af793e6[...]fc0efee74cfbb26
    total files: 6
    ==> Checking auth token... Done
    ==> Uploading package... Done
    Package successfully published

Fixed :

  • Fix scopes for local types (!2197 by melwyn95)

    Details :
    function local_type (var u : unit) : int is {
    type toto is int;
    function foo (const b : toto) : toto is b
    } with titi

    In the above example the local type toto was missing in the scopes for body of foo and titi

  • Update the templates list for ligo init & Imporve the error message (!2194 by melwyn95)

    Details :

    New templates via ligo init & Improved error messages for invalid template

    Before:

    $ ligo init contract
    Template unrecognized please select one of the following list :
    NFT-factory-cameligo
    NFT-factory-jsligo
    advisor-cameligo
    dao-cameligo
    dao-jsligo
    multisig-cameligo
    multisig-jsligo
    permit-cameligo
    randomness-cameligo
    randomness-jsligo
    shifumi-cameligo
    shifumi-jsligo

    After:

    $ ligo init contract
    Error: Unrecognized template
    Hint: Use the option --template "TEMPLATE_NAME"
    Please select a template from the following list:
    - NFT-factory-cameligo
    - NFT-factory-jsligo
    - advisor-cameligo
    - advisor-jsligo
    - dao-cameligo
    - dao-jsligo
    - multisig-cameligo
    - multisig-jsligo
    - permit-cameligo
    - permit-jsligo
    - predictive-market-cameligo
    - predictive-market-jsligo
    - randomness-cameligo
    - randomness-jsligo
    - shifumi-cameligo
    - shifumi-jsligo
  • Fix ligo login when user is logged in and tries to login again with a different user (!2193 by melwyn95)

    Details :

    Before:

    $ ligo.55 login
    Username: user1
    Password: ************
    you are authenticated as 'user1'
    $ ligo.55 login
    Username: user2
    Password: ***************
    {
    "error": "username is already registered"
    }

    After:

    $ ligo login
    Username: user1
    Password: ************
    you are authenticated as 'user1'
    $ ligo login
    Username: user2
    Password: ***************
    you are authenticated as 'user2'
  • Fix compilation for negative integers (!2192 by melwyn95)

    Details :

    Improves the Michelson compilation for negative integers, removes the unnecessary NEG instruction in the case of negative integers

    Before:

    $ ligo.55 compile expression cameligo ' -100' --without-run
    { PUSH int 100 ; NEG }

    After

    $ ligo compile expression cameligo ' -100' --without-run
    { PUSH int -100 }
  • Internal: remove cons_types from ppx (!2191 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Location Improvements (!2190 by alistair.obrien)

    Details :

    Location tracking improvements within the compiler

  • Testing framework: fix sorting on decompilation/compilation of maps/sets (!2188 by er433)

    Details :

    Example file

    $ cat test_compare_setmap.mligo
    let test_address_set =
    let s : address set = Set.empty in
    let s = Set.add ("tz1KeYsjjSCLEELMuiq1oXzVZmuJrZ15W4mv" : address) s in
    let s = Set.add ("tz1TDZG4vFoA2xutZMYauUnS4HVucnAGQSpZ" : address) s in
    let s : address set = Test.decompile (Test.eval s) in
    Test.eval s

    Before

    $ ligo run test test_compare_setmap.mligo
    Error(s) occurred while parsing the Michelson input:
    At (unshown) location 0, value
    { "tz1TDZG4vFoA2xutZMYauUnS4HVucnAGQSpZ" ;
    "tz1KeYsjjSCLEELMuiq1oXzVZmuJrZ15W4mv" } is invalid for type set address.
    Values in a set literal must be in strictly ascending order, but they were unordered in literal:
    { "tz1TDZG4vFoA2xutZMYauUnS4HVucnAGQSpZ" ;
    "tz1KeYsjjSCLEELMuiq1oXzVZmuJrZ15W4mv" }

    After

    $ ligo run test test_compare_setmap.mligo
    Everything at the top-level was executed.
    - test_address_set exited with value { "tz1KeYsjjSCLEELMuiq1oXzVZmuJrZ15W4mv" ;
    "tz1TDZG4vFoA2xutZMYauUnS4HVucnAGQSpZ" }.
  • Fix: Top-level recursive functions for cameligo (!2186 by melwyn95)

    Details :

    Fixes top-level recursive functions of the form let rec x = fun y -> ...

  • Fix: check allowed chars in entrypoints (!2182 by er433)

    Details :

    Example file

    $ cat emit_bad_tag.mligo
    let main (_,_ : unit * string ) : operation list * string =
    [Tezos.emit "%hello world" 12], "bye"

    Before

    $ ligo compile contract emit_bad_tag.mligo
    An internal error ocurred. Please, contact the developers.
    Michelson_v1_printer.unparse.

    After

    $ ligo compile contract emit_bad_tag.mligo
    File "emit_bad_tag.mligo", line 2, characters 3-31:
    1 | let main (_,_ : unit * string ) : operation list * string =
    2 | [Tezos.emit "%hello world" 12], "bye"
    Invalid entrypoint "%hello world". One of the following patterns is expected:
    * "%bar" is expected for entrypoint "Bar"
    * "%default" when no entrypoint is used.
    Valid characters in annotation: ('a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '%' | '@' | '0' .. '9').
  • Resolve "Internal error: tried to substitute for mutated var" (!2180 by er433)

    Details :

    Example file

    $ cat test_imm.ligo
    type storage is int;
    type return is list (operation) * storage
    function reset (var s : storage) : storage is {
    s := 0;
    } with (s);
    function main (const _action : unit; const s : storage) : return is
    ((nil : list (operation)), reset(s));
    const test_orig = {
    const (_typed_address, _, _) = Test.originate(main, 42, 0tez);
    } with (Unit)

    Before

    $ ligo run test test_imm.ligo
    An internal error ocurred. Please, contact the developers.
    internal error, please report this as a bug: tried to substitute for mutated var File "src/passes/15-self_mini_c/subst.ml", line 317, characters 105-112.

    After

    $ ligo run test test_imm.ligo
    Everything at the top-level was executed.
    - test_orig exited with value ().
  • testing framework: fixing decompile_value (!2173 by lesenechal.remi)

    Details :

    Fix a bug where functional value couldn't be decompiled in the testing framework

  • Testing framework: make Run use decompile_value (typed) (!2166 by er433)

    Details :

    Example file

    $ cat test_record.ligo
    type internal_storage is [@layout:comb] record [
    value : int;
    ]
    type storage is record [
    internal_storage : internal_storage;
    ]
    const initial_storage: storage = record [
    internal_storage = record [
    value = 0;
    ];
    ];
    const test_reproducing = {
    Test.log(Test.eval(initial_storage));
    } with ("OK")

    Before

    $ ligo run test test_record.ligo
    Error(s) occurred while parsing the Michelson input:
    At (unshown) location 0, value (Pair 0) is invalid for type int.
    At (unshown) location 0, unexpected primitive, only an int can be used here.

    After

    $ ligo run test test_record.ligo
    0
    Everything at the top-level was executed.
    - test_reproducing exited with value "OK".
  • Add support for patterns in top-level declarations (!2038 by lesenechal.remi & melwyn95)

    Details :

    Fix a bug where top-level let destructuring were causing code to be executed multiple time, as in:

    let (a,a) =
    let () = Test.log "hello" in
    (1,2)

    Fix a bug where type parameters were not found (https://gitlab.com/ligolang/ligo/-/issues/1482)proxy_tickets code has been changed (see https://ligolang.org/docs/advanced/testing/#transfers-and-originations-with-tickets)

0.56.0

Run this release with Docker: docker run ligolang/ligo:0.56.0

Added :

  • Goodbye gen 👋 (!2153 by alistair.obrien)

    Details :

    Improve pretty-printing of types in errors by removing occurrences of gen#... variables.

  • Testing framework: add Test.get_time to discover current time (!2138 by er433)

    Details :

    New function in Test module:

    val get_time : unit -> timestamp

    It returns the current timestamp in the context of tests (similar to Tezos.get_now in contracts).

  • Testing framework: extend comparison (!2123 by er433)

    Details :

    The comparison functions (<, <=, etc.) now can work with variant types.

    Example

    Given the file test_compare.mligo:

    type c = [@layout:comb] | B of int | A of string
    type cl = c list
    let test_cmp_list = Test.assert ([A "hello" ; A "bye"] > [A "hello" ; B 42])
    Before this change
    $ ligo run test test_compare.mligo
    File "test_compare.mligo", line 4, characters 33-75:
    3 |
    4 | let test_cmp_list = Test.assert ([A "hello" ; A "bye"] > [A "hello" ; B 42])
    "Not comparable"
    After this change
    $ ligo run test test_compare.mligo
    Everything at the top-level was executed.
    - test_cmp_list exited with value ().
  • Diff of types in typer error messages (!2116 by nicolas.van.phan)

    Details :

    Feature description

    The typer error message Cannot unify X with Y is now augmented with a diff between X and Y when those are tuples.

    For example, here is a before/after of the error message for the following code :

    let x : int * nat * int * nat * int * nat = 42 , 4n , 42 , 24n , 42 , 24n
    let y : int * tez * string * nat * int * address * int * tez * nat = x

    Before

    Invalid type(s)
    Cannot unify ( int * nat * int * nat * int * nat ) with ( int * tez * string * nat * int * address * int * tez * nat ).

    After

    Invalid type(s)
    Cannot unify ( int * nat * int * nat * int * nat ) with ( int * tez * string * nat * int * address * int * tez * nat ).
    Difference between the types:
    int
    + tez
    + string
    nat
    int
    - nat
    + address
    int
    + tez
    nat

Fixed :

  • Add support for chain_id literal in Testing Framework (!2157 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: replace build_info with protocol version for ligo version (!2151 by er433)

    Details :

    Before

    $ ligo version
    ((build_time(1970-01-01 01:00:00.000000+01:00))(x_library_inlining false)(portable_int63 true)(dynlinkable_code false)(ocaml_version"")(executable_path"")(build_system""))
    0.55.0

    After

    $ ligo version
    Protocol built-in: lima
    0.55.0
  • fix byte extract (!2150 by lesenechal.remi)

    Details :

    fix a bug where bytes literals extraction was not working happening in JsLIGO

  • Testing framework: fix mutation in Michelson inlines (!2147 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: Send dependencies & devDependencies while publishing a package (!2145 by melwyn95)

    Details :

    Fixes bug in publising packages which have dependencies & devDependencies.

  • Fix location for error message for PascaLIGO (!2144 by melwyn95)

    Details :

    Before change

    $ ligo.55 compile contract x.ligo
    Invalid type(s)
    Cannot unify int with ( list (operation) * int ).

    After change

    $ ligo compile contract x.mligo
    File "x.ligo", line 3, characters 71-72:
    2 |
    3 | function updateAdmin(const _new_admin: address; var s: int): return is s
    4 |
    Invalid type(s)
    Cannot unify int with ( list (operation) * int ).
  • Monomorphisation: add a better error message (!2142 by er433)

    Details :

    Before change

    $ cat monomorphisation_fail.mligo
    let f (_ : unit) s = ([], s)
    let main ((p, s) : unit * unit) : operation list * unit = f p s
    $ ligo compile contract monomorphisation_fail.mligo
    Internal error: Monomorphisation: cannot resolve non-variables with instantiations

    After change

    $ cat monomorphisation_fail.mligo
    let f (_ : unit) s = ([], s)
    let main ((p, s) : unit * unit) : operation list * unit = f p s
    $ ligo compile contract monomorphisation_fail.mligo
    File "monomorphisation_fail.mligo", line 3, characters 58-63:
    2 |
    3 | let main ((p, s) : unit * unit = f p s
    Cannot monomorphise the expression.
  • Fix: Package resolution from Docker containers (!2137 by melwyn95)

    Details :

    Fixes package resolution for LIGO when used via Docker container.

  • Add check for non-comparable types under set and ticket (!2136 by er433)

    Details :

    Before change

    $ ligo compile contract not_comparable.mligo
    Error(s) occurred while type checking the contract:
    At (unshown) location 2, ill formed type:
    1: { parameter (set (set int)) ;
    2: storage unit ;
    3: code { CDR ; NIL operation ; PAIR } }
    At line 1 characters 17 to 25,
    comparable type expected.Type set int is not comparable.

    After change

    $ ligo compile contract not_comparable.mligo
    File "not_comparable.mligo", line 1, characters 21-28:
    1 | let main ((_u, s) : (int set) set * unit) : operation list * unit = ([] : operation list), s
    The set constructor needs a comparable type argument, but it was given a non-comparable one.
  • Bugfix : Resolving module aliasing for nested modules (!2129 by pewulfman)

    Details :

Performance :

  • Internal: in tezos-ligo, lazify sapling_storage.ml's default_root (!2162 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Optimizations on mutable variables (!2099 by lesenechal.remi)

    Details :

    Apply michelson optimizations on mutable variables

0.55.0

Run this release with Docker: docker run ligolang/ligo:0.55.0

Breaking :

  • Protocol update: Lima (!2094 by er433)

    Details :

    Updated to Lima protocol for Michelson type-checking and testing framework. Main breaking changes are:

    • Deprecation of chest and Tezos.open_chest.
    • Change in Tezos.create_ticket to prevent the creation of zero valued tickets. Support for Jakarta has been removed. By default, we compile to Kathmandu. Type-checking for contracts use Kathmandu/Lima depending on --protocol passed, but for the rest of commands, protocol Lima is used (particularly, testing framework).

    Example of Tezos.create_ticket change

    Usage for protocol Kathmandu:

    let ticket : ticket<string> = Tezos.create_ticket("one", 10 as nat);

    Usage for protocol Lima:

    let ticket : ticket<string> = Option.unopt(Tezos.create_ticket("one", 10 as nat));

Fixed :

  • Fix: Detect cycles in #include paths and give proper error message (!2128 by melwyn95)

    Details :

    Before:

    $ ligo.54 print preprocessed x.mligo
    An internal error ocurred. Please, contact the developers.
    ("Stack overflow").

    After

    $ ligo print preprocessed x.mligo
    File "x.mligo", line 1, characters 9-18:
    1 | #include "y.mligo"
    2 |
    Error: Dependency cycle between:
    -> "x.mligo"
    -> "y.mligo"
  • Fix #include for jsligo due to missing case in ASI (!2122 by melwyn95)

    Details :

    Fixes bug in #including jsligo files when semicolon is missing the last declaration of included file

    Before:

    $ ligo.54 run test b.jsligo
    An internal error ocurred. Please, contact the developers.
    ("Simple_utils__Region.Different_files("b.jsligo", "a.jsligo")").

    After:

    $ ligo run test b.jsligo
    Everything at the top-level was executed.
    - test exited with value ().
  • fixing E_for_each ctxt threading (!2121 by lesenechal.remi)

    Details :

    Fix a bug where the typing of one for-loop could invalidate the typing of the next one

  • Testing framework: subtraction of timestamps (!2120 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • SLICE instruction in testing framework's interpreter (!2107 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • NOT instruction in testing framework's interpreter (!2106 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Layout Unification (!2070 by alistair.obrien)

    Details :

    Add layout unification to LIGO's type checker, which fixes existing flaws in the propagation of layout annotations.

0.54.1

Run this release with Docker: docker run ligolang/ligo:0.54.1

Fixed :

0.54.0

Run this release with Docker: docker run ligolang/ligo:0.54.0

Breaking :

  • Make [@annot:] mean no annot (!2048 by tomjack)

    Details :

    An empty annot attribute ([@annot:]) on record fields and variant cases now means that there will be no annot at all. Previously, it was ignored, and the field/case name would be used as usual.

Added :

  • Testing framework: add option to remove default printing (!2075 by er433)

    Details :

    Testing framework: allow disabling of default printing.

    By default, LIGO's testing framework will print the values prefixed with test. Now it is possible to disable this output by using Test.unset_print_values : unit -> unit. It can be turned on again using Test.set_print_values : unit -> unit. The values prefixed with test will be printed or not at the end of execution, depending on which of these commands was executed last.

Fixed :

  • Fixed the tokenisation of linemarkers (!2092 by rinderkn)

    Details :

    Fixed the tokenisation of linemarkers

  • [Package Management]: Fix bug in dependency resolution in ModRes (!2088 by melwyn95)

    Details :

    Fixes bug in resolution of external packages

  • Load stdlib modules in list-declarations (!2071 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

Internal :

0.53.0

Run this release with Docker: docker run ligolang/ligo:0.53.0

Added :

  • Cameligo punning (!2057 by SanderSpies)

    Details :

    CameLIGO: add punning support for records.

  • Testing framework: add assert alternatives in the Test module (!2054 by er433)

    Details :

    New asserting primitives in the Test module

  • Testing framework: add support for chain_id values (!2033 by er433)

    Details :

    Added support for chain_id in the testing framework, now it can run Tezos.get_chain_id () successfully.

  • Escaped identifiers example (!2028 by SanderSpies)

    Details :

    Add an example of escaped identifiers.

Fixed :

Changed :

Internal :

0.52.0

Run this release with Docker: docker run ligolang/ligo:0.52.0

Added :

  • Jsligo unreachable code (!2017 by SanderSpies)

    Details :

    Give a warning when there's unreachable code in JsLIGO.

  • JsLIGO: add ternary support . (!1993 by SanderSpies)

    Details :
    • JsLIGO: add ternary support
  • Adds a package wrapped in esy (!1974 by ulrikstrid)

    Details :

    nix improvements

    Add package that provides ligo with with esy. Usage: nix run gitlab:ligolang/ligo#withEsy -- install

  • Jsligo discriminatory union (!1973 by SanderSpies)

    Details :

    JsLIGO: Add support for discriminatory unions.

  • Add raw bytes literal from string (!1852 by tomjack & er433)

    Details :

    Raw bytes representation from string

    Raw bytes can be expressed directly from a string using [%bytes "..."]. E.g., [%bytes "foo"] represents bytes 0x666f6f.

Fixed :

  • fix: contract not compiling in presence of meta-ligo terms (!2010 by lesenechal.remi)

    Details :
    • fix a regression where contract could not compile in presence of meta-ligo expressions (automatically remove such expressions)
  • Testing framework: fixing decompilation of event payloads (!2005 by lesenechal.remi)

    Details :

    Testing framework: fixing decompilation of event payloads

  • Testing framework: untranspilable ticket in bigmap update (!1996 by lesenechal.remi & er433)

    Details :
    • Testing framework: fix a bug where a ticket in a big_map was not transpilable
  • Allow return in switch case. (!1995 by SanderSpies)

    Details :

    Return in switch case now works properly.

  • bugfix/module attribute deletion in aggregation (!1978 by pewulfman)

    Details :

    No details provided for this change. Please visit the MR to learn more

Changed :

  • Improve JsLIGO docs (!2026 by SanderSpies)

    Details :

    Reduce number of type annotations in JsLIGO examples in the documentation.

  • Match list no annotation (!2014 by SanderSpies)

    Details :

    Remove the need for type annotations when using the match function over lists.

  • Jsligo destructure function params (!2011 by SanderSpies)

    Details :

    JsLIGO: Tuple destructuring in parameters.

  • JsLIGO Object destructuring in parameters (!2002 by SanderSpies)

    Details :

    Add support to destructure objects in function parameters.

  • JsLIGO: improve if .. else handling + allow "_" as arrow function argument. (!1991 by SanderSpies)

    Details :

    Semicolon before else now allowed. Underscore is now allowed as arrow function argument.

Internal :

0.51.0

Run this release with Docker: docker run ligolang/ligo:0.51.0

Added :

  • Stdlib: add ignore (!1967 by er433)

    Details :

    New ignore in stdlib

    A new function ignore : type a . a -> unit allows to ignore values.

  • Add List.find_opt to LIGO's Standard Library (!1953 by alistair.obrien)

    Details :

    Added List.find_opt to LIGO's standard library

  • add brew formula into ligo monorepo (!1950 by Laucans)

    Details :

    Add ligo installation through brew package manager. By using

    brew tap ligolang/ligo https://gitlab.com/ligolang/ligo.git
    brew install ligolang/ligo/ligo

    You can also install one of the three last version by targeting the version after "@" :

    brew install ligolang/ligo/ligo@0.49.0
  • Jsligo for-loops on maps (!1949 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Execute ligo through NIX (!1937 by Laucans)

    Details :

    Run nix run gitlab:ligolang/ligo to execute the last release of ligo binary through nix (arch x86_64-linux)

  • Draft: New implementation of get-scope with support for modules (!1935 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add support for mutation in Test.originate_from_file functions (!1904 by er433)

    Details :

    New functions for testing framework

    There are new functions for doing mutation testing directly from files, that originate a mutated version of the contract and then gives control to the passed function that can do the test:

    • Test.originate_from_file_and_mutate : string -> string -> string list -> michelson_program -> tez -> (address * michelson_contract * int -> b) -> (b * mutation) option
    • Test.originate_from_file_and_mutate_all : string -> string -> string list -> michelson_program -> tez -> (address * michelson_contract * int -> b) -> (b * mutation) list
  • Add a subcommand ligo daemon to be used only by tools like LSP server (!1882 by lesenechal.remi)

    Details :
    • add a daemon for ligo

Fixed :

  • Fix: remove forced annotation in CameLIGO's abstractor (!1981 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix path issue in testing framwork for jsligo tests (!1980 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Testing Framwork] Fix relative path resolution for contracts (!1979 by melwyn95)

    Details :

    Fixes path resolution if a relative path is provided to Test.originate_from_file & Test.compile_contract_from_file & Test.read_contract_from_file

  • regression layout (!1976 by lesenechal.remi)

    Details :

    Fix regression in layout unification

  • Fix tuple parameters passed to constant functions e.g. Tezos.call_view (!1972 by er433 & melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Jsligo preparser comma (!1971 by SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix JsLIGO preparser issue with colons. (!1966 by SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Monomorphisation: forall eta expand in monomorphisation (!1964 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Bugfix : nested for loop doesn't catch assignation effect correctly (!1963 by pewulfman)

    Details :

    Fixing bug with nested for loops in Pascaligo

  • Fix the emission of recursive functions in JsLIGO tree abstractor (!1960 by alistair.obrien)

    Details :

    Fix the emission of recursive functions in JsLIGO tree abstractor

  • Testing framework: perf. fix; compute error_type only when needed (!1954 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix view compilation for the case when a view uses another view (!1951 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Fix] Website responsive issue (!1948 by JulesGuesnon)

    Details :

    Some blocks were cropped on small devices, so I fixed the responsive

  • Bug Fix: Function Application in Bidirectional Type Checking (!1945 by alistair.obrien)

    Details :

    Bug fix for function application in bidirectional type checking

Changed :

  • Update Documentation Removing Unnecessary Annotations (!1969 by alistair.obrien)

    Details :

    Update documentation removing unnecessary annotations

  • JsLIGO Remove Parser Requirement for Mandatory Parameter Annotations (!1961 by alistair.obrien)

    Details :

    Remove requirement that JsLIGO function parameters must be annotated

  • Bidirectional type checking for LIGO (!1905 by alistair.obrien)

    Details :

    Re-implement LIGO's type checker using bidirectional type checking.

Performance :

Internal :

0.50.0

Run this release with Docker: docker run ligolang/ligo:0.50.0

Added :

  • Draft: Adding support for the reverse application operator |> (!1875 by rinderkn)

    Details :

    Added support for the reverse application operator |>

Fixed :

Internal :

0.49.0

Run this release with Docker: docker run ligolang/ligo:0.49.0

Added :

  • List decl improv (!1915 by lesenechal.remi)

    Details :
    • ligo info list-declarations now fail in case of a type error
    • ligo info list-declarations now accepts a flag --only-ep to only display declarations typed as an entrypoint (parameter * storage -> operation list * storage)

Fixed :

  • Mutation testing: reduplication for mutation saving (!1914 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Perf: view fix (!1896 by lesenechal.remi)

    Details :
    • Performance: optimized compilation time for contracts
  • [Package Management] Fix: package tar-ball having absolute paths (!1893 by melwyn95)

    Details :

    Fix ligo publish in the case where --project-root is inferred

Performance :

Internal :

0.48.1

Run this release with Docker: docker run ligolang/ligo:0.48.1

Added :

Fixed :

0.48.0

Run this release with Docker: docker run ligolang/ligo:0.48.0

Added :

  • update to kathmandu (2/2 : EMIT) (!1889 by lesenechal.remi)

    Details :
  • [Testing Framwork] Add relative path resolution to Test.originate_from_file (!1879 by melwyn95)

    Details :

    Test.originate_from_file can now resolve paths relative to test file

  • Testing framework: add support for C_CONTRACT and similar (!1876 by er433)

    Details :

    Testing framework: support for Tezos.get_entrypoint_opt, Tezos.get_contract_opt and variants.

  • [Package Management] Integrate ligo registry in CLI & Impl ligo publish, ligo login & ligo add-users in CLI (!1863 by melwyn95)

    Details :

    Adds support for the new LIGO registry with the following commands

    1. publish [--registry URL] [--ligorc-path PATH] [--project-root PATH] publish the LIGO package declared in package.json
    2. add-user [--registry URL] [--ligorc-path PATH] create a new user for the LIGO package registry
    3. login [--registry URL] [--ligorc-path PATH] login to the LIGO package registry
  • Testing framework : Documentation on ticket testing + support for decompilation of tickets to unforged tickets (!1725 by lesenechal.remi)

    Details :
    • [Testing framework] support for decompilation for tickets into unforged_tickets
    • [Testing framework] documentation about ticket testing

Fixed :

  • Testing framework: Add support for decompiling key as bytes (!1891 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Draft: Mac Installation Instructions and Fixes (!1883 by alistair.obrien)

    Details :
    • Added additional instructions for installing and building LIGO on MacOS.
    • Additionaly fixed reliance on $PATH for jsonschema in get_scope_tests by prefixing command with python3 -m.
  • Re-introduce self_typing (!1880 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: scope of #import (!1873 by pewulfman)

    Details :

    The scope of #import directive has been fixed so that the imported module is created in-place instead of at the beginning of the file. (i.e won't be shadowed anymore by a module declared before the import)

  • Aggregation: remove from the scope the variables locally bound (!1871 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Handle Big_map.get_and_update in test interpreter (!1870 by melwyn95)

    Details :

    Handle Big_map.get_and_update in testing framework

  • Change handling of capitalization in Tezos.get_entrypoint_opt (!1864 by er433)

    Details :

    Tezos.get_entrypoint_opt does not error anymore on the usage of a capitalized entrypoint.

Changed :

  • Tezos upd v14 (!1884 by lesenechal.remi)

    Details :
    • LIGO now depends on tezos v14
  • Try to infer --project-root when using ligo commands (!1859 by melwyn95)

    Details :

    Infer --project-root when using ligo commands

    Now LIGO will try to infer --project-root by looking at parent directories, This will make LIGO CLI commands less verbose (when using external packages from npm).

    If you need/want to specify the root directory of your project you can as always use the --project-root flag.

Deprecated :

  • Remove thunked constants (!1877 by er433)

    Details :

    Deprecated: Tezos.amount, Tezos.balance, Tezos.now, Tezos.sender, Tezos.source, Tezos.level, Tezos.self_address, Tezos.chain_id, Tezos.total_voting_power

  • Prepare Deprecate of Reasonligo (!1849 by pewulfman)

    Details :

    As ReasonLigo doesn't seem to have any advantages over Cameligo and JSligo and it seems that it is not used much. We decided to remove the support of the syntax, in order to focus our effort on other parts of the compiler. We have added a warning that we will leave for a few versions and remove ReasonLigo then.

Internal :

  • Package management: Adds package author to metadata during publish (!1878 by prometheansacrifice)

    Details :

    Here replace this sentence and put what you want to share with ligo users through changelog. Markdown formatted (#### for title). If you don't want to describe the feature remove keyword "Description details:"

  • Typer: keep type abstraction after checking (!1872 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Draft: Decompile & pretty print patterns in error message (!1814 by melwyn95)

    Details :

    Better error messages for pattern matching anomalies

0.47.0

Run this release with Docker: docker run ligolang/ligo:0.47.0

Added :

  • CLI Scaffolding feature (!1858 by Laucans)

    Details :

    Initialize a new Ligo project from chosen template

    This feature allow user to easily setup a new ligo project (Library or Contract) from template by adding new command-set into CLI.

    Requirements

    Feature use git so git cli have to be available.

    Commands

    ligo init -help

    ligo init contract --template-list = print available template list to generate contract

    ligo init contract <PROJECT> --template XXX = initialize folder with contract template XXX

    ligo init library --template-list = print available template list to generate library

    ligo init library <PROJECT> --template XXX = initialize folder with library template XXX

    Additional details
  • Add option --experimental-disable-optimizations-for-debugging (!1800 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

Fixed :

  • Fix aggregation bug in loop (!1850 by pewulfman)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Cleanup Agregation : replace dirty ref map with proper functional handling (!1845 by pewulfman)

    Details :

    fix a potential bug in the backend

  • Draft: view compilation clean-up (!1833 by lesenechal.remi)

    Details :
    • Fixing potential bug related to view declaration shadowing
  • Fix handling of @scoped/packages in ModRes (!1818 by melwyn95)

    Details :

    Fix handling for scoped npm packages

Performance :

  • Optimize {PAIR n; UNPAIR n} and {UNPAIR n; PAIR n} (!1846 by tomjack)

    Details :

    Optimize {PAIR n; UNPAIR n} and {UNPAIR n; PAIR n} to {}

Internal :

0.46.1

Run this release with Docker: docker run ligolang/ligo:0.46.1

Fixed :

0.46.0

Run this release with Docker: docker run ligolang/ligo:0.46.0

Added :

  • Testing framework: separate Test.log into printing and string conversion (!1809 by er433)

    Details :

    New functions: Test.print, Test.println, Test.eprint, Test.to_string, Test.nl and Test.chr

    These new functions provide more fine-grained printing.

    val Test.print : string -> unit : prints an string to stdout.

    val Test.println : string -> unit : prints an string to stdout, adding a newline at the end.

    val Test.eprint : string -> unit : prints an string to stderr.

    val Test.to_string : 'a -> string : turns a value of a given type into a string (internally using the same conversion as Test.log)

    val Test.nl : string : a string containing only a newline.

    Test.chr : nat -> string option : turns a nat in the range [0, 255] to an string consisting of only the corresponding char.

  • Testing framework: improvement on random generation and module PBT (!1799 by er433)

    Details :

    A new module Test.PBT

    This new module is introduced to do simple property-based testing. It's composed of:

    • val gen : 'a gen: gives a generator for type 'a (must be annotated).
    • val gen_small : 'a gen: : gives a small generator for type 'a (must be annotated).
    • val make_test : 'a gen -> ('a -> bool) -> 'a pbt_test: creates a test from a generator and a property.
    • val run : 'a pbt_test -> nat -> 'a pbt_result: runs a test for a given number of tries. The introduced types are:
    • type 'a gen: represents a generator for a type.
    • type 'a pbt_test: represents a test for a type.
    • type 'a pbt_result = Success | Fail of 'a: represents the result of running a test.

Fixed :

  • Testing framework: fix generator for nat/tez (!1830 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix abstractors for nested builtin submodules (!1820 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fixing the scanning of escaped characters in strings (!1817 by rinderkn)

    Details :

    Until now escaped characters in strings were not properly scanned.

    For instance, now the following constants

    let _one = String.length """
    let _two = String.length "
    "
    let _three = String.length ""

    are accepted and evaluate in 1.

  • Error if polymorphism is present after monomorphisation (!1804 by melwyn95)

    Details :

    Improve error message if polymorphism cannot be resolved

Changed :

  • Pattern Matching: anomaly detection (!1794 by melwyn95)

    Details :

    Improve pattern matching anomaly (missing case / redundant case) error messages.

    For missing cases:
    type p = Four | Five | Six
    type t = One of { a : int ; b : p } | Two | Three
    let s (x : t) =
    match x with
    One { a ; b = Six } -> ()
    | Two -> ()
    | Three -> ()

    Error:

    File "../../test/contracts/negative//pattern_matching_anomalies/missing_cases/c_r_c.mligo", line 5, character 2 to line 8, character 29:
    4 | let s (x : t) =
    5 | match x with
    6 | One { a ; b = Six } -> ()
    7 | | Two -> ()
    8 | | Three -> ()
    Error : this pattern-matching is not exhaustive.
    Here are examples of cases that are not matched:
    - One({ a = _ ; b = Five })
    - One({ a = _ ; b = Four })

    For redundant case:
    type t = One of int | Two of nat | Three
    let s (x : t) =
    match x with
    One a -> ()
    | Two c -> ()
    | Three -> ()
    | _ -> ()

    Error:

    File "../../test/contracts/negative//pattern_matching_anomalies/redundant_case/c1_c2_c3_w.mligo", line 8, characters 4-5:
    7 | | Three -> ()
    8 | | _ -> ()
    Error : this match case is unused

Deprecated :

Internal :

  • Improvement on Trace module (!1834 by pewulfman)

    Details :

    The compiler is now able to report all errors corresponding to the same step of compilation at the same time

  • Clean checking : add abstraction to avoid futur conflict and remove etection of polymorphic var (!1831 by pewulfman)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Clean up var module (!1826 by pewulfman)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • mono file stdlib (!1815 by lesenechal.remi)

    Details :

    rework of the standard library (might slightly improve compiler/tooling performances)

  • Change %external replacement (!1792 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

0.45.0

Run this release with Docker: docker run ligolang/ligo:0.45.0

Breaking :

  • Testing framework: expose functions for contract compilation and origination (!1772 by er433)

    Details :

    New Test type and functions

    • type michelson_contract: representing Michelson contracts.
    • Test.compile_contract_from_file : string -> string -> string list -> michelson_contract
    • Test.compile_contract : ('param * 'storage -> operation list * 'storage) -> michelson_contract
    • Test.read_contract_from_file : string -> michelson_contract
    • Test.originate_contract : michelson_contract -> michelson_program -> tez -> address
    • Test.size : michelson_contract -> int

    Breaking changes in Test types, now they return michelson_contract instead of michelson_program:

    • Test.originate_from_file : string -> string -> string list -> michelson_program -> tez -> address * michelson_contract int
    • Test.originate : ('param * 'storage -> operation list * 'storage) -> 'storage -> tez -> (('param, 'storage) typed_address * michelson_contract * int)

    Most usages ignore this result, but might break some tests in case they are too annotated.

  • failwith now accepts arbitrary type as input (!1748 by lesenechal.remi)

    Details :

    The failwith primitive now accepts arbitrary type as input.

    breaking changes

    failwith is now typed as forall a b . a -> b, instead of applying an ad-hoc rule giving unit as a default return type. In general, this will require more type annotations, as in:

    let toplevel_failwith = failwith "I am failing" (* will not type anymore *)
    let toplevel_failwith : unit = failwith "I am failing"
    let f = fun (_ : unit) -> failwith (x + x + String.length y) (* will not type anymore *)
    let f = fun (_ : unit) : unit -> failwith (x + x + String.length y)

    Closes #193

  • Remove deprecated constants (!1711 by er433)

    Details :

    Deprecated constants

    In previous versions of LIGO, warnings were emitted for deprecated constants (e.g. balance, sender, etc.). We finally remove those constants. Please consult API documentation in ligolang.org to find a new constant that can replace the old one in your contract.

Added :

  • Testing framework: add missing Test.drop_context (!1787 by er433)

    Details :

    New Test function: drop_context

    A new val Test.drop_context : unit -> unit in the testing framework is introduced. It allows to drop contexts from the context stack.

  • Testing framework: add signing operation (!1783 by er433)

    Details :

    New function Test.sign

    A new function val sign : string -> bytes -> signature was added to sign data (represented as bytes) using a key (represented as a string).

  • Testing framework: support getting secret key from bootstrap accounts (!1782 by er433)

    Details :

    New Test function: get_bootstrap_account

    The new function val get_bootstrap_account : nat -> address * key * string in Test retrieves the nth bootstrap account. Differently to nth_bootstrap_account, it also recovers the key and the secret key (represented as a string, similar to Test.new_account).

  • Testing framework: Better control of time (!1776 by lesenechal.remi)

    Details :

    testing framework: new function Test.reset_at (similar to Test.reset) which takes a timestamp and initialize the genesis block with a given timestamp

  • injectable cli expression (!1769 by lesenechal.remi)

    Details :

    you can now pass an expression to ligo run test using command line option --arg, this value will be accessible through variable cli_arg

  • Ligo native multi-platform (!1768 by prometheansacrifice)

    Details :

    Use esy to build binary for :

    • Windows
    • Mac intel
    • Mac m1
  • Multiplat builds with esy (!1764 by Laucans)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: implement other baking policies (!1746 by er433)

    Details :

    New Test.set_baker_policy

    There is a new Test.set_baker_policy : test_baker_policy -> unit that allows to set different baker policies as available in the testing helpers provided by the protocol. The type test_baker_policy is defined as the sum type:

    type test_baker_policy =
    | By_round of int
    | By_account of address
    | Excluding of address list

    In particular, Test.set_baker addr is equivalent to Test.set_baker_policy (By_account addr).

  • [jsligo] function parameter destructuring, and let destructuring improvement (!1720 by lesenechal.remi)

    Details :
    • JSLIGO patterns in function parameters are now compiled to pattern matching, which improves the generated code in general
    • JSLIGO "let-destructuring" will now work on objects (record type) and arrays (tuple type) as in:
    let destruct_tuple = (x : [ int , [int , nat] ]) : nat => {
    let [a,[b,c]] = x ;
    c
    };
    let destruct_record = (x : { a : int , b : string }) : int => {
    let { a , b } = x ; (* Note: nested pattern in record are not yet available *)
    a
    };
  • Moving to jarkarta (!1709 by lesenechal.remi)

    Details :

    upgrade to jakarta:

    • jakarta changes are available (please use option --protocol jakarta)
  • Testing framework: add support for context saving/restoring (!1695 by er433)

    Details :

    New operations Test.save_context and Test.restore_context

    • Test.save_context : unit -> unit : takes current testing framework context and saves it, pushing it into a stack of contexts.
    • Test.restore_context : unit -> unit : pops a testing framework context from the stack of contexts, and sets it up as the new current context. In case the stack was empty, the current context is kept.
  • Global constants support in compile expression and additional support in parameter/storage (!1693 by er433)

    Details :

    The sub-command compile expression now supports --constant and --file-constants for using global constants.

  • Testing framework: add support for loading files with global constants (!1681 by er433)

    Details :

    Testing framework: add support for loading files with global constants

    A new function Test.register_file_constants is introduced. It takes a string (file path) and returns a list of strings corresponding to the hashes of the registered constants.

    The file format is the same as the used in --file-constants for sub-command compile contract.

  • Add support for constants and file-constants in compile-parameter and compile-storage (!1677 by er433)

    Details :

    Add support for global constants in compile storage and compile parameter

  • Add deprecation warning for constants marked as deprecated (!1623 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: new Test.register_constant and Test.constant_to_michelson_program to work with global constants (!1617 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Ithaca] Command line option --protocol ithaca now allow users to use Ithaca specifics (!1582 by er433 & melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: Dropping support for Test.set_now LIGO 0.38.0 onwards. (!1582 by er433 & melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Ithaca] Support for Option.map - MAP instruction on option type. (!1582 by er433 & melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Ithaca] Subtraction operator emmits SUB_MUTEZ instruction when subtracting value of type tez. (!1582 by er433 & melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Global constants: add compile constant sub-command (!1608 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Global constants: register global constants for compile-contract (!1603 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Website: Add Changelog link in header website & webide (!1602 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • testing framework: change 'test_exec_error' type. It now has a special case for unsuficient balances, and case Other will return the tezos_client error (as a string) (!1576 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs: Update docs about Set.literal (!1572 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add instructions to register delegate and add baker accounts (!1547 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add voting_power & total_voting_power to test interpreter (!1542 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Update docs about adding alias for ligo on Linux/MacOS & Windows. (!1541 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add functions to register/generate (sk, pk) pairs for implicit addresses (!1539 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add support for Tezos.implicit_account (!1533 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Adding Tezos.voting_power and Tezos.total_voting_power (!1531 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Experimental support for source environment (bound variable) info with --michelson-comments env (!1521 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Support curried recursive functions (!1516 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: Test.transfer_* returns gas consumption (!1509 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Remove unused decls. (including potential Test. usages) when compiling parameter/storage (!1500 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add Test.decompile primitive (!1493 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add literals/negation for bls12_381_g1/g2/fr (!1479 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added Tezos.constant for protocol Hangzhou (!1438 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add asserts in interpreter (!1463 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add support for Bytes.sub (!1462 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Webide: add examples for JsLIGO and re-enable increment examples for other languages (!1457 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs for ligo package management (!1436 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add Test.random for generating values using QCheck (!1244 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add support for package management to ligo using esy package manager (!1394 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Test framework: add pack/unpack using Michelson interpreter (!1429 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix typo in entrypoints-contracts.md (!1298 by @mweichert)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Generate syntax highlighting for PascaLIGO (!1418 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Generate ReasonLIGO syntax highlighting for VIM, Emacs, VS Code (!1415 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Generate VSCode syntax highlighting for CameLIGO (!1414 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Generate CameLIGO Syntax Highlighting from definition in OCaml - Emacs + VIM (!1210 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: update run so it runs in current tezos_context and port tzip12 tests to testing framework (!1409 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs for Bytes (!1389 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Experimental: propagate source locations to Michelson with --michelson-comments location (!1251 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs for switch statement - jsligo (!1358 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Tree abstraction for switch statements - jsligo (!1358 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Hangzhou] Testing framework: expose functions 'create_chest_and_chest_key' and 'create_chest_key' from Tezos crypto library (timelock) as 'Test.create_chest' and 'Test.create_chest_key' respectively (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Hangzhou] Testing framework: Test.originate_from_file now takes an additional list of top-level declaration for views (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Hangzhou] Command line option '--protocol hangzhou' now allow users to use hangzhou specifics (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: new primitive 'Test.cast_address' to cast an address to a typed_adress (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Hangzhou] support for on-chain views. Command line option '--views' and top-level declaration '[@view]' annotation (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [Hangzhou] support for timelock. Types: chest; chest_key; chest_opening_result. Primitives: Tezos.open_chest (!1346 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs: simple polymorphism (!1361 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Simple polymorphism: add support for simple polymorphism in the type-checking pass (!1294 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • JsLIGO: Add support for assignment operators: += /= *= -= %= (!1348 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add comparator for bigmaps (!1340 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docs: new features on mutation (!1323 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • testing framework: adding timestamp arithmetic in LIGO interpreter (!1322 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add missing API functions to interpreter [List.fold_right, List.fold_left, List.head_opt, List.tail_opt, Set.fold_desc, Set.update, Map.get_and_update] (!1319 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add steps bound (for timeout) (!1308 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Documentation of Preprocessor and LexerLib libraries. (!1306 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add attribute to mark non-mutable declarations (!1303 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add support for modules (!1280 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • JsLIGO error messages (!1272 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Sub-command compile-expression: add option for disabling running of compiled code (!1252 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: add support for re-generating files from mutation (!1214 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added attributes on lambdas. (!1179 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Front-end: Parameteric type expressions, polymorphic type and value definitions. (!1179 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • The typechecking now understand parametric types (!1179 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Contract pass: check entrypoint syntax in C_CONTRACT_ENTRYPOINT(_OPT) (!1223 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: a call trace is kept for giving context on failure (!1209 by er4333)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add commands for mutating CST/AST, and primitives formutation in testing framework (!1156 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add bitwise operators for CameLIGO & ReasonLIGO (!1205 by Melwyn Saldanha)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add support for NEVER instruction as Tezos.never (!1194 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • New pass enforcing: consts cannot be assigned to, vars cannot be captured. (!1132 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added syntactic support for tuples without parentheses at the top-level of patterns in pattern matchings. (!1168 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add warning message when layout attribute is present on a constructor for a sum (issue #1104) (!1163 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add more documentation on LIGO testing framework (!1128 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Pass for repeated usage of ticket values (!1065 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Compiler now emits Edo GET k and UPDATE k when [@layout:comb] is used with records (!1102 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • added variable references support (get-scope) (!1101 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add type inference to the compiler (!1026 by @ligo.suzanne.soy, @pewulfman, @lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • LIGO Test Framework documentation (!1092 by @SanderSpies)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Support for deep pattern, record pattern, wildcard ("_") pattern and unit pattern in matching expressions (!934 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Allow identifiers with underscore and wildcard name (!1078 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add description and documentation for each sub command (!1028 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add support for JsLIGO (!896 by @SanderSpies, @rinderkn)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Explain sequences in ReasonLIGO and CameLIGO (!1062 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add werror flag to mark warnings as errors (!1060 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add repl (!1001 by @er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add a REPL based on linenoise (!1001 by Exequiel Rivas)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • The Emacs ligo-mode is now released on MELPA (!1008 by sanityinc)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Some optimizations for Edo, including DUP n (!1017 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • [@layout:comb] record destructuring is now compiled to UNPAIR n (!1030 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • add set update primitive (!1021 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • prototype typer: separated typeclass deduce_and_clean to its own heuristic; trimmed down the Compat modules (!981 by Suzanne Soy)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • prototype typer: heuristic to inline the definition of type variables used in type classes (!981 by Suzanne Soy)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fixed potential bug: use multiset in typeclasses_constraining; added indexer for typeclasses using a variable as an unbound var; sketched out heuristic which inlines variabes in typeclasses (!981 by Suzanne Soy)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add chain_id literals (!953 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Uncurry functions only used in full applications (!922 by tomjack)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Few fixes in tickets untranspilation (!929 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added doc for Edo things (tickets/sapling) (!929 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • tuple destructuring are now transformed into nested pattern matches (!909 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • linear pattern matching (tuple/record) (!909 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • EDO primitives (use --protocol edo and --disable-michelson-typechecking) (!909 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • prototype typer: added a separate constraint checking routine which will be executed after type inference (!910 by Suzanne Soy)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add two new function:

  • List.head_opt
  • List.tail_opt

which returns none if the list is empty and respectively hd and tl if the list is CONS (hd,tl) (!887 by Pierre-Emmanuel Wulfman)

Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/887)
* alias_selector for heuristics to take into account aliases ([!839 by Suzanne Soy](https://gitlab.com/ligolang/ligo/-/merge_requests/839))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/839)
* internal documentation for the typer ([!866 by Suzanne Soy](https://gitlab.com/ligolang/ligo/-/merge_requests/866))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/866)
* add --typer option to choose between 'old' and 'new' typer ([!864 by Rémi Lesénéchal](https://gitlab.com/ligolang/ligo/-/merge_requests/864))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/864)
* --protocol preloads types corresponding to a given protocol. use "ligo compile-contract path entrypoint --protocol=X --disable-michelson-typecheking" in combination with michelson_insertion ([!837 by Rémi Lesénéchal](https://gitlab.com/ligolang/ligo/-/merge_requests/837))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/837)
* --lib option for the get-scope command. this allows to specify paths to included files ([!827 by Rémi Lesénéchal](https://gitlab.com/ligolang/ligo/-/merge_requests/827))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/827)
* two new attributes on record and variant types: annot for michelson field annotation and layout (comb or tree) for compilation layout ([!809 by Rémi lesénéchal & Gabriel Alfour & Christian Rinderknecht](https://gitlab.com/ligolang/ligo/-/merge_requests/809))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/809)
* Add a dialect option when decompiling to pascaligo ([!791 by Alexandre Moine](https://gitlab.com/ligolang/ligo/-/merge_requests/791))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/791)
* Add a predifine function 'assert_some' ([!775 by Pierre-Emmanuel](https://gitlab.com/ligolang/ligo/-/merge_requests/775))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/775)
* Add error message for function argument tuple components mismatch ([!772 by SanderSpies](https://gitlab.com/ligolang/ligo/-/merge_requests/772))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/772)
* Add missing function argument type annotation error ([!769 by SanderSpies](https://gitlab.com/ligolang/ligo/-/merge_requests/769))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/769)
* Add changelog and versioning ([!725 by balsoft](https://gitlab.com/ligolang/ligo/-/merge_requests/725))
Details :
No details provided for this change. Please visit the [MR to learn more](https://gitlab.com/ligolang/ligo/-/merge_requests/725)

Fixed :

  • Testing framework: keep order on bigmap receipts (!1811 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Docker image: make ligo executable for non-root users (!1810 by tomjack)

    Details :

    Docker image: ligo now executable by non-root users inside container (e.g. when running docker with -u $(id -u):$(id -g).)

  • Custom JSON output for types bool and option (!1805 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Compile parameter and storage types individually in views (!1798 by er433 & melwyn95 & nicolas.van.phan)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: make Test.cast_address record type information (!1797 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Replace operations for operation in error message (!1796 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: Test.transfer_to_contract use entrypoint (!1795 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix record pattern matching when fields are not in the same order in all patterns (!1778 by melwyn95)

    Details :

    Fix record pattern matching when fields are not in the same order in all patterns

  • jsligo: let bindings nested in a module would not be silently morphed into constants (!1765 by lesenechal.remi)

    Details :

    fix a bug where top-level let declaration within a Jsligo Namespace wouldn't compile

  • Testing framework: add inline attribute (!1761 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • fix: --protocol jakarta emits SUB for mutez subtraction (!1755 by melwyn95)

    Details :
    • --protocol jakarta now emits SUB_MUTEZ for subtraction mutez values
  • pattern matching: some "inference" (!1753 by lesenechal.remi)

    Details :
    • improvement of pattern matching type-checking
  • Stdlib: Add thunk attribute to Big_map.empty (!1747 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Bugfix, export let is not cast silently (!1744 by pewulfman)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Improve running time after perfing (!1743 by lesenechal.remi)

    Details :
    • Testing framework: fix a potential bug where the current context wasn't used to evaluate Michelson code
  • Update Hashlock and ID examples for the webide (!1739 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • fixing lib cache (!1735 by lesenechal.remi)

    Details :
    • Fix a potential bug in standards libraries caching
  • Restricted strings to 7-bit ASCII, as in Michelson. (!1731 by rinderkn)

    Details :

    Description details: Restricted strings to 7-bit ASCII, as in Michelson.

  • [jsligo] Fix nested polymorphic functions (!1727 by melwyn95)

    Details :

    Fixed handling for nested generic functions in JsLIGO

    const id : <P>(x : P) => P = (x : P) => {
    const id_1 : <Q>(y : Q) => Q = (y : Q) => {
    let id_2 : <R>(z : R) => R = (z : R) => {
    let z = z;
    return z;
    };
    let y = y;
    return id_2(y);
    }
    return id_1(x);
    };
  • Typer context - Replace lists by maps (!1722 by nicolas.van.phan)

    Details :
  • do not raise corner_case in pattern matching compression (!1716 by lesenechal.remi)

    Details :

    fix detection of missing constructors in pattern matching

  • Fix recursive functions when fun_name shadowed (!1714 by melwyn95)

    Details :

    Fixes bug in tail-call recursion check

  • Fix: REPL support for stdlib (!1713 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix Tezos.call_view with impure (!1708 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix option handling in michelson_to_value (!1699 by melwyn95)

    Details :
    1. Fix bug in test interpreter related handling of option values
    2. Improve typing of records when type annotation is not provided
  • fixing a bug in pattern_matching.ml substitution (!1698 by lesenechal.remi)

    Details :

    Fix a bug related to recursive function definitions in pattern matching

  • Testing framework: fix subtraction of timestamps (!1697 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: move Tezos.create_contract check of free variables to aggregated (!1691 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Testing framework: fix recursive functions with multiple parameters (!1688 by er433)

    Details :

    Recursive functions with multiple parameters were handled incorrectly in the testing framework. This change fixes the situation.

  • Fix and docs about Test.random (!1687 by er433)

    Details :

    Inference for Test.random fixed.

  • Fix for naming issue when compiling more than 10 views (#1388) (!1685 by er433)

    Details :

    Fixed naming issue when compiling more than 10 views (#1388).

  • Fix: protocol_version check in predefined.ml (!1664 by melwyn95)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Typer : Better locations (!1660 by lesenechal.remi)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Add pretty-printing of type parameters in CameLIGO. (!1653 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fixed the pretty-printing of punned record fields in ReasonLIGO (issue 1344). (!1656 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix typing rule of Test.mutation_test_all (!1655 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Added pretty-printing of type parameters to CameLIGO. (!1653 by Christian Rinderknecht)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix a bug where views would be declared as module accesses (!1652 by Rémi Lesénéchal & Melwyn Saldanha)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Better error when accessing a parametric type through a module (!1589 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix in typing for Tezos.get_contract_with_error (!1645 by er433)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Enable the check for reserved names again. It was removed unintentionally in the previous version (!1632 by Rémi Lesénéchal)

    Details :

    No details provided for this change. Please visit the MR to learn more

  • Fix: Raise error if typed_address is passes to Bytes.pack (!1612 by melwyn95)