-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] fix Move package tutorial #4553
Conversation
67723e3
to
5d094ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... (github bugged) ... see below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely love these changes! One thing I would add (I try to stick to this code style) -> putting accessors / getters up, so the overall structure of the module is:
- imports
- consts
- structs
- views
- public / entry functions
- private functions
Like the ordering + will add this recommendation to the doc! Question: where does the module initializer fit in here--in "private functions"? Putting most private functions at the end makes sense to me, but I do kind of like having the initializer come right after the type defs since it's often closely related to singleton objects like the |
5d094ef
to
cd1e472
Compare
Whoops. Forgot about the init buddy. Funnily enough rarely do I have modules that use |
97a32cc
to
37000d2
Compare
The package tutorial is currently broken, which is confusing some folks on Discord and in builder's groups. Let's take this opportunity to fix and simplify the tutorial: * Use `sui move new` to create the package skeleton * Fix `sui move new` to create a Move.toml that depends on the devnet branch + has a named alias for `sui` by default * Fix unused imports in the example code * Expand the example code and explain the different parts of the module
37000d2
to
b2e03b4
Compare
The package tutorial is currently broken, which is confusing some folks on Discord and in builder's groups. Let's take this opportunity to fix and simplify the tutorial:
sui move new
to create the package skeletonsui move new
to create a Move.toml that depends on the devnet branch + has a named alias forsui
by default