[Github-comments] [geany/geany] RFC: Include Scintilla version in debug info (Discussion #3108)

Robert Di Pardo notifications at xxxxx
Fri Jan 21 13:58:58 UTC 2022


### Suggestion

The debug information at `Help > Debug Messages` should report the Scintilla version Geany was linked against.
Lexilla should have its own entry as well, given its [divergent release cadence].

### Example

![geany_enhanced_debug_msgs](https://user-images.githubusercontent.com/59004801/150536019-eb8a50ea-7eea-46ee-9ecc-f6c77c618633.png)

### Motivation

Issues could be more easily traced to a precise library version.
Users could locate this otherwise obscure information without leaving the app.

### Implementation

The main problem is how to expose the libraries' versions at compile time. I've had some luck with the following approach:

1. write a script to parse the content of `scintilla[/lexilla]/version.txt` and return the appropriate version (based on input) in semver format

2. call the script in `configure.ac` via the [`m4_esyscmd`] macro, assigning the script output to preprocessor definitions for each version

3. use the definitions in `src/libmain.c` to extend Geany's debug output

### Questions

My concern is that step _2_ may be disruptive to the build workflow. Some potential issues that come to mind:

- builds targeting Windows would need access to a POSIX shell (if they don't already . . . I've never tried to package Geany 😊)

- calling `m4_esyscmd` on a failing script does not crash `autoreconf` [^1]. But aborting in that case might be better than generating an incomplete `config.h` header

This thread is here to gather input, especially with regard to the acceptability of using `m4_esyscmd` in the build.

A search for similar topics found only an open RFC about [documenting lexer properties].

[^1]: "The error output of _shell-command_ is not a part of the expansion: it will appear along with the error output of m4." <https://www.gnu.org/software/m4/manual/html_node/Esyscmd.html#index-esyscmd>

[divergent release cadence]: https://groups.google.com/g/scintilla-interest/c/1VWWqoJ_kmA/m/mfqpF1tjAgAJ
[`m4_esyscmd`]: https://www.gnu.org/software/m4/manual/html_node/Esyscmd.html#index-esyscmd
[documenting lexer properties]: https://github.com/geany/geany/issues/2517


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3108
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/repo-discussions/3108 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220121/8363e954/attachment.htm>


More information about the Github-comments mailing list