Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRFC: Crate changelogs #2129
Conversation
newpavlov
added some commits
Aug 26, 2017
This comment has been minimized.
This comment has been minimized.
Lokathor
commented
Aug 27, 2017
|
I'm not professional enough to write changelogs. Will cargo and/or crates.io be able to automatically generate an API diff from one version to the next and spit out that as the change log? |
This comment has been minimized.
This comment has been minimized.
|
@Lokathor |
This comment has been minimized.
This comment has been minimized.
nvzqz
commented
Aug 27, 2017
•
|
Glad my post could help get this discussion going! :) I don't think that having a changelog be a commit diff is a good idea. There's lots of irrelevant messages from commits like with merge commits. @Lokathor If you don't believe you're professional enough to write a changelog, open an issue to ask for help with it. The issue will bring attention to the lack of changelog to people who see the repo. Edit: For this scenario, having a decent grasp of the project's native language (usually English) should be enough for writing a base changelog. If others expect more from it, they can open pull requests to improve it. This can also happen to explain certain nuances of changes that may not be expressed in the original text. |
This comment has been minimized.
This comment has been minimized.
nvzqz
commented
Aug 27, 2017
|
How should a changelog address a project that has been deprecated in favor of another project? And if not in favor of another, it should address that the author may not have enough time to support it. Or maybe the project had unsafe effects (accidental malware?) that people want to study rather than used in legitimate software? |
This comment has been minimized.
This comment has been minimized.
boustrophedon
commented
Aug 27, 2017
|
@nvzqz Wouldn't that sort of stuff just go in the README? Changelogs (as promoted by keepachangelog) don't usurp readmes. |
This comment has been minimized.
This comment has been minimized.
nvzqz
commented
Aug 27, 2017
|
@boustrophedon the changelog described has an Unreleased section. It would just be a message stating that no more releases should be expected. |
This comment has been minimized.
This comment has been minimized.
tblair
commented
Aug 27, 2017
|
I'm uncomfortable with Rust tooling taking an opinionated view towards changelogs, especially when that opinion marginalizes a project like clog that's been part of the Rust ecosystem for a long time now. I can definitely see why people would prefer the keepachangelog.com approach, but I don't think Cargo should make that decision for project authors. This would be especially galling to any project that has put the time and effort into maintaining a conventional commit history. This is an area where there are multiple specifications and whatever Rust tooling gets built should allow project authors to choose whichever approach they prefer. For anyone unfamiliar, here is the spec for the conventional commit method of handling changelogs and here are the Angular commit guidelines on which its based. |
This comment has been minimized.
This comment has been minimized.
|
I think changelog support would be awesome, but I don't get the need for the custom split-file format. As stated in the RFC, this deviates from the norm. I don't know if anyone would think to look for a changelog folder. I certainly wouldn't want to have one in my repo because I prefer the single file changelog. I like everything about adding the changelog link to crates.io and I'm in favor of having the key for that in Cargo.toml, but I'm not sold on the split changelog thing. I don't see why the changelog needs be generated at all. I know maintaining a changelog by updating it's links and adding new sections can be a pain, so maybe an external tool that makes that awesome would be a good idea. Just working on changelogs doesn't seem like something that should be part of cargo. Thanks for making the RFC! I'm glad someone is talking about this. :) |
This comment has been minimized.
This comment has been minimized.
vorner
commented
Aug 27, 2017
|
I like the intent to add a changelog to crates.io and to However, I very much dislike the split into files. I keep changelogs with my crates (at least once the API settles a bit), but I prefer having all the changes in one file. It's easier to search for something. And when I download a repository (or open it at github), having to either generate the changelog locally or searching multiple files feels like a lot of added work for no real gain (and keeping a generated file in git is also wrong). Also, having to be online for generating the changelog feels somewhat inconsistent with the fact that almost everything cargo does works offline (except when adding and downloading dependencies). What work is actually saved by that split? Adding the dates? Moving the lines from unreleased section to the current version? If the changelog has a standardized format (MD with the given sections), any tooling should be able to handle it in a single file as well. |
This comment has been minimized.
This comment has been minimized.
mehcode
commented
Aug 27, 2017
•
I'd like to define the layout enough that we could do this on crates.io but no more. I strongly dislike the tool that generates a changelog from a folder structure being officially part of Rust. I'd rather see that tool compete with clog as separate crates. Huge + |
This comment has been minimized.
This comment has been minimized.
|
I'm not really a fan of adding yet another folder. One file should be enough IMO. If I look at the changelog I keep for my Generally I think we should be as liberal as possible with the changelog format, and not dictate one. |
This comment has been minimized.
This comment has been minimized.
bluss
commented
Aug 27, 2017
|
I agree with @est31. From the author's perspective, a file per release is neat and simple. From the user's perspective, when I look at a change log, I am probably reading it like a timeline: I'm going to read everything from some point and up until the current state, so I'll read through multiple releases, and a single file is then much easier to read. Of course for big enough projects, splitting the change log per release again becomes reasonable. |
This comment has been minimized.
This comment has been minimized.
sunng87
commented
Aug 27, 2017
|
+1 for keeping changelogs in a single file. Also I think a changelog needs to be written by hand to include information curated and prioritized. In recent version of handlebars, I put unreleased changes in an Unreleased section, when the change is merged into master. And I configured cargo-release to replace Unreleased with new version number. Then the changelog is ready. I knew a lot effort has been put into changelog auto generation. But this is my best workflow by far. Sent from my Google Nexus 9 using FastHub |
This comment has been minimized.
This comment has been minimized.
flosse
commented
Aug 27, 2017
+1 |
This comment has been minimized.
This comment has been minimized.
arthurprs
commented
Aug 27, 2017
•
|
I have mixed feelings about this. What about just inserting a changelog link on crates.io that shows the rendered |
This comment has been minimized.
This comment has been minimized.
ruuda
commented
Aug 27, 2017
|
It looks like the consensus so far is that a single file is preferred over multiple files. What the format of that file should be is less clear.
I would prefer the second option. What a good changelog looks like depends a lot on the size, release schedule, and purpose of the project. |
This comment has been minimized.
This comment has been minimized.
mathstuf
commented
Aug 27, 2017
|
I'd love to have the changelog rendered, but I'd rather it just be "we will render any of these paths in crates.io" and how it gets there is uncared about (additional tooling is fine). I really don't like the The way I usually do release notes is that each PR which needs one drops a new file in a specified directory and at release time, they get collated into a single file and deleted. This stops conflicts from happening, supports cherry-picking into backport branches easily with no change in process, and allows for the maintainer to collate and group release notes as necessary or wanted. |
This comment has been minimized.
This comment has been minimized.
|
Thank you for your responses! While it was not my intention I think emphasis on a new multi-file approach was too strong. I've moved it into a separate RFC and updated this one to a minimal version. One thing which I think is very important is to have at least minimal degree of machine readability and safety check in |
mathstuf
reviewed
Aug 27, 2017
| [alternatives]: #alternatives | ||
|
|
||
| This proposal defines minimal format for changelog, leaving as much flexibilty | ||
| for crate authors as possible withoout droping the basic machine readability. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jimmycuadra
commented
Aug 27, 2017
|
The |
This comment has been minimized.
This comment has been minimized.
|
@jimmycuadra But either way I will mention your proposal as an alternative solution. |
This comment has been minimized.
This comment has been minimized.
|
My comment on your other changelog RFC is also valid for this one :) #2131 (comment) |
This comment has been minimized.
This comment has been minimized.
|
@BurntSushi |
This comment has been minimized.
This comment has been minimized.
mehcode
commented
Aug 30, 2017
|
I'd like to see at least the following minimally specified:
# Anything goes here
Anything goes here.
## 1.2.3
Anything goes here.
## 0.2.3
Anything goes here.
## 0.0.3
Anything goes here.or # 1.2.3
Anything goes here.
# 0.2.3
Anything goes here.
# 0.0.3
Anything goes here.or ### 1.2.3
Anything goes here.
#### Bug Fixes
More anything goes here.
### 0.2.3
Anything goes here.
### 0.0.3
Anything goes here.I don't think we should try and specify the format inside each chunk. I just want crates.io to be able to extract a version chunk and show it. |
This comment has been minimized.
This comment has been minimized.
|
@mehcode UPD: Well, except for third example. I haven't seen changelogs which use sub-sub-headers. |
This comment has been minimized.
This comment has been minimized.
We've already established that breaking changes are a no go, which means the guarantees in this RFC are all the guarantees we could enforce. The guarantees in this RFC are that headers begin with a version number. Can you explain how having crates on crates.io which don't follow this format will make it hard for tools to process change logs? At minimum they can just report an error on those crates - unfortunate but not a big loss. At maximum they can accept slightly more inputs. For example, a more liberal tool might accept headers that containing a semver version in their header, possibly not in the initial position, to handle people who might write "Release 1.2.0" or " (2.0.0)" in their headers. Moreover, this RFC defines the changelong syntax in terms of markdown. While today crates.io only renders markdown, there are feature requests to render other formats types, such as asciidoc. I feel quite strongly that, at least as far as crates.io is concerned, any features should be based on the header tags in the rendered HTML output, not in the syntax of the source text. |
This comment has been minimized.
This comment has been minimized.
|
I agree with the goals of this RFC, in that making changelogs more visible will encourage more people to keep them! I'd like to suggest, however, that the This would support the case that @jimmycuadra raised of using Github's releases page as the changelog, and would also support people who have a whole website for their crate of which changelogs is one part. I would be in favor of this proposal if that change was made, but currently I'm skeptical of the (lack of) flexibility the current proposal has. |
This comment has been minimized.
This comment has been minimized.
tapeinosyne
commented
Aug 31, 2017
Excepting the prohibition of
I agree that newly recommended practices should come with guidelines, but not a standard; not for something like changelogs, where needs and wants can vary considerably across projects, as others already remarked. I also have a scruple: changelogs, like readmes, are traditionally authored in plaintext. From plaintext I expect freedom of form. For a tool to mandate plaintext but demand adherence to external conventions, however reasonable they may be, would be a small treachery: the failure to meet long-established expectations. (Markdown is valid plaintext, at least for the purpose of this comment.) Perhaps the tool could offer conventions which guarantee additional capabilities – much like GitHub may render commit hashes as links in release notes without demanding anything much of maintainers. Again, however, I am not persuaded we should lead with that. |
newpavlov
added some commits
Aug 31, 2017
This comment has been minimized.
This comment has been minimized.
|
I've updated RFC and added ability to link changelogs published on external resources. Hope this will address most of the concerns regarding perceived strictness of the rules, as it will provide additional flexibility if desired. But I still firmly believe that rules for explicitly provided changelog files and basic |
This comment has been minimized.
This comment has been minimized.
vorner
commented
Aug 31, 2017
|
I think the current set of rules makes some kind of sense. I mean, changelog is technically free form and every author can do whatever they like, but:
There's only the question of the unreleased section. On one hand, it makes sense, because at the time you publish the crate, nothing is unreleased, so that's a lint you forgot to move the entries to specific version. On the other hand it might make sense to keep it there in the meantime, not delete and recreate it every time a release is made. There's the possibility of allowing only empty unreleased section, but that feels a bit adhoc. Also, I was wondering, could |
This comment has been minimized.
This comment has been minimized.
Good point, I will add it to unresolved questions. Personally I do not like that much idea to keep it, as I think initially changelog will be rendered in the same way as readme, so it will be strange to see empty "unreleased" section in it. Or we'll need to add filtering which will feel even more adhoc.
I think it сould be done as a separate RFC. Because for example currently |
This comment has been minimized.
This comment has been minimized.
bluss
commented
Aug 31, 2017
|
Some existing crates have a changelog in a different format (restructuredtext) so anything that allows such things are a plus to me. It's not required that it can render it, but it requires that non-markdown isn't forced through a markdown renderer. |
This comment has been minimized.
This comment has been minimized.
|
@bluss |
carols10cents
referenced this pull request
Sep 12, 2017
Closed
Add "changelog" to Cargo.toml and crates.io #2188
This comment has been minimized.
This comment has been minimized.
dbrgn
commented
Sep 12, 2017
|
As the author of the first linked blogpost I very much approve of this RFC in general :) I have a few remarks though. In my opinion some things in this RFC are too strict:
I think that's overly strict and that Cargo should not add such a requirement. It will only result in workarounds, like not adding a heading for the unreleased changes.
Why is that? It only makes it harder for projects that have had a few releases before their first crates.io release to publish. I see no advantage in adding this restriction. In general, I'd either go for a specification that makes the format machine readable (to make it easier for automated tooling), or keep the format unspecified (except for markdown, so it can be rendered). I tend to favor the second approach. It can also be a gradual approach, where advanced rendering is done if the format corresponds to certain rules. As others in this thread have written, we could wait until some conventions form and until some tooling exists. If - for example - cargo would start to show changes on package updates, people would probably automatically start to format their changelogs in a way that they're supported by the tooling. Oh, and I like the fact that you can link an external changelog, as an escape hatch for people that don't want to conform to the rules required for an explicit changelog file. Regarding one of the unresolved questions:
I would definitely do a check and warn the user if the URL isn't reachable (e.g. if a status code different than 2xx or 3xx is returned). But I'd provide a way to publish even if that URL is (temporarily?) unavailable. (PS: I found two typos: additionall -> additional and externall -> external) |
carols10cents
referenced this pull request
Sep 13, 2017
Closed
Support uploading/displaying changelogs. #160
This comment has been minimized.
This comment has been minimized.
tapeinosyne
commented
Sep 17, 2017
|
I feel we should open another RFC for the sole introduction of the |
This comment has been minimized.
This comment has been minimized.
I don't think it makes much sense to have "unreleased" section in the changelog for published crate, especially if changelogs will be initially rendered as readme without any post-processing.
Hm, you are right, I haven't considered cases when crate can be initially developed without getting published on crates.io. I've removed this requirement. @tapeinosyne Also it's always useful to keep in mind that: "nothing is more permanent than the temporary". |
This comment has been minimized.
This comment has been minimized.
dbrgn
commented
Sep 18, 2017
Hm, that's a good point. Some workflows will need to change, as some people add the unreleased section at the same time they release the previous version. But that change can just as well be done after the release commit. |
newpavlov commentedAug 27, 2017
•
edited
Rendered
This RFC proposes addition of changelog support to
cargoand crates.io.The main proposal is to add
changelogfield to[package]section ofCargo.tomlwhich can point either to changelog file supplied with the crate, or to external resources. (e.g. GitHub releases or custom websites)In the first case, changelog file should follow the minimal set of rules. Also this RFC specifies additional check for
cargo publish, so crate authors will not forget to update changelog before publishing the new version.Changelog rendering on the crates.io can be done through additional link on top bar:

This proposal initially also included a multi-file approach to handling changelogs. (most of the initial comments discuss this part) While I believe it would be good for ecosystem to define stricter conventions around changelogs with enhanced machine readability, but based on response, I've moved this part to a separate (closed) RFC.