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

chore: update templates for cargo-generate 0.23.0 #95

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

@orhun orhun requested a review from joshka March 13, 2025 14:18
@dawedawe dawedawe mentioned this pull request Mar 13, 2025
Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

These suggestions would make this a much smaller change:

  • exclude the github workflow files from generation
  • override the author by environment as part of the just file

authors = ["Josh McKinney <[email protected].com>"]
authors = ["Orhun Parmaksız <orhunparmaksiz@gmail.com>"]
Copy link
Member

Choose a reason for hiding this comment

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

One thing we could do here instead to avoid this bouncing back and forth is to add some sort of env override in the just file that makes this consistent across runs.

Comment on lines -59 to 71
(target: $target:expr, level: $level:expr, $ex:expr) => {{
(target: $target:expr, level: $level:expr, $ex:expr) => {
{
match $ex {
value => {
tracing::event!(target: $target, $level, ?value, stringify!($ex));
value
}
}
}};
}
};
(level: $level:expr, $ex:expr) => {
trace_dbg!(target: module_path!(), level: $level, $ex)
};
Copy link
Member

Choose a reason for hiding this comment

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

This indenting seems a bit weird

Copy link
Member Author

Choose a reason for hiding this comment

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

wdym

Copy link
Member

Choose a reason for hiding this comment

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

8 spaces rather than 4

Copy link
Member Author

Choose a reason for hiding this comment

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

ah I see

Copy link
Member

Choose a reason for hiding this comment

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

What about instead excluding these files from being parsed by liquid? https://cargo-generate.github.io/cargo-generate/templates/include_exclude.html

Copy link
Member Author

Choose a reason for hiding this comment

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

That didn't work for me via top-level cargo-generate.toml. However IIRC it works with individual ones for each template which is not that good. Can you also give it a try?

Copy link
Member

Choose a reason for hiding this comment

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

for each template which is not that good

What's not good about configuring entire files to not be processed per template? This is instead of putting code around the parts of each file to avoid processing but there's nothing else being processed in that file. I may be missing the logic of that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant adding the same cargo-generate.toml for each template is not that good. I think it's better if we do that in the top-level config which didn't work for me.

@orhun
Copy link
Member Author

orhun commented Mar 14, 2025

I'll merge this as-is for now since it's affecting people and we can make the improvements later on

@orhun orhun merged commit ae7fa48 into ratatui:main Mar 14, 2025
6 checks passed
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.

2 participants