Skip to content

Releases: aiken-lang/aiken

v1.0.28-alpha - 2024-05-23

24 May 01:46
c9a1519
Compare
Choose a tag to compare

Release Notes

Added

  • aiken: install shell completions automatically. @freexploit
  • aiken: added export command that exports regular function definitons. @rvcas
  • aiken-project: compiler version field to aiken.toml @rvcas
  • aiken-project: plutus version field to aiken.toml @rvcas
  • aiken-lsp: hover and goto definition support on list tail. @rvcas
  • aiken-lsp: hover on prop test via expression. @rvcas
  • aiken-lang: new builtin types in the prelude Pair and Pairs. @KtorZ @MicroProofs
  • aiken-lang: Codegen now generates uplc version 1.1.0 scripts when running build with plutus v3.

Fixed

  • aiken-lang: formatter should not erase pub on validators. @rvcas
  • aiken-lang: error on using tuple index when a tuple is returned by a generic function. @rvcas
  • aiken-lang: backpassing with expect gives a warning on pattern matches. @rvcas
  • aiken-lang: fix a regression in the Type-checker introduced in v1.0.25-alpha regarding types comparison. See #917. @KtorZ
  • aiken-lang: fix incongruous generics after type-checking which caused [] to be treated as a list in cases where it needed to be an empty map primitive. See #922. @KtorZ
  • aiken-lang: fix for generic constrs being used as functions causing type mismatch errors. @MicroProofs
  • aiken-lang: fix for error occuring when a field holds Data that is not a constr type when compiler traces are on. @MicroProofs
  • aiken-lang: fix for curry optimization involving 2 constants #945. @MicroProofs
  • aiken-lang: fix compiler wrongly requiring MillerLoopResult to be 'serialisable' when manipulated as a top-level value. See #921. @KtorZ
  • aiken-lang: fix type-checker oversight regarding serialisation of generics. See #939. @KtorZ
  • aiken-lang: fix type-checker not raising error when comparing non-serialisable types. See #940. @KtorZ
  • aiken-project: show a warning when ignoring modules in lib/validator because they have an invalid name. See #916. @KtorZ

Changed

Warning

BREAKING-CHANGE

2-tuples (a, b) are now treated the same as 3+ tuples -- which directly impacts the way that Aiken now deserialise those, especially when nested inside a List.

To deserialize into a list of 2-tuple (List<(a, b)>), one is now expected to provide a CBOR array of arrays (of 2 elements). Previously, this would require to provide a CBOR map! The downside of the latter is that CBOR serialization libraries do not necessarily preserve the order of keys in a map which could cause issues down the line, in particular with Aiken's dictionnaries.

To recover the old behavior when desired, Aiken introduces a new type Pair<a, b> to the language. So any existing program can be migrated by switching any occurences of (a, b) to Pair<a, b>.

However, it is often preferable to use 2-tuples where possible. The main place you will see usage of Pair is in the script context because its form is imposed by the ledger.

  • aiken-lang: altered internal representation of 2-tuples to distinguish them from pairs. @KtorZ @MicroProofs
  • aiken-lang: some more code gen cleanup. @MicroProofs
  • aiken-lang: new optimization for wrapped builtins found in the stdlib. @MicroProofs
  • aiken-project: slightly restyle warnings to be less noisy. @KtorZ

Install aiken 1.0.28-alpha

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/aiken-lang/aiken/releases/download/v1.0.28-alpha/aiken-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -c "irm https://github.com/aiken-lang/aiken/releases/download/v1.0.28-alpha/aiken-installer.ps1 | iex"

Install prebuilt binaries into your npm project

npm install @aiken-lang/aiken@1.0.28-alpha

Install prebuilt binaries via Homebrew

brew install aiken-lang/tap/aiken

Download aiken 1.0.28-alpha

File Platform Checksum
aiken-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
aiken-x86_64-apple-darwin.tar.gz Intel macOS checksum
aiken-x86_64-pc-windows-msvc.tar.gz x64 Windows checksum
aiken-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum

v1.0.26-alpha

26 Mar 02:16
075668b
Compare
Choose a tag to compare

Fixed

  • aiken-lang: allow casting of types to Data in function pipiing. @KtorZ

