Skip to content

Leo 4.0 syntax migration is half-applied - SDK guides still teach removed keywords #2

Description

@therevealer

Location:
/build/sdk/guides/deploy_programs/ and /build/sdk/guides/managing_state/ vs. /build/leo/guides/migration-3-5-to-4-0/ and /build/leo/language/cheatsheet/

Problem:
The migration guide explicitly states Leo 4.0 removes transition, async, function, and Future in favor of fn, final, and Final, and the cheatsheet uses the new program hello.aleo { ... } block syntax. But the SDK's Deploy Programs guide still teaches:

program helloworld.aleo {
  transition hello(public a: u32, b: u32) -> u32 { ... }
}

and the Managing State guide still uses the pre-4.0 dual-block function transfer_public: ... finalize self.signer r0 r1; model, not the final { ... } block 4.0 introduces.

Consequence:
A developer following the SDK quickstart writes code with transition, hits a compiler error from the current Leo toolchain, and has no signal that they're reading documentation for a deprecated language version. Worse, agents scraping these pages will produce broken code with high confidence because the pages don't carry a version banner.

The fix:
Add a "Leo version" banner to every SDK and example page, rewrite all SDK code samples to 4.0 syntax (fn, final { ... }, program X.aleo { ... }), and cross-link to the migration guide from each affected page. Either that, or fork the SDK guides into "Leo 3.5 (legacy)" and "Leo 4.0" tracks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions