Skip to content

E3 385: Update patching mechanism

Simon Rose requested to merge E3-385 into master

The previous patching mechanism could accidentally apply patches that were not meant for a given version. For example, if you had patches for a.b.c and for a.b.c-x in the patch/Site directory, then trying to apply patches for a.b.c would attempt to apply patches for both versions. Given that - is an allowed string in version numbers, this is an issue.

The solution that seems simplest is to place the patches in separate directories for each module version. This not only makes it simple to separate the patches, but it also makes it easier to copy patches over to a new version.

One potential concern is that this breaks backwards compatibility for require build. I have added a check to see if there would be any old-style patches that could match the patching system, which will generate a warning.

Due to compatibility breaking, we probably should update require to at least 3.5.0 or possibly 4.0.0 .

Merge request reports