what if i bump: dev tool to help with changelog edits#542
Conversation
12c6357 to
4248c70
Compare
ranile
left a comment
There was a problem hiding this comment.
This needs a README to document how to use the tool. It would also be nice to have the script also update the changelog automatically (and a --dry-run flag to opt out of writing)
| let name = toml_val["package"]["name"].as_str().unwrap().to_string(); | ||
| let version = Version::parse(toml_val["package"]["version"].as_str().unwrap()).unwrap(); | ||
| let short = name.strip_prefix("gloo-").unwrap_or(&name).to_string(); |
There was a problem hiding this comment.
It would be nice to have better error handling with eyre, but not hard blockers as this tool shouldn't need to be run by everyone
I think eyre is better than anyhow for these kind of tools because it produces prettier output with color_eyre
| if let Some(rest) = t.strip_prefix("## `") { | ||
| if let Some(name) = rest.strip_suffix('`') { |
There was a problem hiding this comment.
nit: Option::and_then can save us from nested if lets
|
I actually have doubt on the correctness of the current suggestions. say there is a bug fix in Further more, if gloo-utils adds a feature (say a new function) which warrants a minor version bump. This tool right now will suggest a minor version bump in What if we use agentic AI tooling to help with the suggestions? Is it an overkill? |
|
Good points. There's https://github.com/crate-ci/cargo-release and I briefly used it for gloo in the past. What do you think of adopting it fully instead of rolling our own tool? We can use have a tool for changelog like https://github.com/yewstack/yew/tree/master/tools/changelog |
what-if-i-bumpis added: a dev CLI tool that computes semver cascade for the gloo workspace. Given a crate and bump level (patch,minor,major), it walks the internal dependency tree and reports exactly which CHANGELOG.md sections need to be added or renamed, following the cascading rules from CONTRIBUTING.md.I also normalized the existing CHANGELOG.md: remove quoted version numbers, prefix all section headers with
gloo-, add a top-levelgloosection, remove the standaloneworker-macrossection (it is a companion ofgloo-worker).Example
say there is already a gloo-net 0.7.1 and a gloo 0.12.1 section accumulating changes:
Design notes
*-macroscrates (currently onlygloo-worker-macros) are tracked in the dependency graph but have no CHANGELOG section. The tool directs their changelog suggestions to the parent crate's section (e.g.,gloo-worker).