-
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
[CLI] Adds initial package layout on sui move new
#16255
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
sui move new
sui move new
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.
Without knowing the context of the discussion, this looks fine to me. Not sure if it is what an user would expect (and this is where this kind of thing will get you different opinions, some want X, others want Y, etc), but if this is what's needed to start a quick project and have some template ready, it's fine.
Awesome, do you think it would be helpful to add a comment line on top of the test file saying something along the lines of: Learn more about testing at https://docs.sui.io/guides/developer/first-app/build-test |
As someone who starts a new package often, I get annoyed by the need to add the source file. Received similar feedback from other folks on the team and community members. As to the testing file, we do have an example of it in the Move by Example book but I think we're slowly going to the setup where developer has all things at hand with no need to look them up. Just like we recently added a richer Move.toml descriptions - #16191 |
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.
LGTM
## Description Following the discussion on scaffolding the app: - adds `sources/{name}.move` - adds `tests/{name}_tests.move` ```sh sources/ donuts.move tests/ donuts_tests.move Move.toml ``` File: sources/name.move; Commented out contents: ```move /// Module: donuts module donuts::donuts { } ``` File: tests/name_tests.move; Commented out contents: ```move #[test_only] module donuts::donuts_tests { // uncomment this line to import the module // use donuts::donuts; const ENotImplemented: u64 = 0; #[test] fun test_donuts() { // pass } #[test, expected_failure(abort_code = donuts::donuts_tests::ENotImplemented)] fun test_donuts_fail() { abort ENotImplemented } } ``` ## Test Plan Tests pass! ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
Description
Following the discussion on scaffolding the app:
sources/{name}.move
tests/{name}_tests.move
File: sources/name.move; Commented out contents:
File: tests/name_tests.move; Commented out contents:
Test Plan
Tests pass!
Type of Change (Check all that apply)
Release notes