Skip to content

Releases: tact-lang/tact

Release 1.5.3

28 Nov 12:01
Compare
Choose a tag to compare

[1.5.3] - 2024-11-28

Changed

  • Replaced Set.isSubsetOf() with isSubsetOf() to support Node.js ≥18 and <22: PR #1009

Release contributors

Release 1.5.2

25 Sep 14:37
7eaea3f
Compare
Choose a tag to compare

Fixed

  • asm functions now support full range of Fift-asm syntax: PR #855

  • Fix npm installations of Tact compiler or any of the packages depending on it by hiding unnecessary post-install runs of husky: PR #870

Release contributors

Release 1.5.1

18 Sep 06:31
b384573
Compare
Choose a tag to compare

Added

  • The engines property in package.json and its strict checking to ensure minimal required Node.js version is 22: PR #847

Changed

  • CI now does matrix tests with Blueprint and npm, yarn, pnpm, and bun package managers: PR #848

Release contributors

Release 1.5.0

15 Sep 13:37
0106ea1
Compare
Choose a tag to compare

Added

  • The exists method for the Map type: PR #581
  • The storeBit method for Builder type and the loadBit method for Slice type: PR #699
  • The toSlice method for structs and messages: PR #630
  • Wider range of serialization options for integers — uint1 through uint256 and int1 through int257: PR #558
  • The deepEquals method for the Map type: PR #637
  • asm bodies for module-level functions: PR #769, PR #825
  • Corresponding stdlib functions for new TVM instructions from 2023.07 and 2024.04 upgrades: PR #331. Added the storeBuilder extension function and gasConsumed, getComputeFee, getStorageFee, getForwardFee, getSimpleComputeFee, getSimpleForwardFee, getOriginalFwdFee, myStorageDue functions.
  • slice, rawSlice, ascii and crc32 built-in functions: PR #787, PR #799
  • Builder.storeMaybeRef, parseStdAddress and parseVarAddress stdlib functions: PR #793
  • The compiler development guide: PR #833
  • Constant evaluator now uses an interpreter: PR #664. This allows calls to user-defined functions and references to declared global constants.

Changed

  • Allow omitting semicolons in contract/trait declarations and definitions: PR #718
  • Compiler Tests are now using @ton/sandbox instead of @tact-lang/emulator: PR #651
  • The minimal required Node.js version is bumped to 22: PR #769

Fixed

  • Traits can override inherited abstract functions: PR #724
  • Fix code generation bug for maps from unsigned integers to Boolean values: PR #725
  • Compiler failure when toString gets called as a static function and not a method: PR #745
  • Tact AST keeps the original format of integer literals (hex/dec/oct/bin): PR #771
  • Message opcodes are now checked if they fit into 32 bits: PR #771
  • Disallow zero binary message opcodes as those are reserved for text messages: PR #786
  • Return-statements in init() function do not cause FunC compilation error anymore: PR #794
  • emptyMap() in equality comparison expressions does not cause code generation failures: PR #814
  • Maps with coins as value type are now correctly handled in structs: PR #821
  • Contract method calls in return statements: PR #829
  • Disallow initializers for trait storage fields: PR #831
  • Fix dnsInternalNormalize() in @stdlib/dns to throw on slices with references as expected: PR #834

Release contributors

Special thanks

Release 1.4.4

18 Aug 01:20
e0fde4a
Compare
Choose a tag to compare

Added

  • Initial version of the API providing AST equivalence check: PR #689

Fixed

  • Returning self from getters is now allowed: PR #666
  • Remainder fields in the middle of a struct are now forbidden: PR #697
  • Defining two native functions from the same FunC function now does not fail compilation: PR #699
  • Map types are checked for well-formedness in all type ascriptions: PR #704

Release contributors

Release 1.4.3

15 Aug 16:28
deed501
Compare
Choose a tag to compare

Fixed

  • Parsing of optional nested struct fields does not cause the Not a tuple error anymore: PR #692
  • Disallow shadowing of recursive function names: PR #693
  • Better error message for the case when a constant shadows an stdlib identifier: PR #694

Release contributors

Special thanks

For opening issues and making thoughtful suggestions we'd like to thank

Release 1.4.2

13 Aug 14:51
2be440a
Compare
Choose a tag to compare

