Skip to content

Releases: tact-lang/tact

Release 1.6.3

12 Mar 19:27
ad2224a
Compare
Choose a tag to compare

Compiler configuration

  • Added internalExternalReceiversOutsideMethodsMap config option as part of optimization options to protect potentially unwanted optimization: PR #2370

Standard Library

  • Added forceBasechain() function: PR #2330

Internal infrastructure

  • Removed old parser: PR #2365

Docs

  • Added descriptions for &&=, ||=, >>= and <<= augmented assignment operators: PR #2328
  • Added gas best practices page: PR #2342
  • Documented semantics of empty contract parameters: PR #2346
  • Deprecated Deployable and FactoryDeployable traits in favor of null message body receive() and a cashback() function: PR #2354
  • Documented new exit code and opcode records in TypeScript wrappers: PR #2348

Release contributors

Release 1.6.2

06 Mar 15:31
54f9ee5
Compare
Choose a tag to compare

Language features

  • [fix] Empty init() is not implicitly inserted when empty contract parameters are present: PR #2314

Standard Library

  • Add doc comments for the functions and structs in /libs: PR #2308
  • Add the Slice.skipRef, Slice.skipMaybeRef, Slice.skipBool, Slice.skipCoins, Slice.skipVarUint16, Slice.skipVarInt16, Slice.skipVarUint32, Slice.skipVarInt32, Slice.skipAddress functions: PR #2305

Error reporting

  • [fix] Don't give an error for a small enough type for bounce receiver: PR #2300

TypeScript wrappers

  • [fix] Getters are called by their named and not method_id if it is not explicitly set: PR #2299
  • Contract constructors are public now: PR #2290

Release contributors

Release 1.6.1

04 Mar 19:28
163adfb
Compare
Choose a tag to compare

Language features

  • [fix] The toCell() method called in a receiver on a contract field that is a struct is now handled correctly: PR #2186
  • [fix] Support for multiple wildcard function parameters: PR #2189

Standard Library

  • Add the StateInit.hasSameBasechainAddress function: PR #2187
  • Add doc comments for most functions and structs: PR #2267
  • Add the cashback function: PR #2241

TypeScript wrappers

  • Export message opcodes and exit codes: PR #2081

Code generation

  • Contract load function is inlined: PR #2101

TypeScript third-party API

  • Export more API from index.ts, including AST, context, parser, build pipeline, and typechecker functions: PR #2196

Internal infrastructure

  • Do not add .code to the file names of the generated FunC, Fift, and disassembled Fift: PR #2103
  • Moved benchmarks to separate folder from tests, added CLI utilities for them: PR #2234

Release contributors

Release 1.6.0

28 Feb 15:49
0a6c688
Compare
Choose a tag to compare

Language features

  • Added &&=, ||=, >>= and <<= augmented assignment operators: PR #853
  • Added non-nested let-destructuring of structs and messages: PR #856, PR #964, PR #969
  • Introduced the ability to specify a compile-time method ID expression for getters: PR #922 and PR #932
  • Ability to specify a compile-time message opcode expression: PR #1188
  • The maps methods has been extended with the new replace and replaceGet: PR #941
  • Added support for block statements: PR #1334
  • Added the new codeOf expression to get the code of child contracts: PR #1948
  • Optional types for self argument in extends mutates functions are now allowed: PR #854
  • Stop automatically validate all addresses when receiving/sending messages or using address manipulating functions: PR #1207
  • Removed org.ton.chain.any.v0 interface: PR #1207
  • Don't generate the lazy_deployment_completed getter by default: PR #1717
  • To reduce gas usage, Tact no longer stores the parent contract code in the system cell that holds all the child contract codes used in initOf. Instead, the MYCODE instruction is used: PR #1213
  • Trait fields can now have serialization specifiers: PR #1303
  • Calling methods on null when self is of an optional type is now allowed: PR #1567
  • Constants and trait constants can now depend on each other: PR #1622
  • Support overriding constants and methods of the BaseTrait trait: PR #1591
  • Introduced contract parameters as a replacement for the lazy initialization via init() function: PR #1985, PR #2071
  • [fix] Collisions in getter method ids are now handled and reported properly: PR #875, PR #1052
  • [fix] The as coins map value serialization type is now handled correctly: PR #987
  • [fix] Fixed type checking of foreach loops in trait methods: PR #1017
  • [fix] The sha256() function no longer throws on statically known strings of any length: PR #907
  • [fix] The foreach loop now properly handles the as coins map value serialization type: PR #1186
  • [fix] The typechecker now rejects integer map key types with variable width (coins, varint16, varint32, varuint16, varuint32): PR #1276
  • [fix] The typechecker now rejects as remaining fields in the middle of a contract storage: PR #1301
  • [fix] The override modifier for functions without the corresponding super-function is not allowed: PR #1302
  • [fix] The override modifier for constants without the corresponding super-constant is not allowed: PR #1591
  • [fix] Allowed importing FunC files with .func extension: PR #1451
  • [fix] Bit shift FunC compilation errors for incorrect bit widths: PR #1453
  • [fix] Process else if statements during constant evaluation: PR #1500
  • [fix] Incorrect arithmetic bit shift operations optimizations: PR #1501
  • [fix] Throwing from functions with non-trivial branching in the try statement: PR #1501
  • [fix] Forbid reading and writing to self in contract init function: PR #1482
  • [fix] Support for using a constant within another constant and for the default value of a struct field before constant declaration: PR #1478
  • [fix] Incorrect call generation to a mutation function: PR #1608
  • [fix] Runtime calls to sha256() now work for arbitrary strings with length >= 128: PR #1626
  • [fix] Runtime calls to sha256() now work for arbitrary slices with length >= 128: PR #1936
  • [fix] Forbid traits inherit implicitly from BaseTrait: PR #1591
  • [fix] Check map types for deepEquals method: PR #1718
  • [fix] Generate the fallback receiver for external messages: PR #1926
  • [fix] Destruct statement for struct with nested struct fields: PR #2084

