What's Changed
๐ฅ Language Breaking Changes
- Eagerly normalize String and Character values at construction time by @turbolent in #2781
- Add required
mapping
keyword to entitlement mapping usages by @dsainati1 in #2883 - Restrict
capabilities.publish
to account's own capabilities by @turbolent in #2782 - Remove support for custom destructors by @dsainati1 in #2789
- Support for parsing default destroy events by @dsainati1 in #2799
- Type checking for default events by @dsainati1 in #2812
- Merge destructor removal into stable cadence by @dsainati1 in #2928
- throw error on the creation of a nested reference by @dsainati1 in #2965
- New Behavior for Attachments and Entitlements by @dsainati1 in #2921
- Merge Stable Cadence branch into master by @dsainati1 in #2971
- Update interface of
revertibleRandom
by @darkdrag00nv2 in #2976 - Static check to prevent nested references by @dsainati1 in #2970
- Remove deprecated domain separation tag from Crypto contract by @turbolent in #2984
- Implement modulo argument of
revertibleRandom
by @tarakby in #2986
๐ฅ Go API Breaking Chance
- Add support for injecting types into the environment by @turbolent in #2811
- Allow different base activations per location in checker and interpreter by @turbolent in #2887
โญ Features
- Add
tryUpdate
method toAccount.Contracts
by @SupunS in #2769 - Add an exists function, allows checking if capability exists/is published by @turbolent in #2778
- Introduce
String.join
function by @darkdrag00nv2 in #2762 - Introduce
String.split
function by @darkdrag00nv2 in #2791 - Check native function declarations by @turbolent in #2821
- Allow native functions to have type parameters by @turbolent in #2850
- Introduce
String.replaceAll
instance function by @darkdrag00nv2 in #2814 - Introduce
InclusiveRange<T: Integer>
type by @darkdrag00nv2 in #2523 - Allow specifying a mapping with source paths for locations in coverage reports by @m-Peter in #2859
- Add support iterating references to iterables by @SupunS in #2876
- Allow injection of functions into composite values, refactor PublicKey based on it by @turbolent in #2878
- add new
revertibleRandom
function by @tarakby in #2896 - Introduce
HashableStruct
type to represent Dictionary keys by @darkdrag00nv2 in #2872 - Allow
InclusiveRange<T>
in a for-in loop by @darkdrag00nv2 in #2892 - Add account type migration by @SupunS in #2923
- Add String normalizing migration by @SupunS in #2937
- Concretize the definition of Primitive type by @darkdrag00nv2 in #2975
- Capability controllers migration by @turbolent in #2912
- Add state migration for removing all values from private domain by @turbolent in #2974
- State migration for type values with two or more interfaces by @turbolent in #2981
- Add getter for field count to composite value by @turbolent in #3002
- Introduce dereference operator for references by @darkdrag00nv2 in #2982
- Add support for dereferencing optional references by @turbolent in #3008
- Merge range type feature by @turbolent in #3009
- Introduce
toVariableSized
to ConstantSizedArray type by @darkdrag00nv2 in #3016 - Allow issuing capability controllers using type values by @turbolent in #3018
- Entitlements Migration by @dsainati1 in #2951
๐ Improvements
- Replace
simpleTypeIDByType
with a bimap by @dsainati1 in #2775 - Use bimaps in the elaboration by @dsainati1 in #2779
- Refactor runtime test helpers into separate, reusable package by @turbolent in #2800
- Add helpers to get constructor and initializer function type for composite type by @turbolent in #2805
- Replace panic with nil return in
newInjectedCompositeFieldsHandler
by @m-Peter in #2808 - Extend type code generator by @turbolent in #2806
- Refine API of the testing framework by @m-Peter in #2783
- mjs build for cadence-parser by @nialexsan in #2851
- Improve test runtime interface by @turbolent in #2894
- Allow default functions to co-exist with empty function declarations by @SupunS in #2725
- Refactor resource-reference tracking by @SupunS in #2916
- Add types to parsed array and dictionary literals by @bluesign in #2924
- AST improvements by @turbolent in #2949
- Disallow InclusiveRange if T is a non-leaf integer by @darkdrag00nv2 in #2959
- Improve resource-reference tracking by @SupunS in #2958
- Generalize the migrations and make common codes re-usable by @SupunS in #2942
- Improve Account type migration by @SupunS in #2973
- Make entitlement set access incomparable by @turbolent in #2972
- Use IsPrimitiveType to check default destructor params by @dsainati1 in #2980
- Various improvements by @turbolent in #2979
- Report bespoke error for restricted types parsed as type arguments by @dsainati1 in #2985
- Use old hash/ID generation to remove keys by @SupunS in #2987
- Extend pragma expressions by @turbolent in #2993
- Improve error handling in migrations by @SupunS in #3001
- Improve type inference by @turbolent in #3004
- Add type assertion on values passed to
Test.assertEqual
by @m-Peter in #3014 - Improve code related to new InclusiveRange type by @turbolent in #3017
- Defensively check the dereferenced value is not a resource by @turbolent in #3010
๐ Bug Fixes
- Fix doc (pretty printing) for function declaration without function block by @turbolent in #2774
- Port internal #143 by @turbolent in #2793
- Properly check removed expression for resource loss by @dsainati1 in #2798
- Fix Test framework's TestAccount's type name by @SupunS in #2802
- Fix capability controller deletion by @turbolent in #2788
- meter and deduplicate included entitlement relations by @dsainati1 in #2810
- Use kr/pretty instead of go-test/deep to prevent empty diffs, remove gocap by @turbolent in #2819
- properly access-check optional chaining with entitlements by @dsainati1 in #2825
- Check
before
statements inview
contexts by @dsainati1 in #2835 - Skip adding malformed entitlement relations to maps by @dsainati1 in #2838
- Require full codomain of map when assigning to mapped field by @dsainati1 in #2840
- Port internal 141: Fix swapping in resource array by @turbolent in #2844
- Port internal 144: Fix swap statement evaluation by @turbolent in #2845
- Port internal fix 145: Prevent re-deploy in same transaction by @turbolent in #2846
- Properly set base on loaded attachments during attachment iteration by @dsainati1 in #2847
- Fix memory metering for loading stored values by @turbolent in #2509
- [stable-cadence] Fix field assignment via references by @SupunS in #2868
- Entitlement mapping escape fixes by @dsainati1 in #2877
- Fix string atree value comparison: handle storage as slab by @turbolent in #2895
- Removing an attachment is an impure operation by @dsainati1 in #2890
- [v0.42] Prevent nested contract deployments by @SupunS in #2904
- Prevent nested contract deployments by @SupunS in #2902
- [v0.42] Fix nested resource moves by @SupunS in #2930
- [v0.42] Fix AuthAccount creation by @SupunS in #2932
- Fix nested resource moves by @SupunS in #2931
- Fix AuthAccount creation by @SupunS in #2933
- Fix transaction resource-typed field move by @SupunS in #2938
- Include interface conformances when computing the supported entitlements of an interface by @dsainati1 in #2946
- Port bug fixes from
v0.42.5-patch.1
by @SupunS in #2955 - Port bug fixes from v0.42.5-patch.1 by @SupunS in #2956
- Fix GetNativeCompositeValueComputedFields by @turbolent in #2977
- Statically prevent referenced-typed subexpressions in default arguments to destroy events by @dsainati1 in #2996
- Prevent use of
base
variable in default destroy event arguments outside attachments by @dsainati1 in #2999 - Prevent use of non-attachment type names in default arguments by @dsainati1 in #3000
- prevent creation of nested storage references by @dsainati1 in #3020
๐งช Testing
- Add test for container mutation while iterating by @SupunS in #2960
- Test type order insignificance by @turbolent in #2967
๐ Documentation
- Add notes for 2023-09-12 meeting by @turbolent in #2780
- Add meeting notes for 2023-11-15 by @turbolent in #2944
Other Changes
- Sync
feature/range-type
branch withmaster
by @SupunS in #2747 - Merge
release/v0.41.0
tomaster
by @github-actions in #2786 - Merge
release/v0.41.1
tomaster
by @github-actions in #2795 - Sync Stable Cadence by @turbolent in #2796
- Assign issues to group by @turbolent in #2797
- Remove unused composite type to interface type conversion function by @turbolent in #2804
- Sync Stable Cadence by @turbolent in #2820
- Merge
release/v0.42.0
tomaster
by @github-actions in #2852 - Sync Stable Cadence by @turbolent in #2854
- Add computation metering to the new stdlib functions by @SupunS in #2880
- Use
ComputationKindLoop
for internal array-value iterations by @SupunS in #2891 - Merge
release/v0.42.1
tomaster
by @github-actions in #2893 - Add meeting notes for 2023-10-24 by @turbolent in #2897
- Sync stable cadence branch with master by @SupunS in #2899
- Merge
release/v0.42.2
tov0.42
by @github-actions in #2905 - [v0.42] Port adding new
revertibleRandom
function by @SupunS in #2910 - Merge
release/v0.42.3
tov0.42
by @github-actions in #2911 - Update tests for
Crypto
contract to the latest testing framework API by @m-Peter in #2856 - Remove
StandardLibraryHandler
method fromTestFramework
interface by @m-Peter in #2927 - Merge
release/v0.42.4
tov0.42
by @github-actions in #2934 - Fix Semgrep by @turbolent in #2939
- Merge v0.42 into master by @turbolent in #2940
- Merge
release/v0.42.5
tov0.42
by @github-actions in #2941 - Sync stable-cadence branch with master by @SupunS in #2964
- Remove unsafeRandom by @turbolent in #2966
- Sync stable-cadence branch with master by @SupunS in #2968
- Cleanup reference tracking by @SupunS in #2969
- Make checkParameterizedTypeIsInstantiated recursive by @darkdrag00nv2 in #2915
- Sync
feature/range-type
branch withmaster
by @SupunS in #2995
Full Changelog: v1.0.0-preview.1...v1.0.0-preview.2