[Development] Switching from create_changelog.pl to createchangelog for change log generation

Cristián Maureira-Fredes Cristian.Maureira-Fredes at qt.io
Tue Apr 2 13:46:24 CEST 2019


Hello Mitch,

On 4/2/19 11:40 AM, Mitch Curtis wrote:
> Currently change files are generated using create_changelog.pl from qtsdk.git [1]. This works OK, but misses a lot of bug fixes. For example, the 5.12.3 release of Qt Quick Controls 2 has a bunch of fixes, but create_changelog.pl still results in the "This release contains only minor code improvements" message:
> 
> https://codereview.qt-project.org/#/c/257810/1//ALL

Totally agree, that perl tool needs a bit of love, and it doesn't fit
all the needs from the different project we have in Qt.

> Simon wrote createchangelog [2], which includes any changes with a Jira task number. To quote what the tool does:
> 
> commit 66f33fecc3b4a2896a4f33a3a7f06fb5cdd36dc8
> Author: Simon Hausmann <simon.hausmann at theqtcompany.com>
> Date:   Thu Feb 25 16:54:02 2016 +0100
> 
>      Added little helper tool to create an initial changelog template for a module
>      
>      Simply run the binary in the module directory with the correct branch checked
>      out.  The tool will peek at .qmake.conf to figure out the current version and
>      run git tag -l to see what the previous version is.
>      
>      The resulting change log requires manual editing, but it is a start.
>      
>      Change-Id: I975c0d7a74fee8cab2ae6f400972c5dbc73ff367
>      Reviewed-by: Robin Burchell <robin.burchell at viroteck.net>

I found that we had two tools to achieve the same
a couple of weeks ago, and I again agree that it's better than the perl
option.

> 
> And the README:
> 
>      This little tool faciliates the creation of change log files for Qt modules. It is written in golang and
>      can be built by running
> 
>          go build
> 
>      With the binary in place, you can use it like this:
> 
>          1. Change into a directory that contains a git clone of the module you'd like to create a change log for.
>          2. Make sure you have the release branch checked out that you'd like to create the file for.
>          3. Run the createchangelog tool from there.
>          4. The tool will parse .qmake.conf to determine the version of the upcoming release and it will use "git tag -l" to
>             determine the previous release, in order to look through the git commits between the previous release and HEAD.
>          5. The proposed template output of the new change log file is printed to standard output, from which you can redirect
>             it to a file and edit it accordingly.
> 
> To show examples of what the tool generates, I've attached its output when run on the 5.12.3 and dev branches of qtquickcontrols2.git.
> 
> So, the end result of switching to this is that it becomes clearer that we are actually fixing (non-trivial) bugs, contrary to what the "only minor code improvements" message says. Yes, it does mean that you will have to edit more stuff, but it's mostly just removing commit message bodies, which are included (if I understand correctly) in order to give more context than would otherwise be available had it just included the commit summary.
> 
> If no one has any serious objections, I'd like for us to start using this to create the draft change file commits as soon as possible.

Here is where I have a couple of issues.

Even though the code is not so complicated or long,
the build process is just a couple of seconds,
but having to build it on the first place is kind of "meh".

It's true that I can just build it once, and then forget about
it and just continue using it, but I'm under the impression the tool
also could evolve a bit more.

Moving around the script to generate changelogs is also something
that needs to be improve, since a command line option is the natural 
solution.

The project parses the .qmake.conf so any project that doesn't have one
will be unable to use it, e.g.: PySide.

I know it's a feature of Go, but this also assumes that
the repositories:
go: finding github.com/eidolon/wordwrap v0.0.0-20161011182207-
go: finding github.com/hashicorp/go-version v1.1.0
go: finding github.com/andygrunwald/go-jira v1.6.0
go: finding github.com/trivago/tgo/tcontainer latest
go: finding github.com/google/go-querystring/query latest
go: finding github.com/fatih/structs v1.1.0
go: finding github.com/pkg/errors v0.8.1
go: finding github.com/google/go-querystring v1.0.0
go: finding github.com/trivago/tgo v1.0.6

will not change their names, or that the users will not remove
their accounts, otherwise we will need to find our workarounds
by not using those modules.

Maybe someone with more "Go knowledge" than my limited
"hello world"-level can see if we can rely purely on the go
standard library?


Since I mentioned that I faced the problem of looking for a
"create change logs" tool, I wrote a simple /kind-of/ equivalent
script in Python to use it on the PySide project:
https://codereview.qt-project.org/#/c/252162/

At the moment does not have the option to specify another repository
because it was an ad-hoc solution for the PySide project,
but my point is that it doesn't depend on external modules
(only standard library ones), and include the perks of being a script
(no build required).


I would love to have only one tool to rule-them-all,
so maybe you can address at least the PySide compatibility issue so
the PySide project can use it too.
Maybe it's just two extra lines, and my Go-ignorance doesn't allow me
to see it clearly, but it will be really nice to be able to use it! :D


Cheers

PS: Maybe some kind soul that speaks "Perl" can improve the current
script?

-- 
Dr. Cristian Maureira-Fredes
Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin

Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
--



More information about the Development mailing list