We are excited to announce the release of Cadence v1.0! 🎉
Starting with this release, there will be no more planned breaking changes going forward! 🚀
Reflecting two years of work since the last major milestone in 2022, v0.24 (Secure Cadence), and the culmination of five years of work since the inception of Cadence in 2019, Cadence 1.0 is a milestone marking several significant enhancements. This release introduces full forward compatibility, enhanced composability through Attachments, and significant performance improvements.
We would like to thank all contributors and community members for their great feedback and amazing contributions – this would have not been possible without you! 🙇
To learn more, visit https://flow.com/upgrade/crescendo/cadence-1.
💫 New features
Attachments
Attachments allow developers to extend a struct or resource type (even one that they did not declare) with new functionality and data, without requiring the original author of the type to plan or account for it.
This feature allows developers to easily build on and extend any existing application, significantly improving the composability story of Cadence.
Entitlements and Safe Downcasting
In Cadence 1.0, access control has improved significantly.
Previously, Cadence’s main access-control mechanism, restricted reference types, has been a source of confusion and mistakes for contract developers. Additionally, references could not be downcast, leading to ergonomic issues.
Access control is now handled using a new feature called Entitlements. A reference can now be “entitled” to certain facets of an object.
References can now always be down-casted, the standalone auth modifier is not necessary anymore, and got removed.
Entitled Account Access
Previously, access to accounts was granted wholesale: Users would sign a transaction, authorizing the code of the transaction to perform any kind of operation, for example, write to storage, but also add keys or contracts.
Users had to trust that a transaction would only perform supposed access, e.g. storage access to withdraw tokens, but still had to grant full access, which would allow the transaction to perform other operations.
Dapp developers who require users to sign transactions are now able to request the minimum amount of access to perform the intended operation, i.e. developers are able to follow the principle of least privilege (PoLA).
With the introduction of entitlements, this access is now expressed using entitlements and references.
Access to administrative account operations, such as writing to storage, adding keys, or adding contracts, is now gated by both coarse grained entitlements (e.g. Storage, which grants access to all storage related functions, and Keys, which grants access to all key management functions), as well as fine-grained entitlements (e.g. SaveValue to save a value to storage, or AddKey to add a new key to the account).
Transactions can now request the particular entitlements necessary to perform the operations in the transaction.
View Functions
View functions allow developers to improve the reliability and safety of their programs, and helps them to reason about the effects of their and the programs of others.
Developers can mark their functions as view, which disallows the function from performing state changes. That also makes the intent of functions clear to other programmers, as it allows them to distinguish between functions that change state and ones that do not.
Interface Inheritance
Previously, interfaces could not inherit from other interfaces, which required developers to repeat code. Interface inheritance allows code abstraction and code reuse.
Interfaces can now inherit from other interfaces of the same kind. This makes it easier for developers to structure their conformances and reduces a lot of redundant code.
Capability Controllers
Cadence encourages a capability-based security model. Capabilities are themselves a new concept that most Cadence programmers need to understand.
The existing linking-based capability API has been replaced by a more powerful and easier to use API based on the notion of Capability Controllers. The new API makes the creation of new and the revocation of existing capabilities simpler.
External Mutation Safety
External Mutation Safety prevents a common safety foot-gun, unintentionally granting mutable access to nested data.
The mutability of containers (updating a field of a composite value, key of a map, or index of an array) through references has changed: When a field/element is accessed through a reference, a reference to the accessed inner object is returned, instead of the actual object. These returned references are unauthorized by default, and the author of the object (struct/resource/etc.) can control what operations are permitted on these returned references by using entitlements and entitlement mappings.
Event Definition And Emission In Interfaces
Contract interfaces may now define event types, and these events can be emitted from function conditions and default implementations in those contract interfaces.
Force Destruction of Resources
All resources are now guaranteed to be destroyable.
It was previously possible to panic in the body of a resource or attachment’s destroy method, effectively preventing the destruction or removal of that resource from an account. This could be used as an attack vector by handing people undesirable resources or hydrating resources to make them extremely large or otherwise contain undesirable content.
Contracts may no longer define destroy functions on their resources, and are no longer required to explicitly handle the destruction of resource fields. These will instead be implicitly
destroyed whenever a resource is destroyed.
Additionally, developers may define a ResourceDestroyed event which will be emitted whenever a resource of that type is destroyed.
Inlined and Deduplicated Storage
Cadence uses the Atree library for storing objects. Cadence 1.0 integrates Atree v0.8.0, which inlines and deduplicates stored data, which significantly reduces the amount of data stored and memory need. On Flow Testnet, this reduced memory usage by ~1/2 without sacrificing speed.
For more information, visit the release page https://github.com/onflow/atree/releases/tag/v0.8.0
⚡ Breaking Improvements
Many of the improvements of Cadence 1.0 fundamentally change how Cadence works and how it is used. That also means it was necessary to break existing code to release this version, which guarantees stability (no more planned breaking changes) going forward.
As breaking changes are simply no longer acceptable after Cadence 1.0, we used this last chance to fix and improve Cadence, ensuring it delivers on its promise of being a language that provides security and safety, while also enabling composability and simplicity.
We appreciate that updating existing code can be challenging for developers. However, we believe these improvements are worthwhile, as they make Cadence development significantly more powerful and efficient, enabling developers to write and deploy immutable contracts.
The improvements were intentionally bundled into one release to avoid breaking Cadence programs multiple times.
References to Resource-Kinded Values Get Invalidated When the Referenced Values Are Moved
References are now invalidated if the referenced resource is moved after the reference was taken. The reference is invalidated upon the first move, regardless of the origin and the destination.
Previously, when a reference is taken to a resource, that reference remains valid even if the resource was moved, for example when created and moved into an account, or moved from one account into another.
In other words, references to resources stayed alive forever. This could be a potential safety foot-gun, where one could gain/give/retain unintended access to resources through references.
Conditions No Longer Allow State Changes
In the current version of Cadence, pre-conditions and post-conditions may perform state changes, e.g. by calling a function that performs a mutation. This may result in unexpected behavior, which might lead to bugs.
To make conditions predictable, they are no longer allowed to perform state changes.
Pre-conditions and post-conditions are now considered view contexts, meaning that any operations that would be prevented inside of a view function are also not permitted in a pre-condition or post-condition.
This is to prevent underhanded code wherein a user modifies global or contract state inside of a condition, where they are meant to simply be asserting properties of that state.
Semantics for Variables in For-Loop Statements Got Improved
The behavior of for-in loops improved, so that a new iteration variable is introduced for each iteration.
Previously, the iteration variable of for-in loops was re-assigned on each iteration.
Even though this is a common behavior in many programming languages, it is surprising behavior and a source of bugs.
The behavior was improved to the often assumed/expected behavior of a new iteration variable being introduced for each iteration, which reduces the likelihood for a bug.
Restricted Types Got Replaced with Intersection Types
With the improvements to access control enabled by entitlements and safe down-casting, the restricted type feature is redundant.
Restricted types have been removed. All types, including references, can now be down-casted, restricted types are no longer used for access control. At the same time intersection types got introduced.
Definite Return Analysis Got Improved
The definite return analysis got significantly improved.
Definite return analysis determines if a function always exits, in all possible execution paths, e.g. through a return statement, or by calling a function that never returns, like panic.
This analysis was incomplete and required developers to add workarounds to their code.
Syntax for Function Types Improved
Previously, function types were expressed using a different syntax from function declarations or expressions. The previous syntax was unintuitive for developers, making it hard to write and read code that used function types.
Function types are now expressed using the fun keyword, just like expressions and declarations. This improves readability and makes function types more obvious.
pub and priv Access Modifiers Got Removed
The pub, priv and pub(set) access modifiers got removed from the language, in favor of their more explicit access(all) and access(self) equivalents (for pub and priv, respectively).
This makes access modifiers more uniform and better match the new entitlements syntax.
Naming Rules Got Tightened
Previously, Cadence allowed language keywords (e.g. continue, for, etc.) to be used as names. This had the potential to confuse developers or readers of programs, and could potentially lead to bugs.
Most language keywords are no longer allowed to be used as names. Some keywords are still allowed to be used as names, as they have limited significance within the language.
Nested Type Requirements Got Removed
Nested Type Requirements were a fairly advanced concept of the language. The feature was uncommon in other programming languages and hard to understand.
Just like an interface could require a conforming type to provide a certain field or function, it could also have required the conforming type to provide a nested type.
Deprecated Key Management API Got Removed
Cadence provided two key management APIs:
- The original, low-level API, which worked with RLP-encoded keys
- The improved, high-level API, which works with convenient data types like
PublicKey, HashAlgorithm, and SignatureAlgorithm
The original account key management API, got removed. The improved API was introduced, as the original API was difficult to use and error-prone. The original API was deprecated in early 2022.
Result of toBigEndianBytes() for U?Int(128|256) Fixed
Previously, the implementation of .toBigEndianBytes() was incorrect for the large integer types Int128, Int256, UInt128, and UInt256. This had the potential to confuse developers or readers of programs, and could potentially lead to bugs.
The result for toBigEndianBytes() on ****Int128 and UInt128 is now always an array of 16 bytes, and for Int256 and UInt256 32 bytes.
🐞 Bugfixes
Resource Tracking for Optional Bindings Improved
Resource tracking for optional bindings (”if-let statements”) was fixed.
Previously, resource tracking for optional bindings was implemented incorrectly, leading to errors for valid code. This required developers to add workarounds to their code.
Missing or Incorrect Argument Labels Get Reported
Function calls with missing argument labels and function calls with incorrect argument labels are now reported properly.
Previously, missing or incorrect argument labels of function calls were not reported.
This had the potential to confuse developers or readers of programs, and could potentially lead to bugs.
Incorrect Operators in Reference Expressions Get Reported
Previously, incorrect operators in reference expressions were not reported.
This had the potential to confuse developers or readers of programs, and could potentially lead to bugs.
All changes
💥 Language Breaking Changes
- Remove deprecated key management API by @turbolent in https://github.com/onflow/cadence/pull/1842
- Fix ToBigEndianBytes implementations for U?Int(128|256) by @dreamsmasher in https://github.com/onflow/cadence/pull/1917
- Prevent keywords from being used as identifiers (redux) by @dreamsmasher in https://github.com/onflow/cadence/pull/1937
- Add machinery for parsing and checking
view functions by @dsainati1 in https://github.com/onflow/cadence/pull/1818
- View Enforcement by @dsainati1 in https://github.com/onflow/cadence/pull/1870
- Enforce
view in function conditions by @dsainati1 in https://github.com/onflow/cadence/pull/1871
- Improve reference expressions by @turbolent in https://github.com/onflow/cadence/pull/2010
- Take argument labels into account when declaring members for nested declarations by @turbolent in https://github.com/onflow/cadence/pull/2013
- Improve resource tracking for optional binding by @turbolent in https://github.com/onflow/cadence/pull/2044
- Detect invalidated references statically by @SupunS in https://github.com/onflow/cadence/pull/2037
- Invalidate resource references when the referenced resource is moved by @SupunS in https://github.com/onflow/cadence/pull/1999
- Improve the definite return analysis by @turbolent in https://github.com/onflow/cadence/pull/2090
- Change for-loop variables from per-loop to per-iteration by @turbolent in https://github.com/onflow/cadence/pull/2024
- Implement FLIP #43 (fn type syntax change) by @dreamsmasher in https://github.com/onflow/cadence/pull/2140
- Report preceding identifier in member declaration by @turbolent in https://github.com/onflow/cadence/pull/2231
- Reject cyclic imports during contract deployment by @SupunS in https://github.com/onflow/cadence/pull/2308
- Type checking for entitlement and entitlement mapping declarations by @dsainati1 in https://github.com/onflow/cadence/pull/2404
- Parsing for Entitlements by @dsainati1 in https://github.com/onflow/cadence/pull/2363
- Type checking for entitlement and entitlement mapping declarations by @dsainati1 in https://github.com/onflow/cadence/pull/2441
- Type checking for authorized references by @dsainati1 in https://github.com/onflow/cadence/pull/2405
- Runtime behavior for entitlements by @dsainati1 in https://github.com/onflow/cadence/pull/2421
- Remove
pub, priv and pub(set) access modifiers by @dsainati1 in https://github.com/onflow/cadence/pull/2540
- Change member access semantics by @SupunS in https://github.com/onflow/cadence/pull/2573
- Add builtin entitlements to array/dictionary functions by @SupunS in https://github.com/onflow/cadence/pull/2598
- Allow external mutation for owned values by @SupunS in https://github.com/onflow/cadence/pull/2599
- rename restricted type to intersection type by @dsainati1 in https://github.com/onflow/cadence/pull/2581
- Remove Restricted Type from Cadence by @dsainati1 in https://github.com/onflow/cadence/pull/2596
- Make indexing assignment entitled by @SupunS in https://github.com/onflow/cadence/pull/2664
- Allow default functions to co-exist with conditions in interface conformance by @SupunS in https://github.com/onflow/cadence/pull/2697
- Remove linking based capability API and associated code by @turbolent in https://github.com/onflow/cadence/pull/2595
- Add external mutability improvements by @SupunS in https://github.com/onflow/cadence/pull/2718
- Remove type requirements by @dsainati1 in https://github.com/onflow/cadence/pull/2670
- sort entitlement sets alphabetically when generating strings by @dsainati1 in https://github.com/onflow/cadence/pull/2754
- Account type by @turbolent in https://github.com/onflow/cadence/pull/2648
- Improve and fix static types and their ID and string functions by @turbolent in https://github.com/onflow/cadence/pull/2756
- Add view annotations to newly added array functions by @dsainati1 in https://github.com/onflow/cadence/pull/2771
- Eagerly normalize String and Character values at construction time by @turbolent in https://github.com/onflow/cadence/pull/2781
- Add required
mapping keyword to entitlement mapping usages by @dsainati1 in https://github.com/onflow/cadence/pull/2883
- Restrict
capabilities.publish to account's own capabilities by @turbolent in https://github.com/onflow/cadence/pull/2782
- Remove support for custom destructors by @dsainati1 in https://github.com/onflow/cadence/pull/2789
- Support for parsing default destroy events by @dsainati1 in https://github.com/onflow/cadence/pull/2799
- Type checking for default events by @dsainati1 in https://github.com/onflow/cadence/pull/2812
- Merge destructor removal into stable cadence by @dsainati1 in https://github.com/onflow/cadence/pull/2928
- throw error on the creation of a nested reference by @dsainati1 in https://github.com/onflow/cadence/pull/2965
- New Behavior for Attachments and Entitlements by @dsainati1 in https://github.com/onflow/cadence/pull/2921
- Merge Stable Cadence branch into master by @dsainati1 in https://github.com/onflow/cadence/pull/2971
- Update interface of
revertibleRandom by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2976
- Static check to prevent nested references by @dsainati1 in https://github.com/onflow/cadence/pull/2970
- Remove deprecated domain separation tag from Crypto contract by @turbolent in https://github.com/onflow/cadence/pull/2984
- Implement modulo argument of
revertibleRandom by @tarakby in https://github.com/onflow/cadence/pull/2986
- Reserve more keywords for future proofing by @turbolent in https://github.com/onflow/cadence/pull/3019
- Require explicit type annotation for arguments passed to authorized reference parameters by @turbolent in https://github.com/onflow/cadence/pull/3023
- Unify the requirement for all interface types to have to occur in intersection types by @turbolent in https://github.com/onflow/cadence/pull/3090
- Prevent container mutation while iterating by @SupunS in https://github.com/onflow/cadence/pull/3126
- Allow creating references to nested optionals by @SupunS in https://github.com/onflow/cadence/pull/3132
- remove ability to dereference arrays or dicts of structs by @dsainati1 in https://github.com/onflow/cadence/pull/3221
- Implement FLIP 242 by @dsainati1 in https://github.com/onflow/cadence/pull/3252
- Implement FLIP 262 by @turbolent in https://github.com/onflow/cadence/pull/3247
- Fix optional type ID ambiguity and migrate types by @dsainati1 in https://github.com/onflow/cadence/pull/3272
- Improve supported entitlements and entitlements inferrence in migration by @turbolent in https://github.com/onflow/cadence/pull/3266
- Produce a validator error when contracts would produce unrepresentable entitlements sets in the migration by @dsainati1 in https://github.com/onflow/cadence/pull/3304
- Use parent to determine whether an expression is target of an invocation by @SupunS in https://github.com/onflow/cadence/pull/3340
- Improve static validation of contract/transaction moves by @SupunS in https://github.com/onflow/cadence/pull/3341
- Return a copy for enum-typed members, during member-access via references by @SupunS in https://github.com/onflow/cadence/pull/3357
- Import contracts as references by @SupunS in https://github.com/onflow/cadence/pull/3417
💥 Go API Breaking Chance
- Update randomness runtime interface method by @tarakby in https://github.com/onflow/cadence/pull/2706
- Add the
NewEmulatorBackend method on TestFramework interface by @m-Peter in https://github.com/onflow/cadence/pull/2744
- Add support for injecting types into the environment by @turbolent in https://github.com/onflow/cadence/pull/2811
- Allow different base activations per location in checker and interpreter by @turbolent in https://github.com/onflow/cadence/pull/2887
- Expose checker in analysis by @turbolent in https://github.com/onflow/cadence/pull/3042
- Unexport fields to prevent access by index by @turbolent in https://github.com/onflow/cadence/pull/3290
- Remove Value.ToGoValue and NewValue by @turbolent in https://github.com/onflow/cadence/pull/3291
- Remove access to field slices from composite and interface types by @turbolent in https://github.com/onflow/cadence/pull/3432
⭐ Features
- Add interface inheritance by @SupunS in https://github.com/onflow/cadence/pull/2112
- Attachment Iteration by @dsainati1 in https://github.com/onflow/cadence/pull/2440
- Merge
stable-cadence into feature/entitlements by @dsainati1 in https://github.com/onflow/cadence/pull/2563
- Convert generic container types on upcast by @dsainati1 in https://github.com/onflow/cadence/pull/2567
- Add utility function
ccf.HasMsgPrefix by @fxamacker in https://github.com/onflow/cadence/pull/2609
- Introduce Character.utf8 by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2617
- Introduce built-in mutability entitlements by @SupunS in https://github.com/onflow/cadence/pull/2586
- Allow entitlement mappings to be used in container-typed composite-fields by @SupunS in https://github.com/onflow/cadence/pull/2587
- Add identity entitlement mapping by @SupunS in https://github.com/onflow/cadence/pull/2588
- Allow emit statements in conditions by @turbolent in https://github.com/onflow/cadence/pull/2589
- Provide suggested fixes for argument label errors by @turbolent in https://github.com/onflow/cadence/pull/2619
- Suggest optional chaining by @turbolent in https://github.com/onflow/cadence/pull/2625
- Return a reference with all entitlements, when access through owned values by @SupunS in https://github.com/onflow/cadence/pull/2637
- Introduce
reverse in Fixed/Variable sized Array type by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2654
- Introduce
filter in Fixed/Variable sized Array types by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2678
- Allow declaration of events in interfaces by @dsainati1 in https://github.com/onflow/cadence/pull/2662
- Add a utility method to the
Test.Blockchain struct for moving the blockchain time by @m-Peter in https://github.com/onflow/cadence/pull/2729
- Add capability field to capabilitity controllers by @turbolent in https://github.com/onflow/cadence/pull/2724
- Introduce
map in Fixed/Variable sized Array types by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2737
- Composition of entitlement mappings by @dsainati1 in https://github.com/onflow/cadence/pull/2743
- Allow use of type code generator in any package, refactor RLP and BLS contracts by @turbolent in https://github.com/onflow/cadence/pull/2753
- Add functions on testing framework's blockchain to create/load snapshots by @m-Peter in https://github.com/onflow/cadence/pull/2763
- Add
tryUpdate method to Account.Contracts by @SupunS in https://github.com/onflow/cadence/pull/2769
- Add an exists function, allows checking if capability exists/is published by @turbolent in https://github.com/onflow/cadence/pull/2778
- Introduce
String.join function by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2762
- Introduce
String.split function by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2791
- Check native function declarations by @turbolent in https://github.com/onflow/cadence/pull/2821
- Allow native functions to have type parameters by @turbolent in https://github.com/onflow/cadence/pull/2850
- Introduce
String.replaceAll instance function by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2814
- Introduce
InclusiveRange<T: Integer> type by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2523
- Allow specifying a mapping with source paths for locations in coverage reports by @m-Peter in https://github.com/onflow/cadence/pull/2859
- Add support iterating references to iterables by @SupunS in https://github.com/onflow/cadence/pull/2876
- Allow injection of functions into composite values, refactor PublicKey based on it by @turbolent in https://github.com/onflow/cadence/pull/2878
- add new
revertibleRandom function by @tarakby in https://github.com/onflow/cadence/pull/2896
- Introduce
HashableStruct type to represent Dictionary keys by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2872
- Allow
InclusiveRange<T> in a for-in loop by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2892
- Add account type migration by @SupunS in https://github.com/onflow/cadence/pull/2923
- Add String normalizing migration by @SupunS in https://github.com/onflow/cadence/pull/2937
- Concretize the definition of Primitive type by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2975
- Capability controllers migration by @turbolent in https://github.com/onflow/cadence/pull/2912
- Add state migration for removing all values from private domain by @turbolent in https://github.com/onflow/cadence/pull/2974
- State migration for type values with two or more interfaces by @turbolent in https://github.com/onflow/cadence/pull/2981
- Add getter for field count to composite value by @turbolent in https://github.com/onflow/cadence/pull/3002
- Introduce dereference operator for references by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2982
- Add support for dereferencing optional references by @turbolent in https://github.com/onflow/cadence/pull/3008
- Merge range type feature by @turbolent in https://github.com/onflow/cadence/pull/3009
- Introduce
toVariableSized to ConstantSizedArray type by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/3016
- Allow issuing capability controllers using type values by @turbolent in https://github.com/onflow/cadence/pull/3018
- Entitlements Migration by @dsainati1 in https://github.com/onflow/cadence/pull/2951
- Introduce
toConstantSized to VariableSizedArray type by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/3028
- Add v0.42 parser package under old_parser by @dsainati1 in https://github.com/onflow/cadence/pull/3039
- Use old parser for contract upgrades when legacy upgrade config option is set by @dsainati1 in https://github.com/onflow/cadence/pull/3043
- Allow reding from CSV and querying AST using (Go) JQ by @turbolent in https://github.com/onflow/cadence/pull/3051
- Contract Update Validator by @dsainati1 in https://github.com/onflow/cadence/pull/3069
- Add support for
FunctionType.Purity in CCF codec by @fxamacker in https://github.com/onflow/cadence/pull/3107
- Add support for Attachment and AttachmentType in CCF codec by @fxamacker in https://github.com/onflow/cadence/pull/3131
- Add more support for entitlements (
ReferenceType.Authorization) to CCF codec by @fxamacker in https://github.com/onflow/cadence/pull/3139
- Storage Explorer by @turbolent in https://github.com/onflow/cadence/pull/3147
- add backwards compatibility to old JSON decodings by @ianthpun in https://github.com/onflow/cadence/pull/3276
- Add a command to generate a mermaid diagram by @turbolent in https://github.com/onflow/cadence/pull/3307
- Add Storage.NondeterministicCommit for faster migrations by @fxamacker in https://github.com/onflow/cadence/pull/3348
- Allow types to be removed in contract updates by @dsainati1 in https://github.com/onflow/cadence/pull/3376
- Add command to dump all hard keywords by @turbolent in https://github.com/onflow/cadence/pull/3431
- Add a String.contains function by @turbolent in https://github.com/onflow/cadence/pull/3455
- Add String.index and String.count, fix grapheme boundary functions by @turbolent in https://github.com/onflow/cadence/pull/3456
- Emit events when capability controllers are issued by @turbolent in https://github.com/onflow/cadence/pull/3460
- Emit events for more Capability Controller and capability operations by @turbolent in https://github.com/onflow/cadence/pull/3464
- Add an empty implementation of
runtime.Interface by @turbolent in https://github.com/onflow/cadence/pull/3485
- Add stack traces back to unexpected errors by @turbolent in https://github.com/onflow/cadence/pull/3492
- Handle broken contracts by @turbolent in https://github.com/onflow/cadence/pull/3482
- Merge atree register inlining v1.0 by @turbolent in https://github.com/onflow/cadence/pull/3502
- Add
Type.isRecovered field by @turbolent in https://github.com/onflow/cadence/pull/3505
- Add sema.Access.QualifiedKeyword by @turbolent in https://github.com/onflow/cadence/pull/3552
- Allow validation of
Account.capabilities.get/borrow/publish by @turbolent in https://github.com/onflow/cadence/pull/3590
🛠 Improvements
- Prevent keywords from being used as names in function declarations by @dreamsmasher in https://github.com/onflow/cadence/pull/2067
- Add invalidation info to the invalid reference usage error by @SupunS in https://github.com/onflow/cadence/pull/2096
- Improve view modifier parsing and printing by @turbolent in https://github.com/onflow/cadence/pull/2117
- Make view a soft keyword by @dreamsmasher in https://github.com/onflow/cadence/pull/2121
- Add more purity annotations to built-in and standard library function types by @turbolent in https://github.com/onflow/cadence/pull/2125
- Export all keywords by @turbolent in https://github.com/onflow/cadence/pull/2131
- Add mapping function for types by @dsainati1 in https://github.com/onflow/cadence/pull/2425
- Improve formatting of access modifiers by @turbolent in https://github.com/onflow/cadence/pull/2597
- Improve update tool config by @turbolent in https://github.com/onflow/cadence/pull/2601
- Update integration tests for built-in
Crypto contract by @m-Peter in https://github.com/onflow/cadence/pull/2615
- Use atree orderd map's Has function to test for existence by @turbolent in https://github.com/onflow/cadence/pull/2618
- Improve cyclic import handling by @SupunS in https://github.com/onflow/cadence/pull/2632
- Delegate Cadence composite
Storable() to Atree by @fxamacker in https://github.com/onflow/cadence/pull/2621
- Delegate storage address to Atree by @fxamacker in https://github.com/onflow/cadence/pull/2622
- Temporarily remove deprecations for existing capability API by @m-Peter in https://github.com/onflow/cadence/pull/2673
- Cleanup by @turbolent in https://github.com/onflow/cadence/pull/2692
- Improve view annotations for account type functions by @turbolent in https://github.com/onflow/cadence/pull/2699
- Cadence testing framework improvements by @m-Peter in https://github.com/onflow/cadence/pull/2696
- Clean up capability value by @turbolent in https://github.com/onflow/cadence/pull/2727
- Add purity/view annotations by @turbolent in https://github.com/onflow/cadence/pull/2728
- Entitlements error improvements by @dsainati1 in https://github.com/onflow/cadence/pull/2730
- Allow
moveTime function to accept negative time deltas for going backwards in time by @m-Peter in https://github.com/onflow/cadence/pull/2734
- Give
CompositeTypeHandler higher precedence over getUserCompositeType by @m-Peter in https://github.com/onflow/cadence/pull/2717
- Improve REPL by @turbolent in https://github.com/onflow/cadence/pull/2731
- add suggestions for missing entitlements in access errors by @dsainati1 in https://github.com/onflow/cadence/pull/2736
- Improve error message for overloaded declaration by @PratikDhanave in https://github.com/onflow/cadence/pull/2738
- Improve composite and interface static types by @turbolent in https://github.com/onflow/cadence/pull/2751
- Avoid unnecessary static to sema type conversions for
Type by @turbolent in https://github.com/onflow/cadence/pull/2750
- Make CodesAndPrograms public by @janezpodhostnik in https://github.com/onflow/cadence/pull/2746
- update account type mappings to include identity by @dsainati1 in https://github.com/onflow/cadence/pull/2761
- Add entitlement CopyValue and require it for Account.Storage.copyValue by @turbolent in https://github.com/onflow/cadence/pull/2765
- Better error messages for use of old restricted types by @dsainati1 in https://github.com/onflow/cadence/pull/2764
- Suggested fixes for
pub and priv parser errors by @dsainati1 in https://github.com/onflow/cadence/pull/2767
- Improve capability API by @turbolent in https://github.com/onflow/cadence/pull/2772
- Replace
simpleTypeIDByType with a bimap by @dsainati1 in https://github.com/onflow/cadence/pull/2775
- Use bimaps in the elaboration by @dsainati1 in https://github.com/onflow/cadence/pull/2779
- Refactor runtime test helpers into separate, reusable package by @turbolent in https://github.com/onflow/cadence/pull/2800
- Add helpers to get constructor and initializer function type for composite type by @turbolent in https://github.com/onflow/cadence/pull/2805
- Replace panic with nil return in
newInjectedCompositeFieldsHandler by @m-Peter in https://github.com/onflow/cadence/pull/2808
- Extend type code generator by @turbolent in https://github.com/onflow/cadence/pull/2806
- Refine API of the testing framework by @m-Peter in https://github.com/onflow/cadence/pull/2783
- mjs build for cadence-parser by @nialexsan in https://github.com/onflow/cadence/pull/2851
- Improve test runtime interface by @turbolent in https://github.com/onflow/cadence/pull/2894
- Allow default functions to co-exist with empty function declarations by @SupunS in https://github.com/onflow/cadence/pull/2725
- Refactor resource-reference tracking by @SupunS in https://github.com/onflow/cadence/pull/2916
- Add types to parsed array and dictionary literals by @bluesign in https://github.com/onflow/cadence/pull/2924
- AST improvements by @turbolent in https://github.com/onflow/cadence/pull/2949
- Disallow InclusiveRange<T> if T is a non-leaf integer by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2959
- Improve resource-reference tracking by @SupunS in https://github.com/onflow/cadence/pull/2958
- Generalize the migrations and make common codes re-usable by @SupunS in https://github.com/onflow/cadence/pull/2942
- Improve Account type migration by @SupunS in https://github.com/onflow/cadence/pull/2973
- Make entitlement set access incomparable by @turbolent in https://github.com/onflow/cadence/pull/2972
- Use IsPrimitiveType to check default destructor params by @dsainati1 in https://github.com/onflow/cadence/pull/2980
- Various improvements by @turbolent in https://github.com/onflow/cadence/pull/2979
- Report bespoke error for restricted types parsed as type arguments by @dsainati1 in https://github.com/onflow/cadence/pull/2985
- Use old hash/ID generation to remove keys by @SupunS in https://github.com/onflow/cadence/pull/2987
- Extend pragma expressions by @turbolent in https://github.com/onflow/cadence/pull/2993
- Improve error handling in migrations by @SupunS in https://github.com/onflow/cadence/pull/3001
- Improve type inference by @turbolent in https://github.com/onflow/cadence/pull/3004
- Add type assertion on values passed to
Test.assertEqual by @m-Peter in https://github.com/onflow/cadence/pull/3014
- Improve code related to new InclusiveRange type by @turbolent in https://github.com/onflow/cadence/pull/3017
- Defensively check the dereferenced value is not a resource by @turbolent in https://github.com/onflow/cadence/pull/3010
- Improve parsing for backward compatibility rules by @turbolent in https://github.com/onflow/cadence/pull/3021
- Fix the entitlements migration by @turbolent in https://github.com/onflow/cadence/pull/3026
- Use legacy hashing function for key removal by @SupunS in https://github.com/onflow/cadence/pull/3013
- Allow dereferencing references to containers of non-resources by @turbolent in https://github.com/onflow/cadence/pull/3034
- Generalize static type migrations by @SupunS in https://github.com/onflow/cadence/pull/3033
- Add Unwrap method for ParentErrors by @peterargue in https://github.com/onflow/cadence/pull/3052
- Don't skip invalid entitlements when creating errors by @dsainati1 in https://github.com/onflow/cadence/pull/3056
- Gracefully handle runtime panics in migration by @SupunS in https://github.com/onflow/cadence/pull/3066
- Improve migrations by @turbolent in https://github.com/onflow/cadence/pull/3072
- Improve update script by @turbolent in https://github.com/onflow/cadence/pull/3070
- Add support for migrating path capability values in entitlements and static type migrations by @turbolent in https://github.com/onflow/cadence/pull/3073
- Replace existing tool to fetch network contracts with Flowdiver-based one by @turbolent in https://github.com/onflow/cadence/pull/3058
- Improve member resolvers by @turbolent in https://github.com/onflow/cadence/pull/3092
- Add more information to analysis.Diagnostic by @jribbink in https://github.com/onflow/cadence/pull/3082
- Report a proper error for swapping a resource to itself by @SupunS in https://github.com/onflow/cadence/pull/3101
- Bring back support for decoding published path capabilities by @turbolent in https://github.com/onflow/cadence/pull/3103
- Allow analysis.Load to continue with parsing/checking errors by @jribbink in https://github.com/onflow/cadence/pull/3083
- Improve migration by @turbolent in https://github.com/onflow/cadence/pull/3110
- Improve update tool: Allow releasing a particular branch by @turbolent in https://github.com/onflow/cadence/pull/3124
- Improve Cadence-1.0 contract update checker by @SupunS in https://github.com/onflow/cadence/pull/3111
- Fix location collection in contract update validator by @SupunS in https://github.com/onflow/cadence/pull/3117
- Convert untyped path capability values to ID capability values by @turbolent in https://github.com/onflow/cadence/pull/3125
- Allow registering custom type updating rules in contract update validator by @SupunS in https://github.com/onflow/cadence/pull/3120
- Rewrite owned intersection types in migration by @turbolent in https://github.com/onflow/cadence/pull/3118
- Improve update tool: Fix config, improve documentation by @turbolent in https://github.com/onflow/cadence/pull/3130
- Require added entitlements to be equal to migrated entitlements rather than supertypes by @dsainati1 in https://github.com/onflow/cadence/pull/3134
- Fix migrating values with empty intersection type by @turbolent in https://github.com/onflow/cadence/pull/3138
- Improve migrations by @turbolent in https://github.com/onflow/cadence/pull/3144
- Improve errors in state migration by @turbolent in https://github.com/onflow/cadence/pull/3154
- Improve type inference for authorized references by @dsainati1 in https://github.com/onflow/cadence/pull/3156
- Improve static type and entitlements migrations: Update array/dictionary type directly by @turbolent in https://github.com/onflow/cadence/pull/3158
- Optimize storage migration: Allow skipping of values by @turbolent in https://github.com/onflow/cadence/pull/3157
- Handle legacy type getting converted to intersection type by @turbolent in https://github.com/onflow/cadence/pull/3164
- Improve update tool by @turbolent in https://github.com/onflow/cadence/pull/3163
- Improve migration by @turbolent in https://github.com/onflow/cadence/pull/3169
- Meter computation for standard-library functions by @SupunS in https://github.com/onflow/cadence/pull/3172
- Optimize string migration: only return new value if needed by @turbolent in https://github.com/onflow/cadence/pull/3173
- Improve update tool by @turbolent in https://github.com/onflow/cadence/pull/3175
- Relax interface conformance changes in contract update validator by @SupunS in https://github.com/onflow/cadence/pull/3184
- Make the use of custom contract update rules mandatory, if exists by @SupunS in https://github.com/onflow/cadence/pull/3193
- Allow removal of enum declarations from contract interfaces for C1.0 upgrade by @dsainati1 in https://github.com/onflow/cadence/pull/3197
- Name storage migration, include in error by @turbolent in https://github.com/onflow/cadence/pull/3198
- Simplify AuthorizationMismatchError by @SupunS in https://github.com/onflow/cadence/pull/3201
- Improve Cadence 1.0 state migration by @turbolent in https://github.com/onflow/cadence/pull/3211
- Use atree readonly iterators when mutation of values is not needed by @fxamacker in https://github.com/onflow/cadence/pull/3170
- Check resource loss in
CompositeValue.RemoveField by @turbolent in https://github.com/onflow/cadence/pull/3224
- Atree register inlining for v1.0 by @turbolent in https://github.com/onflow/cadence/pull/3048
- Check resource loss in all variable assignments by @turbolent in https://github.com/onflow/cadence/pull/3226
- Introduce a dedicated error for unreferenced slabs and expose the IDs by @turbolent in https://github.com/onflow/cadence/pull/3231
- Improve atree register inlining v1.0 by @turbolent in https://github.com/onflow/cadence/pull/3230
- Move conflicting dictionary key to new dictionary in unique storage path by @turbolent in https://github.com/onflow/cadence/pull/3227
- Improve dictionary key conflict handling by @turbolent in https://github.com/onflow/cadence/pull/3240
- Improve supported entitlements by @turbolent in https://github.com/onflow/cadence/pull/3251
- Fix staged contracts report printer - update JSON field names by @j1010001 in https://github.com/onflow/cadence/pull/3262
- Improve conformance mismatch error by @turbolent in https://github.com/onflow/cadence/pull/3274
- Further improve conformance error by including location by @turbolent in https://github.com/onflow/cadence/pull/3277
- Remove unused parameter by @turbolent in https://github.com/onflow/cadence/pull/3278
- Cache results of entitlement type conversion by @dsainati1 in https://github.com/onflow/cadence/pull/3232
- Add additional fields to account key added event by @rrrkren in https://github.com/onflow/cadence/pull/3204
- Add runtime check for transaction value moves by @SupunS in https://github.com/onflow/cadence/pull/3298
- Add predicate function and test for atree's PersistentSlabStorage.FixLoadedBrokenReferences by @turbolent in https://github.com/onflow/cadence/pull/3300
- Make static type cache an interface by @turbolent in https://github.com/onflow/cadence/pull/3315
- Improve dictionary migration by @turbolent in https://github.com/onflow/cadence/pull/3318
- Make migration error stacktrace configurable by @SupunS in https://github.com/onflow/cadence/pull/3322
- Add/improve caching in static type and entitlements migration by @turbolent in https://github.com/onflow/cadence/pull/3329
- Allow construction of paths with syntactically invalid identifiers by @turbolent in https://github.com/onflow/cadence/pull/3338
- Add invalidation for storage references by @SupunS in https://github.com/onflow/cadence/pull/3343
- Fix string formatting for values by @turbolent in https://github.com/onflow/cadence/pull/3370
- Update the storage explorer to the latest version of flow-go by @turbolent in https://github.com/onflow/cadence/pull/3374
- Forbid interface removals by @dsainati1 in https://github.com/onflow/cadence/pull/3380
- Improve dictionary value migration by @turbolent in https://github.com/onflow/cadence/pull/3381
- Decrease move operator precedence relative to cast operators by @dsainati1 in https://github.com/onflow/cadence/pull/3368
- Improve dictionary key migration by @turbolent in https://github.com/onflow/cadence/pull/3386
- Remove stacktrace from errors by @SupunS in https://github.com/onflow/cadence/pull/3392
- Improve update tool by @turbolent in https://github.com/onflow/cadence/pull/3395
- Cache results of static types migration and entitlements migration by @turbolent in https://github.com/onflow/cadence/pull/3396
- Put feature that allows type removals in contract updates behind a feature flag, disabled by default by @turbolent in https://github.com/onflow/cadence/pull/3410
- Also migrate path-capability and account-capability storage maps by @turbolent in https://github.com/onflow/cadence/pull/3411
- Ensure contracts cannot be borrowed with an authorization by @turbolent in https://github.com/onflow/cadence/pull/3421
- Improve dump-builtin-types command: Handle parameterized types by @turbolent in https://github.com/onflow/cadence/pull/3425
- Improve InclusiveRange type by @turbolent in https://github.com/onflow/cadence/pull/3426
- Improve the commit-based version handling in the update tool by @turbolent in https://github.com/onflow/cadence/pull/3440
- Improve update tool by @turbolent in https://github.com/onflow/cadence/pull/3441
- Improve handling of releases in update tool by @turbolent in https://github.com/onflow/cadence/pull/3442
- Allow borrowing of capability with subtype by @turbolent in https://github.com/onflow/cadence/pull/3449
- Simplify subtyping by @turbolent in https://github.com/onflow/cadence/pull/3447
- Speed up update tool by @turbolent in https://github.com/onflow/cadence/pull/3468
- Changed data type of account key index to uin32 by @janezpodhostnik in https://github.com/onflow/cadence/pull/3465
- Improve Cadence composite to Go struct decoding by @turbolent in https://github.com/onflow/cadence/pull/3469
- Improve intersected type error message by @turbolent in https://github.com/onflow/cadence/pull/3483
- Bring back members of path capability value by @turbolent in https://github.com/onflow/cadence/pull/3486
- Migrate capability values targeting storage paths by @turbolent in https://github.com/onflow/cadence/pull/3503
- Improve storage capability migration by @turbolent in https://github.com/onflow/cadence/pull/3516
- Infer missing borrow type for storage capabilities by @SupunS in https://github.com/onflow/cadence/pull/3519
- Improve borrow type inferrence for storage path capabilities by @turbolent in https://github.com/onflow/cadence/pull/3520
- Improve storage path capability migration reporting by @SupunS in https://github.com/onflow/cadence/pull/3522
- Add capability stored path info to the report by @SupunS in https://github.com/onflow/cadence/pull/3524
- Fix contract update validation: Check updated contract name by @turbolent in https://github.com/onflow/cadence/pull/3530
- Check if CBOR tag number is reserved by atree before using it to encode Cadence values by @fxamacker in https://github.com/onflow/cadence/pull/3532
- Improve address decoding error by @turbolent in https://github.com/onflow/cadence/pull/3560
🐞 Bug Fixes
- Fix test matcher by @turbolent in https://github.com/onflow/cadence/pull/2130
- Update Stable Cadence branch, fix view function expression parsing by @turbolent in https://github.com/onflow/cadence/pull/2141
- Transaction pre-conditions must also be
view by @dsainati1 in https://github.com/onflow/cadence/pull/2171
- fix view parsing for expressions by @dreamsmasher in https://github.com/onflow/cadence/pull/2164
- Add attachment keywords to keyword lists by @dsainati1 in https://github.com/onflow/cadence/pull/2499
- Fix crash on entitlement mappings with empty outputs by @dsainati1 in https://github.com/onflow/cadence/pull/2592
- Populate
Message, LocationRange fields for AssertionError on Test.expect function by @m-Peter in https://github.com/onflow/cadence/pull/2607
- Fix data race in sema/type_test.go by @fxamacker in https://github.com/onflow/cadence/pull/2624
- Fix potential data races by @turbolent in https://github.com/onflow/cadence/pull/2633
- Add support for max parameter count (internal #128) by @SupunS in https://github.com/onflow/cadence/pull/2656
- Remove spurious resource loss errors (internal #130) by @SupunS in https://github.com/onflow/cadence/pull/2657
- Fix checking of reference expressions involving optionals (internal #129) by @SupunS in https://github.com/onflow/cadence/pull/2658
- Prevent recursive transfers (internal #133) by @SupunS in https://github.com/onflow/cadence/pull/2659
- Handle destroyed optional references by @SupunS in https://github.com/onflow/cadence/pull/2661
- Make more
AuthAccount functions view by @dsainati1 in https://github.com/onflow/cadence/pull/2666
- Fix positioning of default function conflict errors by @dsainati1 in https://github.com/onflow/cadence/pull/2665
- Fix entitlement memory metering by @SupunS in https://github.com/onflow/cadence/pull/2668
- Fix interface inheritance for nested interfaces by @dsainati1 in https://github.com/onflow/cadence/pull/2674
- Update reference invalidation check to consider optional resources by @SupunS in https://github.com/onflow/cadence/pull/2680
- Wrap host env errors with external errors by @SupunS in https://github.com/onflow/cadence/pull/2683
- Fix interface member inheritance by @dsainati1 in https://github.com/onflow/cadence/pull/2686
- Fix storage iteration and error misclassification by @SupunS in https://github.com/onflow/cadence/pull/2676
- Fix error on reference creation with invalid type by @SupunS in https://github.com/onflow/cadence/pull/2687
- Invalidate references to nested resources upon the move of the outer resource by @SupunS in https://github.com/onflow/cadence/pull/2460
- Hex encode user input in error to avoid invalid UTF-8 by @fxamacker in https://github.com/onflow/cadence/pull/2704
- Use thread safe data structures for entitlement maps by @dsainati1 in https://github.com/onflow/cadence/pull/2716
- Properly meter the creation of entitlement static types by @dsainati1 in https://github.com/onflow/cadence/pull/2723
- Fix doc (pretty printing) for function declaration without function block by @turbolent in https://github.com/onflow/cadence/pull/2774
- Port internal #143 by @turbolent in https://github.com/onflow/cadence/pull/2793
- Properly check removed expression for resource loss by @dsainati1 in https://github.com/onflow/cadence/pull/2798
- Fix Test framework's TestAccount's type name by @SupunS in https://github.com/onflow/cadence/pull/2802
- Fix capability controller deletion by @turbolent in https://github.com/onflow/cadence/pull/2788
- meter and deduplicate included entitlement relations by @dsainati1 in https://github.com/onflow/cadence/pull/2810
- Use kr/pretty instead of go-test/deep to prevent empty diffs, remove gocap by @turbolent in https://github.com/onflow/cadence/pull/2819
- properly access-check optional chaining with entitlements by @dsainati1 in https://github.com/onflow/cadence/pull/2825
- Check
before statements in view contexts by @dsainati1 in https://github.com/onflow/cadence/pull/2835
- Skip adding malformed entitlement relations to maps by @dsainati1 in https://github.com/onflow/cadence/pull/2838
- Require full codomain of map when assigning to mapped field by @dsainati1 in https://github.com/onflow/cadence/pull/2840
- Port internal 141: Fix swapping in resource array by @turbolent in https://github.com/onflow/cadence/pull/2844
- Port internal 144: Fix swap statement evaluation by @turbolent in https://github.com/onflow/cadence/pull/2845
- Port internal fix 145: Prevent re-deploy in same transaction by @turbolent in https://github.com/onflow/cadence/pull/2846
- Properly set base on loaded attachments during attachment iteration by @dsainati1 in https://github.com/onflow/cadence/pull/2847
- Fix memory metering for loading stored values by @turbolent in https://github.com/onflow/cadence/pull/2509
- [stable-cadence] Fix field assignment via references by @SupunS in https://github.com/onflow/cadence/pull/2868
- Entitlement mapping escape fixes by @dsainati1 in https://github.com/onflow/cadence/pull/2877
- Fix string atree value comparison: handle storage as slab by @turbolent in https://github.com/onflow/cadence/pull/2895
- Removing an attachment is an impure operation by @dsainati1 in https://github.com/onflow/cadence/pull/2890
- [v0.42] Prevent nested contract deployments by @SupunS in https://github.com/onflow/cadence/pull/2904
- Prevent nested contract deployments by @SupunS in https://github.com/onflow/cadence/pull/2902
- [v0.42] Fix nested resource moves by @SupunS in https://github.com/onflow/cadence/pull/2930
- [v0.42] Fix AuthAccount creation by @SupunS in https://github.com/onflow/cadence/pull/2932
- Fix nested resource moves by @SupunS in https://github.com/onflow/cadence/pull/2931
- Fix AuthAccount creation by @SupunS in https://github.com/onflow/cadence/pull/2933
- Fix transaction resource-typed field move by @SupunS in https://github.com/onflow/cadence/pull/2938
- Include interface conformances when computing the supported entitlements of an interface by @dsainati1 in https://github.com/onflow/cadence/pull/2946
- Port bug fixes from
v0.42.5-patch.1 by @SupunS in https://github.com/onflow/cadence/pull/2955
- Port bug fixes from v0.42.5-patch.1 by @SupunS in https://github.com/onflow/cadence/pull/2956
- Fix GetNativeCompositeValueComputedFields by @turbolent in https://github.com/onflow/cadence/pull/2977
- Statically prevent referenced-typed subexpressions in default arguments to destroy events by @dsainati1 in https://github.com/onflow/cadence/pull/2996
- Prevent use of
base variable in default destroy event arguments outside attachments by @dsainati1 in https://github.com/onflow/cadence/pull/2999
- Prevent use of non-attachment type names in default arguments by @dsainati1 in https://github.com/onflow/cadence/pull/3000
- prevent creation of nested storage references by @dsainati1 in https://github.com/onflow/cadence/pull/3020
- Fix
revertibleRandom with module test by @turbolent in https://github.com/onflow/cadence/pull/3025
- Remove Insert-entitled access for toVariableSized by @turbolent in https://github.com/onflow/cadence/pull/3031
- Fix gaps in migrations by @turbolent in https://github.com/onflow/cadence/pull/3036
- Remove backticks around suggested fixes for parser errors by @jribbink in https://github.com/onflow/cadence/pull/3046
- Handle optional storage references by @turbolent in https://github.com/onflow/cadence/pull/3064
- Fix entitlements migration by @turbolent in https://github.com/onflow/cadence/pull/3065
- Remove reference to
destroy from sema.UnknownSpecialFunctionError by @jribbink in https://github.com/onflow/cadence/pull/3074
- Port Validator fix to master by @dsainati1 in https://github.com/onflow/cadence/pull/3078
- Fix intersection type migration: also migrate interface types by @turbolent in https://github.com/onflow/cadence/pull/3084
- Make capability ID mapping thread-safe by @turbolent in https://github.com/onflow/cadence/pull/3085
- Allow contract interface types in intersection types by @turbolent in https://github.com/onflow/cadence/pull/3089
- Consider inherited interfaces when checking for member clashes in intersection types by @turbolent in https://github.com/onflow/cadence/pull/3093
- Fix FunctionType.Equal() to check Purity equality by @fxamacker in https://github.com/onflow/cadence/pull/3105
- Fix EntitlementSetAuthorization.Equal() by making it ignore order of elements by @fxamacker in https://github.com/onflow/cadence/pull/3137
- Migrate static types of arrays and dictionaries by @SupunS in https://github.com/onflow/cadence/pull/3141
- Fix location ranges by @turbolent in https://github.com/onflow/cadence/pull/3151
- Produce a better error message when failing to reference type-erased references by @dsainati1 in https://github.com/onflow/cadence/pull/3150
- Make SupportedEntitlements thread safe by @dsainati1 in https://github.com/onflow/cadence/pull/3152
- Check invalidation of the looped reference by @SupunS in https://github.com/onflow/cadence/pull/3160
- Fix intersection type's legacy type getting converted to intersection type by @turbolent in https://github.com/onflow/cadence/pull/3166
- Implicitly track composite reference in attachment iteration by @dsainati1 in https://github.com/onflow/cadence/pull/3168
- Handle unparameterized Capability static types by @turbolent in https://github.com/onflow/cadence/pull/3196
- Fix address conversion by @turbolent in https://github.com/onflow/cadence/pull/3195
- Only encode reference static type in legacy format if it was decoded as such by @turbolent in https://github.com/onflow/cadence/pull/3199
- Fix conformance checking for enums in contract update validator by @SupunS in https://github.com/onflow/cadence/pull/3191
- Properly handle
Never type argument to Capabilities.get by @dsainati1 in https://github.com/onflow/cadence/pull/3203
- Add
TypeArgumentsChecks to certain builtin functions by @dsainati1 in https://github.com/onflow/cadence/pull/3208
- Proper type checking for resource use after validation on two-value transfers by @dsainati1 in https://github.com/onflow/cadence/pull/3176
- Convert references based on borrow type by @SupunS in https://github.com/onflow/cadence/pull/3213
- Fix migration of built-in types by @turbolent in https://github.com/onflow/cadence/pull/3205
- Resource Reference Invalidation Improvements by @dsainati1 in https://github.com/onflow/cadence/pull/3181
- Port fixes of v0.42.8-patch.4 by @turbolent in https://github.com/onflow/cadence/pull/3079
- Fix built-in type import by @turbolent in https://github.com/onflow/cadence/pull/3212
- Fix dereferencing non-reference type by @turbolent in https://github.com/onflow/cadence/pull/3216
- Handle missing type arguments in type argument checks by @turbolent in https://github.com/onflow/cadence/pull/3234
- Clear
inAssignment when recursing into subexpressions by @dsainati1 in https://github.com/onflow/cadence/pull/3236
- Introduce special self-variable by @SupunS in https://github.com/onflow/cadence/pull/3235
- Fix type indexing resource loss by @SupunS in https://github.com/onflow/cadence/pull/3257
- Fix resource-loss check in dictionary set-key by @SupunS in https://github.com/onflow/cadence/pull/3267
- Handle account types in contract update validator by @SupunS in https://github.com/onflow/cadence/pull/3284
- Fix restricted typed field updates by @SupunS in https://github.com/onflow/cadence/pull/3283
- Fix Cadence 1.0 migration of dictionary values when using atree inlined data by @fxamacker in https://github.com/onflow/cadence/pull/3316
- Remove invalid ID capability error by @turbolent in https://github.com/onflow/cadence/pull/3325
- Fix borrowing of contract interface by @turbolent in https://github.com/onflow/cadence/pull/3327
- Port bug fixes by @SupunS in https://github.com/onflow/cadence/pull/3331
- Handle missing interfaces in Cadence 1.0 contract update validator by @turbolent in https://github.com/onflow/cadence/pull/3337
- Check dictionary keys when checking the ability for dereferencing by @SupunS in https://github.com/onflow/cadence/pull/3339
- Wrap host-function typed member-values with a bound-function by @SupunS in https://github.com/onflow/cadence/pull/3342
- Fix restricted type checking in contract-update-validator by @SupunS in https://github.com/onflow/cadence/pull/3352
- Add deprecated path Capability into backwards compability by @ianthpun in https://github.com/onflow/cadence/pull/3373
- Remove incorrect caching from migrations by @turbolent in https://github.com/onflow/cadence/pull/3375
- Fix error message by @turbolent in https://github.com/onflow/cadence/pull/3379
- Don't short circuit references on member access when entitlements are involved by @dsainati1 in https://github.com/onflow/cadence/pull/3387
- Prevent storage reference to another reference by @turbolent in https://github.com/onflow/cadence/pull/3404
- Add access top type to model inaccessible access for identity maps by @dsainati1 in https://github.com/onflow/cadence/pull/3406
- Fix JSON output by @turbolent in https://github.com/onflow/cadence/pull/3413
- Improve parsing of commit from Go's pseudo-version in update tool by @turbolent in https://github.com/onflow/cadence/pull/3418
- Simplify nil-coalescing checking by @SupunS in https://github.com/onflow/cadence/pull/3423
- Fix toConstantSized by @turbolent in https://github.com/onflow/cadence/pull/3446
- Fix String.split by @turbolent in https://github.com/onflow/cadence/pull/3457
- Fix String.replaceAll by @turbolent in https://github.com/onflow/cadence/pull/3458
- Fix account link migration by @turbolent in https://github.com/onflow/cadence/pull/3461
- Fix data races caused by empty string singleton by @turbolent in https://github.com/onflow/cadence/pull/3481
- Fix supertype inference by @SupunS in https://github.com/onflow/cadence/pull/3493
- Return user error when CCF encodes attachment field by @fxamacker in https://github.com/onflow/cadence/pull/3494
- Fix EntitlementDeclaration EndPos by @jribbink in https://github.com/onflow/cadence/pull/3498
- Fix migration of storage path capabilities by @turbolent in https://github.com/onflow/cadence/pull/3511
- Report and skip storage caps with missing borrow type by @SupunS in https://github.com/onflow/cadence/pull/3514
- Avoid conversion from sema-type to StaticType in storage cap migration by @SupunS in https://github.com/onflow/cadence/pull/3517
- Add support for exporting unmigrated path capabilities by @SupunS in https://github.com/onflow/cadence/pull/3538
- Handle invalid index-expressions in view assignment by @SupunS in https://github.com/onflow/cadence/pull/3539
- Make capabilities iteration ordered by @SupunS in https://github.com/onflow/cadence/pull/3542
- Fix program recovery by @turbolent in https://github.com/onflow/cadence/pull/3548
- Fix Cadence Parser NPM Package by @bluesign in https://github.com/onflow/cadence/pull/3551
- Fix contract update error when old program has errors by @turbolent in https://github.com/onflow/cadence/pull/3554
- Handle unmigrated path capabilities and path links in Account.capabilities functions by @turbolent in https://github.com/onflow/cadence/pull/3562
- Fix runtime type of Account_Inbox_claim() function by @SupunS in https://github.com/onflow/cadence/pull/3592
- Fix interpreting default functions by @SupunS in https://github.com/onflow/cadence/pull/3591
🧪 Testing
- Add tests for entitlement inheritance between interfaces by @dsainati1 in https://github.com/onflow/cadence/pull/2564
- Add cyclic imports tests by @SupunS in https://github.com/onflow/cadence/pull/2629
- Add test for borrowing as inherited interface by @SupunS in https://github.com/onflow/cadence/pull/2722
- Add test for attachment on built-in composite by @turbolent in https://github.com/onflow/cadence/pull/2732
- Add test for inner container mutation while iterating outer by @SupunS in https://github.com/onflow/cadence/pull/2733
- Add tests for invalidation of references created with index/field-access by @SupunS in https://github.com/onflow/cadence/pull/2758
- Add test for container mutation while iterating by @SupunS in https://github.com/onflow/cadence/pull/2960
- Test type order insignificance by @turbolent in https://github.com/onflow/cadence/pull/2967
- Test usage of potentially broken types by @turbolent in https://github.com/onflow/cadence/pull/3030
- Add tests for using keywords as field names by @SupunS in https://github.com/onflow/cadence/pull/3057
- Minor improvement in a
revertibleRandom test by @tarakby in https://github.com/onflow/cadence/pull/3060
- Add tests for migrating reference to optional type by @SupunS in https://github.com/onflow/cadence/pull/3123
- Add test for nested container value migration by @SupunS in https://github.com/onflow/cadence/pull/3142
- Add a test case for non-public interface members by @turbolent in https://github.com/onflow/cadence/pull/3260
- Add test for untyped optional nested-reference creation by @SupunS in https://github.com/onflow/cadence/pull/3317
- Add reproducer as test for Cadence 1.0 migration issue #3288 by @fxamacker in https://github.com/onflow/cadence/pull/3314
- Add back transaction
execute tests by @SupunS in https://github.com/onflow/cadence/pull/3345
- Add some more tests for string functions by @turbolent in https://github.com/onflow/cadence/pull/3453
- Update Fungible token transfer benchmark by @SupunS in https://github.com/onflow/cadence/pull/3471
- Add checker tests for nil-coalesce type inference by @SupunS in https://github.com/onflow/cadence/pull/3495
- Add regression tests for nil-coalescing bug by @turbolent in https://github.com/onflow/cadence/pull/3553
- Smoke test update of enum key in dictionary by @turbolent in https://github.com/onflow/cadence/pull/3556
- Add contract-update test for removing a field from nested resource by @SupunS in https://github.com/onflow/cadence/pull/3559
- Add test for modifying events during contract updates by @SupunS in https://github.com/onflow/cadence/pull/3561
📖 Documentation
- Add meeting notes for 2023-08-15 by @turbolent in https://github.com/onflow/cadence/pull/2740
- Add notes for 2023-09-12 meeting by @turbolent in https://github.com/onflow/cadence/pull/2780
- Add meeting notes for 2023-11-15 by @turbolent in https://github.com/onflow/cadence/pull/2944
- Fixes links to new docs site by @joshuahannan in https://github.com/onflow/cadence/pull/3075
- Improve development documentation by @turbolent in https://github.com/onflow/cadence/pull/3189
- Update staged-contracts-report-2024-06-12T13-03-00Z-testnet.md by @vishalchangrani in https://github.com/onflow/cadence/pull/3429
- Remove mention of feature branch by @chasefleming in https://github.com/onflow/cadence/pull/3444
- add 2024-07-03 staged contracts report by @zhangchiqing in https://github.com/onflow/cadence/pull/3450
- add staged contracts report 07-10 by @zhangchiqing in https://github.com/onflow/cadence/pull/3462
- add root block for migration 07-10 by @zhangchiqing in https://github.com/onflow/cadence/pull/3463
- Add mainnet migration report for Aug 21 by @j1010001 in https://github.com/onflow/cadence/pull/3547
- Staged contracts report Aug 27 by @j1010001 in https://github.com/onflow/cadence/pull/3557
Other Changes
- Merge master into Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/1922
- Merge master to Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/1943
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2014
- Sync Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2051
- Sync Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2089
- Refactor reference tests by @SupunS in https://github.com/onflow/cadence/pull/2086
- Sync Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2098
- Sync stable cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2111
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2124
- Clean up function types and type annotations by @turbolent in https://github.com/onflow/cadence/pull/2126
- Sync Stable Cadence branch by @turbolent in https://github.com/onflow/cadence/pull/2150
- Update Stable Cadence feature branches in downstream dependencies by @turbolent in https://github.com/onflow/cadence/pull/2158
- Merge master into Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2189
- Sync master to Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2219
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2230
- Optimize keyword testing by @turbolent in https://github.com/onflow/cadence/pull/2295
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2311
- backport #2302 to stable cadence (fix docstring parsing after functions) by @dreamsmasher in https://github.com/onflow/cadence/pull/2329
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2333
- Sync Stable Cadence by @dsainati1 in https://github.com/onflow/cadence/pull/2367
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2402
- Sync stable-cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2455
- Sync stable-cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2477
- Merge master into Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2513
- Merge
release/v0.39.12 to master by @github-actions in https://github.com/onflow/cadence/pull/2591
- Merge Entitlements feature branch into Stable Cadence by @dsainati1 in https://github.com/onflow/cadence/pull/2594
- Merge master to Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2593
- Sync mutability restrictions branch with stable-cadence by @SupunS in https://github.com/onflow/cadence/pull/2600
- Add support for forks to compatibility check by @turbolent in https://github.com/onflow/cadence/pull/2612
- Set permissions in backward compatibility check by @turbolent in https://github.com/onflow/cadence/pull/2613
- Merge
release/v0.39.13-stable-cadence to feature/stable-cadence by @github-actions in https://github.com/onflow/cadence/pull/2611
- Don't skip benchmark for forks by @turbolent in https://github.com/onflow/cadence/pull/2616
- Add mailmap by @turbolent in https://github.com/onflow/cadence/pull/2628
- Use diff command to generate diff by @turbolent in https://github.com/onflow/cadence/pull/2636
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2634
- Bump version to
v0.39.14 by @SupunS in https://github.com/onflow/cadence/pull/2660
- Sync stable cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2667
- Rename mutability entitlements by @SupunS in https://github.com/onflow/cadence/pull/2690
- Update to Go 1.20, improve random value generation by @turbolent in https://github.com/onflow/cadence/pull/2694
- Merge
release/v0.40.0 to master by @github-actions in https://github.com/onflow/cadence/pull/2695
- Update storage iteration value check and related tests by @SupunS in https://github.com/onflow/cadence/pull/2702
- Sync Stable Cadence branch with master by @turbolent in https://github.com/onflow/cadence/pull/2701
- Update mutability restrictions feature branch by @turbolent in https://github.com/onflow/cadence/pull/2714
- Add
cadence-tools/test as a dependency to the language server by @SupunS in https://github.com/onflow/cadence/pull/2742
- Sync
feature/range-type branch with master by @SupunS in https://github.com/onflow/cadence/pull/2747
- Sync Stable Cadence feature branch by @turbolent in https://github.com/onflow/cadence/pull/2755
- Clean up intersection types by @turbolent in https://github.com/onflow/cadence/pull/2757
- Merge
master into Stable Cadence by @dsainati1 in https://github.com/onflow/cadence/pull/2770
- Merge
release/v0.41.0 to master by @github-actions in https://github.com/onflow/cadence/pull/2786
- Merge
release/v0.41.1 to master by @github-actions in https://github.com/onflow/cadence/pull/2795
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2796
- Assign issues to group by @turbolent in https://github.com/onflow/cadence/pull/2797
- Remove unused composite type to interface type conversion function by @turbolent in https://github.com/onflow/cadence/pull/2804
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2820
- Merge
release/v0.42.0 to master by @github-actions in https://github.com/onflow/cadence/pull/2852
- Sync Stable Cadence by @turbolent in https://github.com/onflow/cadence/pull/2854
- Add computation metering to the new stdlib functions by @SupunS in https://github.com/onflow/cadence/pull/2880
- Use
ComputationKindLoop for internal array-value iterations by @SupunS in https://github.com/onflow/cadence/pull/2891
- Merge
release/v0.42.1 to master by @github-actions in https://github.com/onflow/cadence/pull/2893
- Add meeting notes for 2023-10-24 by @turbolent in https://github.com/onflow/cadence/pull/2897
- Sync stable cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2899
- Merge
release/v0.42.2 to v0.42 by @github-actions in https://github.com/onflow/cadence/pull/2905
- [v0.42] Port adding new
revertibleRandom function by @SupunS in https://github.com/onflow/cadence/pull/2910
- Merge
release/v0.42.3 to v0.42 by @github-actions in https://github.com/onflow/cadence/pull/2911
- Update tests for
Crypto contract to the latest testing framework API by @m-Peter in https://github.com/onflow/cadence/pull/2856
- Remove
StandardLibraryHandler method from TestFramework interface by @m-Peter in https://github.com/onflow/cadence/pull/2927
- Merge
release/v0.42.4 to v0.42 by @github-actions in https://github.com/onflow/cadence/pull/2934
- Fix Semgrep by @turbolent in https://github.com/onflow/cadence/pull/2939
- Merge v0.42 into master by @turbolent in https://github.com/onflow/cadence/pull/2940
- Merge
release/v0.42.5 to v0.42 by @github-actions in https://github.com/onflow/cadence/pull/2941
- Sync stable-cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2964
- Remove unsafeRandom by @turbolent in https://github.com/onflow/cadence/pull/2966
- Sync stable-cadence branch with master by @SupunS in https://github.com/onflow/cadence/pull/2968
- Cleanup reference tracking by @SupunS in https://github.com/onflow/cadence/pull/2969
- Make checkParameterizedTypeIsInstantiated recursive by @darkdrag00nv2 in https://github.com/onflow/cadence/pull/2915
- Sync
feature/range-type branch with master by @SupunS in https://github.com/onflow/cadence/pull/2995
- Merge
release/v1.0.0-preview.2 to master by @github-actions in https://github.com/onflow/cadence/pull/3024
- Upgrade
exp package version by @tarakby in https://github.com/onflow/cadence/pull/3027
- Merge
release/v1.0.0-M3 to master by @github-actions in https://github.com/onflow/cadence/pull/3041
- Merge
release/v1.0.0-M4 to master by @github-actions in https://github.com/onflow/cadence/pull/3049
- Merge
release/v1.0.0-M5 to master by @github-actions in https://github.com/onflow/cadence/pull/3067
- Merge
release/v1.0.0-M6 to master by @github-actions in https://github.com/onflow/cadence/pull/3100
- Update configuration of downstream dependencies by @turbolent in https://github.com/onflow/cadence/pull/3095
- Merge
release/v1.0.0-M7 to master by @github-actions in https://github.com/onflow/cadence/pull/3106
- Dependencies got updated to onflow/flowkit/v2 by @turbolent in https://github.com/onflow/cadence/pull/3109
- Merge
release/v1.0.0-M8 to master by @github-actions in https://github.com/onflow/cadence/pull/3129
- Pass location-range to value-interface methods by @SupunS in https://github.com/onflow/cadence/pull/3140
- Merge
release/v1.0.0-M9 to master by @github-actions in https://github.com/onflow/cadence/pull/3148
- Merge
release/v1.0.0-M10 to master by @github-actions in https://github.com/onflow/cadence/pull/3159
- Update version by @SupunS in https://github.com/onflow/cadence/pull/3161
- Merge
release/v1.0.0-preview.11 to master by @github-actions in https://github.com/onflow/cadence/pull/3165
- Merge
release/v1.0.0-preview.12 to master by @github-actions in https://github.com/onflow/cadence/pull/3167
- Merge
release/v1.0.0-preview.13 to master by @github-actions in https://github.com/onflow/cadence/pull/3171
- Merge
release/v1.0.0-preview.14 to master by @github-actions in https://github.com/onflow/cadence/pull/3174
- Merge
release/v1.0.0-preview.15 to master by @github-actions in https://github.com/onflow/cadence/pull/3180
- Merge
release/v1.0.0-preview.16 to master by @github-actions in https://github.com/onflow/cadence/pull/3185
- Update CODEOWNERS by @turbolent in https://github.com/onflow/cadence/pull/3190
- Merge
release/v1.0.0-preview.17 to master by @github-actions in https://github.com/onflow/cadence/pull/3200
- Merge
release/v1.0.0-preview.18 to master by @github-actions in https://github.com/onflow/cadence/pull/3202
- Bump atree version in Cadence v1.0 for new features (e.g. deduplication of Cadence dictionary type info) by @fxamacker in https://github.com/onflow/cadence/pull/3178
- Merge
release/v1.0.0-preview.19 to master by @github-actions in https://github.com/onflow/cadence/pull/3217
- Sync atree inlining branch with master by @SupunS in https://github.com/onflow/cadence/pull/3179
- Merge master into v1.0 atree register inlining feature branch by @turbolent in https://github.com/onflow/cadence/pull/3229
- Bump onflow/atree to latest version in feature/atree-register-inlining-v1.0 by @fxamacker in https://github.com/onflow/cadence/pull/3223
- Merge
release/v1.0.0-preview.20 to master by @github-actions in https://github.com/onflow/cadence/pull/3239
- Tool for converting staged contracts migration report from JSON to Markdown by @SupunS in https://github.com/onflow/cadence/pull/3249
- Bump atree version in master branch by @fxamacker in https://github.com/onflow/cadence/pull/3254
- Bump atree version in feature/atree-register-inlining-v1.0 by @fxamacker in https://github.com/onflow/cadence/pull/3256
- Update atree register inlining 1.0 feature branch by @turbolent in https://github.com/onflow/cadence/pull/3259
- Merge
release/v1.0.0-preview.21 to master by @github-actions in https://github.com/onflow/cadence/pull/3269
- Merge master into atree register inlining v1.0 branch by @turbolent in https://github.com/onflow/cadence/pull/3270
- Adding migration result for staged contracts migration, testnet, Apri… by @j1010001 in https://github.com/onflow/cadence/pull/3263
- Adding staged contracts migration out
Note truncated.