docs: Add leo 3.5 to 4.0 migration guide#572
Merged
mohammadfawaz merged 2 commits intomasterfrom Mar 19, 2026
Merged
Conversation
Cover all breaking changes: function keywords (transition/function/inline → fn), async/finalize → final, Future → Final, .await() → .run(), script removal, @test fn usage, module-level struct conventions, and the program block as interface boundary. Include quick reference table, code examples for each migration pattern, and notes on new 4.0 features (interfaces, inclusive ranges).
3d3e0e8 to
e7cde40
Compare
JoshuaBatty
previously approved these changes
Mar 18, 2026
Collaborator
JoshuaBatty
left a comment
There was a problem hiding this comment.
looking good to me. would be interesting to load up some 3.5 Leo examples and see if this MD file as a prompt successfully migrates them all to 4.0 or if there were any edge cases it might not have had enough context for.
`final fn` was incorrectly presented as a direct replacement for
`async function`. The actual replacement is a `final { }` block,
which the compiler lifts into a standalone on-chain finalization.
`final fn` is a new compile-time code reuse mechanism that inlines
into the caller's finalization block.
mohammadfawaz
approved these changes
Mar 19, 2026
Collaborator
mohammadfawaz
left a comment
There was a problem hiding this comment.
Great work! Thank you for this. I think this is sufficient for users to learn how to migrate their code.
IGI-111
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive migration guide covering all breaking changes between Leo 3.5 and 4.0: function keywords (transition/function/inline -> fn), async/finalize -> final, Future -> Final, .await() -> .run(), script removal, @test fn usage, module-level struct conventions, and the program block as interface boundary.
Include quick reference table, code examples for each migration pattern, and notes on new 4.0 features (interfaces, inclusive ranges).
Updates guides overview to link the new guide.
Follow-up