Changed

  • Removed unsupported iterators API: PR #633
  • Created a separate API function to enable compiler features: PR #647
  • Use the ILogger interface to enable API users implement their own loggers: PR #668
  • Use specific Internal or Compiler errors when throwing exceptions: PR #669

Fixed

  • FunC function identifiers with characters from hexadecimal set: PR #636
  • Throw syntax error for module-level (top-level) constants with attributes: PR #644
  • Typechecking for optional types when the argument type is not an equality type: PR #650
  • Getters now return flattened types for structs as before: PR #679
  • New bindings cannot shadow global constants: PR #680
  • Disallow using assignment operators on constants: PR #682
  • Fix code generation for some non-Lvalues that weren't turned into Lvalues by wrapping them in a function call: PR #683

Release contributors

Special thanks

For opening issues and making thoughtful suggestions we'd like to thank

Release 1.4.1

26 Jul 15:21
5bec486
Compare
Choose a tag to compare

Added

  • -e / --eval CLI flags to evaluate constant Tact expressions: PR #462
  • -q / --quiet CLI flags to suppress compiler log output: PR #509
  • Markdown report for compiled contracts now includes Mermaid diagrams for trait inheritance and contract dependencies: PR #560
  • Documentation comments to Zod schema of tact.config.json for descriptive hover pop-ups in editors: PR #575

Changed

  • Removed the LValue grammatical category and replaced it with Expression: PR #479
  • Compilation results are placed into the source file directory when compiling without tact.config.json file: PR #495
  • External receivers are enabled for single file compilation: PR #495
  • [DEBUG] prefix was removed from debug prints because a similar prefix was already present: PR #506
  • File paths in debug prints always use POSIX file paths (even on Windows): PR #523
  • The IPFS ABI and supported interfaces getters are not generated by default; to generate those, set to true the two newly introduced per-project options in tact.config.json: ipfsAbiGetter and interfacesGetter: PR #534
  • Values of Slice and Builder types are not converted to Cell in Typescript bindings anymore: PR #562
  • Debug prints now include line content for better debugging experience: PR #563
  • Error messages now suggest to add the self prefix if there is an attempt to access a missing variable when the contract storage has a variable with the same name: PR #568
  • Error messages now suggest to add or remove parentheses if there is an attempt to access a missing field when there is a method with the same name (and vice versa): PR #622

Fixed

  • Name clashes with FunC keywords in struct constructor function parameters: PR #467
  • Error messages for traversing non-path-expressions in foreach-loops : PR #479
  • Shadowing of trait constants by contract storage variables: PR #480
  • Parsing of non-decimal message opcodes: PR #481
  • Detection of multiple receivers of the same message: PR #491
  • Detection of non-unique message opcodes: PR #493
  • Error messages for non-abstract constants in traits: PR #483
  • All immediately inherited traits must be unique: PR #500
  • Do not throw error when overriding abstract and virtual getters: PR #503
  • Error message for non-existent storage variables: PR #519
  • Error message for duplicate receiver definitions inherited from traits: PR #519
  • Usage of initOf inside of init() does not cause error 135 anymore: PR #521
  • Usage of newAddress with hash parts shorter than 64 hexadecimal digits does not cause constant evaluation error Invalid address hash length anymore: PR #525
  • Introduced a streamlined error logger for compilation pipeline to support third-party tools: PR #509
  • Collisions of PascalCase getter names in generated wrappers are now checked: PR #556
  • Display a clearer error in case the source code file is missing when using the Tact CLI: PR #561
  • Error messages for unicode code points outside of valid range: PR #535
  • Correct regex for unicode code points and escaping of control codes in generated comments: PR #535
  • Add impure specifier to some stdlib functions that are expected to throw errors: PR #565
  • Defining non-existing native FunC functions now throws an understandable compilation error: PR #585
  • Bump used @tact-lang/opcode version to 0.0.16 which fixes the issue with DIV instructions: PR #589
  • Code generation for recv_external now correctly throws exit code 130 when processing an unexpected message: PR #604
  • Allocator bug resulting in cell overflows for some contract data layouts: PR #615
  • Structs with more than 15 fields do not cause a FunC compilation error anymore: PR #590
  • Typechecking for constant and struct field initializers: PR #621
  • Constant evaluation for structures with default and optional fields: PR #621
  • Report error for self-referencing and mutually-recursive types: PR #624
  • Error reporting for bounced receivers with missing parameter types: PR #626
  • Allowed range of FunC function identifiers in grammar.ohm: PR #628