Standard library

  • BREAKING CHANGE: Context.bounced field was replaced with Context.bounceable field: PR #1934
  • Added the message() function to optimize message sending without deploying a contract: PR #1999
  • Added the deploy() function to optimize the deployment of a child contract: PR #1832
  • Introduced the new SendDefaultMode send mode constant: PR #1010
  • Added the VarInt16, VarInt32, VarUint16, VarUint32 integer serialization types and the corresponding storeVarInt16, storeVarUint16, storeVarInt32, storeVarUint32 methods for the Builder type: PR #1186, PR #1274
  • Added loadVarInt16, loadVarUint16, loadVarInt32, loadVarUint32 methods for the Slice type: PR #1667
  • Added new functions in stdlib: Builder.depth, Slice.skipLastBits, Slice.firstBits, Slice.lastBits, Slice.depth, Cell.computeDataSize, Slice.computeDataSize, Cell.depth, curLt, blockLt, setGasLimit, getSeed, setSeed, myCode, sign, divc, muldivc, mulShiftRight, mulShiftRightRound, mulShiftRightCeil, sqrt, Slice.loadMaybeRef, Slice.preloadMaybeRef: PR #986, PR #2040
  • Added new functions Slice.asAddress, Slice.asAddressUnsafe and contractHash: PR #1766
  • Added new functions throwIf and throwUnless and deprecated their aliases nativeThrowIf and nativeThrowUnless: PR #1974
  • Added the BasechainAddress type as a more optimized version of the Address type: PR #2035
  • Added the Slice.hashData() and String.hashData() functions: PR #2039
  • Optimized the emptyCell() and emptySlice() functions: PR #1696
  • The Int.toString function now consumes up to 64% less gas: PR #1837
  • The Int.toFloatString now consumes up to 62% less gas: PR #1956

Error reporting

  • Removed duplicate line and column info from error messages: PR #1362
  • Improved the error message for the missing message field error message for bounced types: PR #1111
  • Improved the error message for the unresolved name error: PR #1595
  • Improved the error message for the unresolved global function error: PR #1610
  • Improved the error message for the extend function without parameters error: PR #1624
  • The error message for invalid type for function argument now shows expected type: PR #1738
  • The error message for the reserved self function parameter now suggests using the extends function modifier: PR #1737
  • Improved the error message for the undefined type error: PR #2005
  • 'The "remainder" field can only be the last field:' inspection now shows location: PR #1300
  • Remove "remainder" from error messages: PR #1699
  • Show better error for fields with a contract type: PR #2011
  • Show stacktrace of a compiler error only in verbose mode: PR #1375
  • Improved error messages for empty bounced() and bounced("string") receivers which are both not allowed: PR [#1998](https://githu...
Read more

Release 1.5.4

04 Feb 18:17
Compare
Choose a tag to compare

[1.5.4] - 2025-02-04

Fixed

  • Allowed importing FunC files with .func extension. Resolves the TOB-TACT-1 issue
  • Issue understandable error on circular trait dependencies. Resolves the TOB-TACT-2 issue
  • Forbade accessing files via symlinks. Resolves the TOB-TACT-3 issue
  • Bit shift FunC compilation errors for incorrect bit widths. Partially resolves the TOB-TACT-5 issue
  • Streamlined renameModuleItems function. Resolves the TOB-TACT-6 issue
  • Documented the parser limitations for nested expressions. Alleviates the TOB-TACT-7 issue
  • Bit shift FunC compilation errors for incorrect bit widths
  • Throwing from functions with non-trivial branching in the try statement

Notes

Handling the Unicode in the Tact grammar as per the TOB-TACT-4 issue has been left unchanged and will be addressed in the future Tact releases.

Release contributors

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