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

cli: init rust test #2805

Merged
merged 29 commits into from
Feb 14, 2024

Conversation

aoikurokawa
Copy link
Contributor

@aoikurokawa aoikurokawa commented Feb 1, 2024

Problem

close #2680

Summary of Changes

  • Add an option rust-template in anchor init -t command.
  • Add rust test templates.

I am submitting this pull request for review. As I am not entirely confident about my implementation, I would greatly appreciate any advice or suggestions. I am open to feedback and happy to make any necessary adjustments.

Copy link

vercel bot commented Feb 1, 2024

@aoikurokawa is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you for starting on this!

I am submitting this pull request for review. As I am not entirely confident about my implementation, I would greatly appreciate any advice or suggestions. I am open to feedback and happy to make any necessary adjustments.

Can we add this as a template instead of a separate flag? It would also be much easier to add it that way since you can just specify all the necessary files in one place similar to

fn create_program_template_multiple(name: &str, program_path: &Path) -> Files {

@aoikurokawa aoikurokawa marked this pull request as ready for review February 4, 2024 01:41
@aoikurokawa
Copy link
Contributor Author

Thank you for the review.
Following your advice, I've added a new option to the --template rust-test.
I welcome any further advice or suggestions you might have.

cli/src/rust_template.rs Outdated Show resolved Hide resolved
cli/src/test_template.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks! A few more things and it should be good to merge.

cli/src/rust_template.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@aoikurokawa
Copy link
Contributor Author

@acheroncrypto
Thank you for reviewing. I relocated the code associated with testing to pub fn create_test_files function.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you!

@acheroncrypto acheroncrypto merged commit 8eee184 into coral-xyz:master Feb 14, 2024
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust Boilerplate
2 participants