-
Notifications
You must be signed in to change notification settings - Fork 7
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
cargo generate #75
cargo generate #75
Conversation
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.
How are you doing the development of this? I'd like to see a justfile with a command to run the generation into a gitignored folder and then run cargo-check. Preferably the command uses cargo-watch so anytime you do a change in the template it generates and tries to compile.
.github/workflows/clippy.yml
Outdated
- name: install cargo-generate | ||
run: cargo install cargo-generate --locked | ||
- name: cargo clippy | ||
run: CARGO_GENERATE_TEST_CMD="cargo clippy --all-features -- -D warnings" cargo generate -d app_name=my_app -d adapter_name=my_adapter --test |
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.
@CyberHoward There is cargo-generate --test
command that allows to override "test command", I guess that will do the trick,
Careful search and replace and then check output with clippy/tests/eyes |
This PR aims to make our template
cargo-generate
friendly.Asking for a quick glance, before I fix CI/readme etc @CyberHoward
It does make it much more messier and unusable without cargo-generate, so I wonder if that's something we should put into separate repo/branch? It's possible to do search-replace script with
rhai
for it (supported by cargo-generate as init/pre/post/ generate hook) and keep this repo clean, but don't think it worth the effort