This pull request replaces https://github.com/geany/geany/pull/2830 with the latest tagged ctags version. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2984
-- Commit Summary --
* <a href="https://github.com/geany/geany/pull/2984/commits/8283e46d65065bb031ef7f5093bb40fa0efd2409">Update update-ctags.py to copy some files from the dsl directory</a> * <a href="https://github.com/geany/geany/pull/2984/commits/140fec8a3439c03ac3ec278c9c25281ad75da81a">Update to version p5.9.20211031.0 of ctags</a> * <a href="https://github.com/geany/geany/pull/2984/commits/5b123972fbde3c12c765ebf689d1ab21d0320c81">Call initRegexOptscript() in tm_ctags_init()</a>
-- File Changes --
M ctags/Makefile.am (10) A ctags/dsl/es.c (3332) A ctags/dsl/es.h (274) A ctags/dsl/optscript.c (4422) A ctags/dsl/optscript.h (88) A ctags/main/CommonPrelude.c (162) M ctags/main/args.c (106) M ctags/main/dependency.c (47) M ctags/main/entry.c (48) M ctags/main/entry.h (17) M ctags/main/entry_p.h (2) M ctags/main/error.c (8) M ctags/main/field.c (1036) M ctags/main/field.h (43) M ctags/main/field_p.h (15) M ctags/main/flags.c (13) M ctags/main/flags_p.h (3) M ctags/main/fmt.c (4) M ctags/main/htable.c (94) M ctags/main/htable.h (23) M ctags/main/kind_p.h (1) A ctags/main/lregex-default.c (127) A ctags/main/lregex-pcre2.c (140) M ctags/main/lregex.c (1542) M ctags/main/lregex_p.h (51) M ctags/main/main.c (9) M ctags/main/mio.c (27) M ctags/main/options.c (762) M ctags/main/options.h (1) M ctags/main/options_p.h (17) M ctags/main/parse.c (233) M ctags/main/parse.h (13) M ctags/main/parse_p.h (12) M ctags/main/parsers_p.h (21) M ctags/main/promise.c (45) M ctags/main/promise.h (4) M ctags/main/ptag.c (10) M ctags/main/ptag_p.h (7) M ctags/main/ptrarray.c (69) M ctags/main/ptrarray.h (9) M ctags/main/read.c (44) M ctags/main/read_p.h (4) M ctags/main/repoinfo.h (2) M ctags/main/routines.c (1) M ctags/main/routines.h (3) M ctags/main/routines_p.h (3) A ctags/main/script.c (527) A ctags/main/script_p.h (62) M ctags/main/seccomp.c (7) M ctags/main/selectors.c (21) M ctags/main/selectors.h (3) M ctags/main/strlist.c (10) M ctags/main/strlist.h (16) M ctags/main/subparser.h (2) M ctags/main/tokeninfo.c (4) M ctags/main/tokeninfo.h (8) M ctags/main/trace.c (16) M ctags/main/trace.h (26) M ctags/main/vstring.c (7) M ctags/main/vstring.h (6) M ctags/main/writer-ctags.c (66) M ctags/main/writer-json.c (8) M ctags/main/writer.c (8) M ctags/main/writer_p.h (4) M ctags/main/xtag.c (6) M ctags/main/xtag_p.h (12) M scripts/update-ctags.py (5) M src/tagmanager/Makefile.am (1) M src/tagmanager/tm_ctags.c (1)
-- Patch Links --
https://github.com/geany/geany/pull/2984.patch https://github.com/geany/geany/pull/2984.diff
Tested on Windows: compiles fine and symbol parsing still works. I did not perform more testing than this. Will test on Linux in daily use from now on.
Also did a short code review on the non-ctags core changes and they are fine to me. I'd vote for quickly merging this PR, to get more testing by having it in master.
@techee could you squash some commits or re-push the last commit, e.g. with: `git ci --amend --no-edit && git push origin ctags_updatep5.9.20211031.0 --force` to trigger Travis CI (it is working again).
@eht16 Done. I actually made these commits from a new VM where I forgot to set up .gitconfig so repushed with corrected committer.
@eht16 Any idea what's wrong with the MINGW build? ``` In file included from /home/travis/build/geany/geany/ctags/main/parse_p.h:17:0, from /home/travis/build/geany/geany/src/tagmanager/tm_ctags.c:18: /home/travis/build/geany/geany/ctags/main/lregex_p.h:27:10: fatal error: regex.h: No such file or directory #include <regex.h> ^~~~~~~~~ compilation terminated. ``` I think regex.h was included also before these patches, how was it handled on MINGW?
I think regex.h was included also before these patches, how was it handled on MINGW?
It was included before but only in `ctags/main/lregex.c`. On Windows, we use the bundled regex library in `ctags/gnu_regex` and this is added to `AM_CPPFLAGS` in `ctagsMakefile.am` but not in `src/tagmanager/` where it is now **also** included because the `regex-h` include itself is now in a header file.
One solution could be: ``` diff --git a/src/tagmanager/Makefile.am b/src/tagmanager/Makefile.am index 066192b95..53759db0d 100644 --- a/src/tagmanager/Makefile.am +++ b/src/tagmanager/Makefile.am @@ -3,6 +3,12 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/ctags/main \ -DGEANY_PRIVATE \ -DG_LOG_DOMAIN="Tagmanager" + +if USE_BUNDLED_REGEX +noinst_LTLIBRARIES += libgnu_regex.la +AM_CPPFLAGS += -I$(srcdir)/gnu_regex +endif + AM_CFLAGS = \ $(GTK_CFLAGS) \ @LIBGEANY_CFLAGS@ ```
I'll try this tomorrow on my Windows machine and see if it'll suffice.
@techee I opened https://github.com/techee/geany/pull/3 to fix the `regex.h` issue. Corresponding build: https://app.travis-ci.com/github/geany/geany/jobs/547414665.
@techee pushed 1 commit.
0fedbe775a78c3c7aaf4ec63b83230cdc73ddfee Use bundled regex library for tagmanager if necessary
@eht16 Thanks!
If nobody stops me, I'll merge this in a few days as it looks good and only gets better testing in master.
If nobody stops me...
I won't :-).
Merged #2984 into master.
Thanks!
What do you think about #2990 (which from my perspective could be merged too) and #2991?
github-comments@lists.geany.org