v1.0.25-alpha

22 Mar 15:34
v1.0.25-alpha
4e8042f
Compare
Choose a tag to compare

Added

  • aiken-lang: Data now has a generic argument that can be used to specify the blueprint type. @KtorZ
  • aiken-lang: New types PRNG and Fuzzer in the prelude. @KtorZ
  • aiken-lang: Test definitions now accept an (optional) argument alongside a new keyword via to specify fuzzers. @KtorZ
  • aiken-project: Property-based testing framework with integrated shrinking and case labelling. @KtorZ
  • aiken-project: Unit tests now show assertion operands as Aiken expression instead of raw UPLC . @KtorZ
  • aiken: The check command now accept an extra arg --seed to provide an initial seed for the pseudo-random generator of properties. @KtorZ
  • uplc: add integerToByteString and byteStringToInteger builtins. @rvcas @MicroProofs
  • aiken-lang: add integer_to_byte_string and byte_string_to_integer aiken/builtins. @rvcas
  • uplc: more conformance tests for integerToByteString and byteStringToInteger along with new ones. @rvcas
  • aikup: error message when version is not found. @rvcas
  • aiken: support outputting mainnet addresses for validators. @rvcas
  • aiken-lang: added serde to CheckedModule to encode modules as cbor. @rvcas
  • aiken-lang: Strings can contain a nul byte using the escape sequence \0. @KtorZ
  • aiken: The check command now accept an extra (optional) option --max-success to control the number of property-test iterations to perform. @KtorZ
  • aiken: The docs command now accept an optional flag --include-dependencies to include all dependencies in the generated documentation. @KtorZ
  • aiken-lang: Implement function backpassing as a syntactic sugar. @KtorZ
  • aiken-lang: Extend backpassing to support multiple patterns/arguments. @rvcas

Fixed

  • aiken-lang: Boolean operators (|| and &&) were (somewhat) left-associative. This is now fixed and changed to right-associativity. @KtorZ
  • uplc: serialise_data builtin wrongly encoding some larger ints as tagged CBOR bigints, instead of plain integers over 9 bytes. @KtorZ
  • aiken-project: Unit tests reports are now inline with the test with less noise. @KtorZ
  • aiken-lang: Data deserialization for primitive types (pairs, bools, void) now do full checks on the Data structure. @MicroProofs
  • aiken-lang: The identity reducer optimization was not removing the identity function before. That is fixed now.@MicroProofs
  • aiken-lang: Inner opaque types can now be properly destructured by expect and when patterns. @MicroProofs
  • aiken-lang: A codegen specific name-unique interner is now used to preserve lambda scoping. @MicroProofs
  • aiken-lang: if there is only one clause we want to present a warning that suggests that a let binding should be used instead but only if it's an exhaustive pattern. @rvcas
  • aiken-lang: support nested void matching @rvcas
  • uplc: fix constr identity (constr-3.uplc) conformance test. @rvcas
  • aiken-lang: disallow MLResult in a type definition. @rvcas
  • aiken-lang: reversed deserialization of bls types out of data types. @rvcas
  • aiken-lang: validator args unexpectedly unbound causing code gen crashes. @rvcas
  • aiken-lang: allow implicitly discarded values when right-hand side unified with Void. @KtorZ
  • aiken-lang: allow zero arg mutually recursive functions. @MicroProofs
  • aiken-lang: function aliases now resolved to the module and function name in codegen. @MicroProofs
  • aiken-lang: fix indentation of pipelines to remain a multiple of the base indent increment. @KtorZ
  • aiken-lang: forbid presence of non-serialisable data-types in compound structures like List and Tuple. @KtorZ
  • aiken-lang: fix 'given' arity reported by 'incorrect arity' error message. @rvcas

