Best practice for patches

I wonder what is the best practice for patches ?

My software is rather big and using Delphi 10.42 and DevExpress components.
Before a new release a RC branch is created in git with focus on bugfixes.
Master branch is just the latest commits.

If I now install new Delphi 11.1 on buildserver together with updated Devexpress I can build master branch. But how can I build an old RC branch with old Delphi 10.4.2 and old DevExpress ?

DevExpress source is not committed to git. It is just installed on buildserver.
I understand that it is not supported to have two versions of DevExpress in parallel.

There is no easy answer to this for Delphi. It’s one of my pet peeves with delphi, something that GetIt was supposed to solve but it doesn’t come close.

I’ve been working on an open source package manager to solve this issue for a while now, progress is slow due to limited time as working on our products takes priority.

The idea is to have per project dependencies (which can be different in different branches) - so when you open a project, the package manager ide plugin will download (if needed) the packages and install any design time components. The version of the packages installed will be controlled by the project (not the delphi ide).

On the build server, the command line tool can be used to restore the packages before building. FinalBuilder already has these actions.

Blog posts (read from the bottom up)
https://www.finalbuilder.com/resources/blogs?category=dpm

This is how it looks in the IDE

Of course none of the above solves your problem today, since dpm is not ready for general use yet and devexpress are not on board yet.

My suggestion would be to use variables in the project search path to point to the libraries you are using, do not rely on the global delphi library path. Then you can just copy the devexpress files on to the build server in versioned directories. Or add the libraries to a git repo with branches (thats what we do). Not that on the build server, components don’t need to be installed, you just need the files to be there and available.

Hopefully I will find some time soon to carry on working on the package manager - delphi sorely needs something better than gettit. FWIW, we’re dogfooding it here, we are using in dev for FB9 dev work… only for non visual libararies at the moment and it’s working great.

1 Like