Skip to content
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

[move] Add example of user code organized into multiple packages #5676

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

awelc
Copy link
Contributor

@awelc awelc commented Oct 29, 2022

This resolves #5517 by providing an example on how to structure user code with multiple packages.

@awelc awelc requested a review from randall-Mysten as a code owner October 29, 2022 21:47
@awelc awelc requested a review from amnn October 29, 2022 21:47
@amnn
Copy link
Member

amnn commented Oct 31, 2022

The example looks good! We should likely document it here as well. I'll leave it to @randall-Mysten to give the final stamp from a docs perspective.

An example of how to structure your code to include another user-level package as a dependency.

The main things to pay attention to is to make sure that the dependency name (in this example
DepPackage in main_package/Move.toml file's `[dependency]` section) is the same as the name of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the same as the name of the
package (in dep_package/Move.toml file's [package] section) are exactly the same

seems redundant - make sure that the dep name is the same as the name of the package (...) are exactly the same...

Copy link
Member

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh I left a bunch of comments on here this morning, and then forgot that they were pending.

@@ -0,0 +1,5 @@
An example of how to structure your code to include another user-level package as a dependency.

The main things to pay attention to is to make sure that the dependency name (in this example
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The main things to pay attention to is to make sure that the dependency name (in this example
The main things to pay attention to are to make sure that the dependency name (in this example

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it sounds like there is only 1 thing to pay attention to?
What if it said "Make sure that the dependency name in this example"

An example of how to structure your code to include another user-level package as a dependency.

The main things to pay attention to is to make sure that the dependency name (in this example
DepPackage in main_package/Move.toml file's `[dependency]` section) is the same as the name of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DepPackage in main_package/Move.toml file's `[dependency]` section) is the same as the name of the
DepPackage in main_package/Move.toml file's `[dependencies]` section) is the same as the name of the

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this in brackets?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is referring to the syntax in TOML files where table (key-value section) headers are denoted by square brackets.


The main things to pay attention to is to make sure that the dependency name (in this example
DepPackage in main_package/Move.toml file's `[dependency]` section) is the same as the name of the
package (in dep_package/Move.toml file's `[package]` section) are exactly the same
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package (in dep_package/Move.toml file's `[package]` section) are exactly the same
package (in dep_package/Move.toml file's `[package]` section).

@awelc
Copy link
Contributor Author

awelc commented Oct 31, 2022

Thank you for the comments and suggestions @amnn and @randall-Mysten. And sorry for the sloppy writing (among other things, started thinking that there would be more things to pay attention to and this never materialized but artifacts remained...)

@randall-Mysten
Copy link
Contributor

Thank you for the comments and suggestions @amnn and @randall-Mysten. And sorry for the sloppy writing (among other things, started thinking that there would be more things to pay attention to and this never materialized but artifacts remained...)

Thanks for updating the docs. Happy to partner on this earlier in the process so we can iterate and fine-tune before creating the PR.

@awelc awelc merged commit fd95369 into main Nov 1, 2022
@awelc awelc deleted the aw/multi-package-example branch November 1, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[move] Create an example of having other packages as dependencies
3 participants