lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.27k stars 162 forks source link

[search] migrate to PCRE2 regex handling #399

Closed lanoxx closed 4 years ago

lanoxx commented 4 years ago

The VTE vte_terminal_search_set_gregex function is deprecated in favor of the new vte_regex_new_for_match. However, when I compile this on Ubuntu 18.04 and invoke the search function, then I get an error that says; PCRE2 not supported, a search for PCRE2 and Ubuntu pretty quickly turns up some results pointing to problem with Ubuntu (see Tilix and Launchpad Bug). Thus I never merged this.

I am putting this code into this merge requests to give it a bit more visibility. It would be nice to get some feedback if this works for any body or on which version of Ubuntu and other distributions this actually works or causes problems. I usually make sure that Tilda can be compiled at least on the current LTS version of Ubuntu. This means that if I merge this in time to make it into Ubuntu 20.04 then the latest tilda version would no longer work on 18.04 which I would like to avoid.

@egmontkob Do you have any suggestions on how to deal with this? I am thinking if I should just leave the current regex support for some more time (e.g. merge this some time after Ubuntu 20.04 is released), or if I should invest the extra effort to add some compile time switches to get the newer regex code working on systems that support PCRE2.

egmontkob commented 4 years ago

Ubuntu 18.04 patched VTE against the recommendation of mainstream VTE developers, patched pcre2 support out of it. They stopped doing this in 19.04.

My personal recommendation:

I usually make sure that Tilda can be compiled at least on the current LTS version of Ubuntu. This means that if I merge this in time to make it into Ubuntu 20.04 then the latest tilda version would no longer work on 18.04 which I would like to avoid.

I know a lot of projects share this attitude, but I do not agree with it. I believe that only an extremely small number of users go ahead and manually compile the newest piece of software on top of an older distribution. A much-much larger user base just uses whatever version is shipped with the distribution. Moreover, if something breaks (a newer version of the software doesn't run on an older distro), users can still use an older version of your software.

That is: making sure that 20.04 will get the best should be magnitudes more important than making sure that a brand new Tilda release runs perfectly on 18.04.

(Also: why care about LTS only? LTS is only about security and other similarly important updates, not about backporting random newer versions of software. Or if you equally care about non-LTS, you should have already made this change. Also: why Ubuntu only, where is Debian, Red Hat / Fedora, Arch... you name it...?)

If you can make Tilda both work perfectly both with older and newer VTE with reasonable developer effort, go for it. If you have to pick one, pick to fully support the future, not the past.

lanoxx commented 4 years ago

@egmontkob I have decided to implement a check for the VTE version and use the depracated search for VTE versions before 0.56.1 and the newer PCRE2 version for 0.56.1 and above. After 20.04.1 will be released I will remove that workaround and only support the newer PCRE2-based version.

You are right with what you write, but I usually stay on the LTS versions of Ubuntu until the next LTS is released. Not because of security but because of the stability that comes with the LTS. So I usually also develop tilda on the current Ubuntu LTS version.

I used to upgrade more often and I often had problems with my system and eventually decided to stick to the LTS versions.