cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

Correct location / specification for a changelog/releases notes?

Open bjones1 opened this issue 3 months ago • 3 comments

Per the docs, dist will use a changelog/releases file when producing a release. I've verified that parse-changelog applied to my changelog produces correct output. I've also specified its location in my dist.toml file:

[package]
changelog = "../docs/changelog.md"

However, the changelog isn't used when generating release announcements. Is this bug, or am I missing a setting?

Thanks!

bjones1 avatar Aug 27 '25 20:08 bjones1

Looks like we read the the changelog from the auto includes: https://github.com/axodotdev/cargo-dist/blob/main/axoproject/src/changelog.rs#L20 Which is detected from disk: https://github.com/axodotdev/cargo-dist/blob/main/axoproject/src/lib.rs#L723-L733

We do parse the changelog property from the package info, but it seems we don't use it when processing the changelog. Feels like a bug. Just to check though, does it work if you put the changelog definition in Cargo.toml instead of dist.toml? I don't think that will fix it, but just wanted to confirm.

mistydemeo avatar Aug 27 '25 21:08 mistydemeo

@mistydemeo, thanks for the quick response! Unfortunately, I don't see an (obvious) way to specify a changelog in Cargo.toml. Per the Cargo book, I don't see any entries for a changelog. What's the appropriate key? I see that dist's package.changelog states

If not specified, this can be inherited from a language's native package format like a Cargo.toml, package.json, etc.

However, I don't see a Cargo manifest entry where I can specify this. Simply adding a changelog key to my Cargo.toml file produces:

warning: unused manifest key: package.changelog

Thanks again for your help!

bjones1 avatar Aug 28 '25 12:08 bjones1

On a side note, I also don't see a place in package.json to specify a changelog location.

bjones1 avatar Aug 28 '25 16:08 bjones1