Release contributors

Special thanks

For opening numerous issues and making thoughtful suggestions we'd like to thank

Release 1.4.0

21 Jun 15:31
c0c4eb4
Compare
Choose a tag to compare

Added

  • The bitwise NOT operation (~): PR #337
  • Augmented assignment bitwise operators |=, &=, ^=: PR #350
  • Traversing maps from contract storage and structs is now allowed: PR #389
  • The loadBool method for Slice type: PR #412
  • CLI flag --with-decompilation to turn on decompilation of BoC files at the end of the compilation pipeline: PR #417
  • Support more Tact expressions in the constant evaluator: conditional expressions, struct instances, struct field accesses, emptyMap(): PR #432 and PR #445
  • The fromCell and fromSlice methods for struct and message parsing: PR #418 and PR #454
  • The return-statement reachability analysis now takes into account the throw and nativeThrow functions: PR #447

Changed

  • Trailing semicolons in struct and message declarations are optional now: PR #395
  • Tests are refactored and renamed to convey the sense of what is being tested and to reduce the amount of merge conflicts during development: PR #402
  • let-statements can now be used without an explicit type declaration and determine the type automatically if it was not specified: PR #198 and PR #438
  • The outdated TextMate-style grammar files for text editors have been removed (the most recent grammar files can be found in the tact-sublime repo): PR #404
  • The JSON schema for tact.config.json has been moved to the schemas project folder: PR #404
  • Allow underscores as unused variable identifiers: PR #338
  • The default compilation mode does not decompile BoC files anymore, to additionally perform decompilation at the end of the pipeline, set the fullWithDecompilation mode in the mode project properties of tact.config.json: PR #417
  • Trait lists, parameters and arguments in the Tact grammar were assigned their own names in the grammar for better readability and code deduplication: PR #422
  • The semicolon (;) terminating a statement is optional if the statement is the last one in the statement block: PR #434

Fixed

  • Return type of skipBits now matches FunC and does not lead to compilation errors: PR #388
  • Typechecking of conditional expressions when one branch's type is a subtype of another, i.e. for optionals and maps/null: PR #394
  • Typechecking of conditional expressions when the types of their branches can be generalized, i.e. for non-optionals and null can be inferred an optional type: PR #429
  • External fallback receivers now work properly: PR #408
  • Int as coins as a value type of a map in persistent storage does not throw compilation error anymore: PR #413
  • The semantics of the Tact arithmetic operations in the constant evaluator to perform rounding towards negative infinity: PR #432
  • Better error messages for the void type: PR #442
  • Fixed the native function binding for the stdlib function nativeThrowWhen (it needed to be throw_if instead of throw_when) and also renamed it to nativeThrowIf for consistency with FunC: PR #451

Release contributors

Special thanks

For opening numerous issues and making thoughtful suggestions we'd like to thank

Release 1.3.1

08 Jun 08:59
7ec2fcb
Compare
Choose a tag to compare

Added

  • Tests for recursive functions: PR #359
  • API for AST traversal: PR #368
  • Spell checking for the whole code base: PR #372

Changed

  • GitHub actions updated to use Node.js 20: PR #360
  • Refactor AST types to simplify access to third-party tools: PR #325
  • Refactor the compiler API used to access AST store: PR #326
  • Update JSON Schema to inform about usage in Blueprint: PR #330
  • All identifiers in error messages are now quoted for consistency: PR #363
  • The Tact grammar has been refactored for better readability: PR #365

Fixed

  • The log2 and log math functions were adjusted for consistency in error throwing: PR #342
  • Shadowing built-in static functions is now forbidden: PR #351
  • Augmented assignment now throws compilation error for non-integer types: PR #356
  • Built-in function address() now handles parse errors correctly: PR #357
  • The grammar of the unary operators has been fixed, constant and function declarations are prohibited for contracts and at the top level of Tact modules: PR #365
  • Typos in ABI generation: PR #372
  • __tact_load_address_opt code generation: PR #373
  • Empty messages are now correctly converted into cells: PR #380
  • All integer and boolean expressions are now being attempted to be evaluated as constants. Additionally, compile-time errors are thrown for errors encountered during the evaluation of actual constants: PR #352
  • Chaining mutable extension functions now does not throw compilation errors: PR #384

Release contributors