Changed

  • aiken-lang: Discards will now also type check the validator arguments instead of completely ignoring them. @MicroProofs
  • aiken-lang: Further improvements to tracing when using expect casting from Data. @MicroProofs
  • aiken-lang: The set of curriable builtins with arguments that occur 3 or more times are now hoisted in scope with the arguments curried. @MicroProofs
  • aiken-lang: Improved the way the lambda inliner works to prevent unnecessary inlining into functions. @MicroProofs
  • aiken-lang: Simplifications to the AirTree type in codegen. @MicroProofs
  • aiken-lang: CONSTR_FIELD_EXPOSER and CONSTR_INDEX_EXPOSER now inline the builtins instead. @MicroProofs
  • aiken-lang: SubtractInteger with a constant as the second arg is now flipped to addInteger with a negated constant. @MicroProofs
  • aiken-lang: Validator arguments are now checked per arg instead of after all args are applied. @MicroProofs
  • aiken-project: remove test definitions from dependency modules. @rvcas
  • aiken-project: ignore warnings from dependency modules. @rvcas
  • aiken-project: parse sources in parallel, this resulted in a nice speedup. @rvcas
  • aiken-lang: You can no longer use expect on opaque types in various situations. @rvcas & @KtorZ

Acknowledgements

A big thanks to those not directly mentioned in the CHANGELOG, but that contributed to this release πŸ™.

v1.0.24-alpha

31 Jan 19:01
Compare
Choose a tag to compare

Added

  • aiken: New aliases for check (aiken c) and build (aiken b) commands. @Kuly14

Fixed

  • aiken-lang: Fixed an issue with expects on lists that used discards. This fixes
    the validator issues being seen for previously succeeding validators on 1.0.21-alpha. @MicroProofs
  • aiken-lang: Out of Span issue is now solved. This also fixes incorrectly selected
    traces from the wrong module, which in some cases lead to the out of span issue. @MicroProofs

v1.0.23-alpha

25 Jan 20:22
Compare
Choose a tag to compare

Added

  • aiken: New --trace-level option for the check and build commands to
    allow chosing the verbosity level of traces amongst three levels: silent,
    compact & verbose. @MicroProofs @KtorZ
  • aiken: New --filter-traces option for the check and build commands
    to enable restricting traces with more granularity between user-defined
    traces, compiler-generated traces or both. @MicroProofs @KtorZ.
  • aiken-lang: Most builtin errors are now caught and instead catched trace
    errors are thrown. The exception is BLS primitives.

Fixed

  • aiken-lang: Fix flat encoding and decoding of large integer values. @KtorZ
  • aiken-lang: Traces should not have following expressions formatted into a
    block. @rvcas
  • aiken-lang: Sequences should not be erased if the sole expression is an
    assignment. @rvcas
  • aiken-lang: Should not be able to assign an assignment to an assignment.
    @rvcas
  • aiken-lang: Should not be able to have an assignment in a logical op
    chain. @rvcas
  • aiken: Ensures that test expected to fail that return False are
    considered to pass & improve error reporting when they fail. @KtorZ
  • aiken-lang: Fix generic edge case involving tuples.
  • aiken: aiken new now uses the current version for the github action.
  • aiken-lang: Using the head_list builtin on assoc lists now works.
  • aiken-lang: Now using correct discard match for constructor field access.
  • aiken-lang: The list_access_to_uplc now always returns a lambda wrapped
    term even with only discards. This fixes an apply error being seen by a few
    people.

Removed

  • aiken: The options --keep-traces (on the build command) and
    --no-traces (on the check command) have been removed; superseded by the
    new options. @MicroProofs @KtorZ

Tip

  • If you've been using aiken check --no-traces, you can recover the old
    behavior by doing aiken check --trace-level silent.
  • If you've been using aiken build --keep-traces, you can recover the old
    behavior by doing aiken build --trace-level verbose.

v1.0.21-alpha

05 Dec 03:33
4b04517
Compare
Choose a tag to compare

Added

  • aiken: --watch flag on the build, check and docs commands to automatically watch and re-execute the command on file changes. @Quantumplation & @KtorZ
  • acceptance tests 28-30 @MicroProofs
  • aiken-lang: expose BLS builtins and types @MicroProofs & @rvcas
  • aiken-lsp: implement hover info for tuples, lists, and contructor pattern elements @rvcas
  • aiken-lsp: implement hover on when clause patterns @rvcas
  • aiken-lsp: hover support for the optional multi validator fn @rvcas
  • aiken-lsp: implement quickfix for "utf8 byte array is valid hex string" warning @rvcas
  • uplc: add all BLS builtins and types @MicroProofs & @rvcas
  • uplc: add plutus conformance tests from here. @MicroProofs & @rvcas
  • uplc: case and constr cost models @MicroProofs

