buildtool exclude/include issues

Bug #1550776 reported by Patrick Storz on 2016-02-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Patrick Storz

Bug Description

The buildtool for building Inkscape on Windows has functionality to <include> and <exclude> specific files when compiling/copying/etc.

It seems however that there are some issues when parsing the regular expressions used for this functionality.
For example it's impossible to exclude *.a and *.la files from a library folder that contains dots (".") in the filename (I hit this issue with \lib"\gdk-pixbuf-2.0\2.10.0\loaders", the exclusion rule was "<exclude name=".*\.la"/>")

Since it seems that the library for parsing regular expressions [1] is known to have problems and is unmaintained I suggest to replace it with an alternative that does not have such issues and is actively maintained.

Attached is a simple patch that uses SLRE (Super Light Regular Expression library, [2]) instead.
In my tests it worked flawlessly, handled regular expressions as expected and didn't choke on any of the patterns I've thrown at it, so I guess it would be a reasonable replacement.

[1] T-Rex,

Patrick Storz (ede123) wrote :
tags: added: build win32 win64
jazzynico (jazzynico) wrote :

Nice suggestion!
Note that it's probably a temporary fix since the current goal regarding the build systems is to use cmake for all operating systems (and thus drop btool).

Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
importance: Undecided → Wishlist
status: New → In Progress
Patrick Storz (ede123) wrote :

Yes, since cmake is in the works I aimed for a quick fix.

SLRE was most easy to implement (I actually spent more time to figure out why the exclusion rule wasn't working than it took to switch the library) and if no regressions are found I think it'll be a good choice for the transition period.

If anybody finds any regressions* or has any objections please let me know, otherwise I'll go forward and commit the changes soon.

* there is one "regression" with extensions since we exclude ".*\.in" which obviously not only matches the intended ".in" file extension but als ".inx". This is however easily fixed, for example by matching only at the end of strings: ".*\.in$"

Patrick Storz (ede123) wrote :

Committed in revision 14689

Changed in inkscape:
status: In Progress → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released
milestone: none → 0.92
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers