aptos-labs / aptos-core

Aptos is a layer 1 blockchain built to support the widespread use of blockchain through better technology and user experience.
https://aptosfoundation.org
Other
6.18k stars 3.66k forks source link

[Docs] Mismatch between documentation and example for Your First Coin guide #10902

Open humb1t opened 1 year ago

humb1t commented 1 year ago

Aptos Documentation Issue

Location

https://aptos.dev/tutorials/your-first-coin

Description

When I was going through "Your First Coin" guide, I found that real execution of a command poetry run python -m examples.your-coin ~/aptos-core/aptos-move/move-examples/moon_coin from Step 3 differs from what is defined in a next step of the guide.

While the guide assumes that you will manually compile move package via aptos move compile command, in reality it was made automatically.

Reason of that is this code:

    if AptosCLIWrapper.does_cli_exist():
        AptosCLIWrapper.compile_package(moon_coin_path, {"MoonCoin": alice.address()})
    else:
        input("\nUpdate the module with Alice's address, compile, and press enter.")

I think it's an open question on how to update the guide to reflect this behaviour. One idea that came into my mind is to make steps 3.1 and 3.2 optional, with a disclaimer that they should be done manually only if you didn't install CLI before starting to go through this guide. But on the other hand, it seems strange, because execution of these steps require CLI to be installed. So maybe it's even better to add installation of CLI into “Prerequisites” section of the guide and removal of both — the code and the steps 3.1/3.2 from the codebase and the guide.

Audience

I think App developers should have a look and understand what was the purpose of these steps (3.1, 3.2) — if it was an idea to teach users how to compile modules one solution will be a favourable, otherwise another one.

Additional context

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.