Changed

  • aiken: update to pallas v0.20.0 @rvcas
  • aiken-project: switch blueprint validator tests now uses insta @MicroProofs
  • aiken-project: update to pallas v0.20.0 @rvcas
  • aiken-lang: use a better algorithm for inlining single occurrences @MicroProofs
  • uplc: update to pallas v0.20.0 @rvcas
  • uplc: remove flat-rs crate and use it through pallas_codec instead

Fixed

  • aiken-lang: formatting unable to have newline after expect bool shortcut @rvcas
  • aiken-lang: formatter incorrectly erasing blocks in certain situations @rvcas
  • aiken-lang: use a distinct warning for discarded let assignments to avoid confusion @rvcas
  • aiken-lang: allow spread operator on positional constructor arguments @rvcas
  • aiken-lsp: and/or chains hovering on nested elements not working @rvcas
  • uplc: delay typemismatch errors in the machine runtime (caught by conformance tests) @rvcas

v1.0.20-alpha

25 Oct 23:35
Compare
Choose a tag to compare

Added

  • aiken-project: The plutus.json blueprint now contains a compiler.name
    and compiler.version fields.
  • aiken-project: Added compiler and system information to panic error report.
  • aiken-lsp: Added quickfix suggestions for unknown variables, modules and
    constructors.

Changed

  • aiken-lang: Added validator specific error when validator returns false
  • aiken-lang: Running a multi-validator with traces on will let you know
    which validator function is running
  • aiken-lang: Multi-validator with traces will give a better error when the
    'spend' redeemer is not properly wrapped with a constr
  • aiken-lang: Code gen traces are referenced instead of being inlined
    leading to smaller validators
    • aiken-lang: Support doc comments for function args and validator params

Fixed

  • aiken-lang: improved error messages for a |> b(x).
  • uplc: Fixed cost model issue when using div, quot, rem, mod.
  • aiken-lsp: Improved hovering suggestions and type annotations.
  • aiken-lang: incorrect 'unused::constructor

@KtorZ @MicroProofs @waalge @rvcas

v1.0.19-alpha

30 Sep 02:57
Compare
Choose a tag to compare

Fixed

  • aiken-lang: Fixed small typo in hoist_dependent_functions lead to
    internal cyclic calls not being recognized. @MicroProofs

v1.0.18-alpha

29 Sep 23:59
Compare
Choose a tag to compare

Added

  • aiken-lang: Code gen now allows for mutual recursion @MicroProofs

Fixed

  • aiken-lang: fixed stack overflow with unbound typing being passed into a
    function with inferred types
  • aiken-lang: expect on tuples greater than 2 checks the length to ensure
    tuple lists are the same length as the type.

Changed

  • aiken-lang: (Code Gen): Rename some of the types to use aliases
  • aiken-lang: (Code Gen): Remove the use of Air::RecordAccess and TupleIndex
    and replace them with functions that directly get the item at the specified
    index. Also improves performance.
  • uplc: Added more cases to the inline optimization function to allow the
    removal of further unnecessary lambda bindings.

v1.0.17-alpha

20 Sep 17:14
1ecdf38
Compare
Choose a tag to compare

Added

  • aiken: add ability to force warnings to cause a failing exit code on
    check, build, and docs
  • aiken-lang: automatically resolve and fetch latest revision of a package
    on build when a branch is specified as version
  • uplc: Add Case and Constr Terms; This includes their flat serialization
    and evaluation

Fixed

  • uplc: trim whitespace when loading files with hex strings to avoid
    confusing errors #720

  • uplc: uplc Constant::Data formatting

  • aiken-lang: code gen fixes including nested constr when matches and expect
    on None

  • aiken-lang: empty records properly parse as record sugar

  • aiken-lang: escape sequences are now properly preserved after formatting

  • aiken-lang: fixed parser ambiguity when using record constructor in if
    conditions followed by single-line var expressions #735

  • aiken-project: when a module name has a hyphen we should behave like rust
    and force an underscore

    @MicroProofs @KtorZ @rvcas