After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783644 - gtk-doc expects source-highlight
gtk-doc expects source-highlight
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: module sets
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2017-06-10 20:39 UTC by Rafael Fontenelle
Modified: 2017-08-07 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk-doc: disable source-highlight dependency (944 bytes, patch)
2017-06-10 20:39 UTC, Rafael Fontenelle
none Details | Review
3.26: gtk-doc depends on source-highlight (961 bytes, patch)
2017-08-06 13:27 UTC, Rafael Fontenelle
committed Details | Review

Description Rafael Fontenelle 2017-06-10 20:39:28 UTC
Created attachment 353548 [details] [review]
gtk-doc: disable source-highlight dependency

gtk-doc is being built with highlight support enabled, even though it might not be available in the system. Without source-highlight installed, gtkdoc-fixxref fails.

No sure whether it is interesting to have source-highlight as sysdep, but I attached a patch that at least disable this depedency.

Currently, gnome-software fails with the following traceback:
Traceback (most recent call last):
  • File "/home/rffontenelle/jhbuild/install/bin/gtkdoc-fixxref", line 59 in <module>
    fixxref.Run(options)
  • File "/home/rffontenelle/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 114 in Run
    FixCrossReferences(options)
  • File "/home/rffontenelle/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 217 in FixCrossReferences
    FixHTMLFile(options, full_entry)
  • File "/home/rffontenelle/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 242 in FixHTMLFile
    repl_func, content, flags=re.DOTALL)
  • File "/usr/lib/python3.6/re.py", line 191 in sub
    return _compile(pattern, flags).sub(repl, string, count)
  • File "/home/rffontenelle/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 239 in repl_func
    return HighlightSource(options, m.group(1), m.group(2))
  • File "/home/rffontenelle/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 354 in HighlightSource
    [config.highlight] + shlex.split(highlight_options) + [temp_source_file]).decode('utf-8')
  • File "/usr/lib/python3.6/subprocess.py", line 336 in check_output
    **kwargs).stdout
  • File "/usr/lib/python3.6/subprocess.py", line 403 in run
    with Popen(*popenargs, **kwargs) as process:
  • File "/usr/lib/python3.6/subprocess.py", line 707 in __init__
    restore_signals, start_new_session)
  • File "/usr/lib/python3.6/subprocess.py", line 1326 in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/source-highlight'

Comment 1 Rafael Fontenelle 2017-06-12 18:53:45 UTC
Review of attachment 353548 [details] [review]:

Committed
Comment 2 Sébastien Wilmet 2017-08-01 14:07:38 UTC
Syntax highlighting is useful, without knowing it I've compiled several GNOME modules and uploaded tarballs without syntax highlighting in the code examples…

For a concrete example, see the code example at:
https://developer.gnome.org/gspell/1.5/GspellTextView.html#gspell-text-view-basic-setup
it doesn't have syntax highlighting…

Thank you very much!

Has the patch actually been reviewed before pushing it in jhbuild?
Comment 3 Sébastien Wilmet 2017-08-01 14:18:58 UTC
And it is not only about syntax highlighting, normally the functions and types are links.
Comment 4 Sébastien Wilmet 2017-08-01 14:47:23 UTC
This is the kind of little thing that makes me sick of the GNOME community. The level is seriously decreasing.
Comment 5 Rafael Fontenelle 2017-08-01 15:39:56 UTC
Yes, it was marked as "accepted-commit_now". Considering your comments, I reverted it (commit 2669beac)
Comment 6 Sébastien Wilmet 2017-08-01 16:02:17 UTC
To explain a bit more why this was not a good patch to merge, most GNOME maintainers use jhbuild. When doing releases, a GNOME maintainer runs `make distcheck` (with Autotools), which generates the HTML docs for the library. Then the tarball is uploaded, the API documentation is shown on developer.gnome.org and other developers can install the "-doc" package from their Linux distribution to read the documentation in Devhelp. The HTML pages generated during `make distcheck`, run by the maintainer using jhbuild, is what "consumers" of the library will get as documentation. The HTML pages are not (completely) re-generated to show them on developer.gnome.org or to package them in Linux distros.
Comment 7 Michael Catanzaro 2017-08-01 23:15:41 UTC
I'm totally fine with adding a source-highlight sysdep. But obviously we have to disable use of source-highlight until or unless we do so.

Sebastien, sorry for the breakage. Please understand we're just trying to keep things building. :) I think this is actually the first time that turning off a feature has affected tarball generation, at least that I remember. It's unfortunate and suggests we need to be especially careful when touching gtk-doc in the future. But the status quo, broken dependency/build, is also not OK.
Comment 8 Sébastien Wilmet 2017-08-02 06:54:32 UTC
I see that in the configure.ac of gtk-doc the default is --with-highlight=auto, why is it causing a problem?
Comment 9 Michael Catanzaro 2017-08-02 08:21:48 UTC
I don't know why it is causing a build problem, but you just explained yourself why relying on autodetection is unacceptable. :) Surely source-highlight needs to be a sysdep.
Comment 10 Sébastien Wilmet 2017-08-03 11:50:00 UTC
It was maybe just a gtk-doc bug because of the Python porting.

Things will be much better with BuildStream.
Comment 11 Rafael Fontenelle 2017-08-03 13:02:34 UTC
I don't think it is in gtk-doc, as some other modules were enabling RPM (which as on auto as well) when it was not available. See #783461
Comment 12 Michael Catanzaro 2017-08-04 19:01:22 UTC
Please either add source-highlight to sysdeps (preferred) or else revert this revert so that it's disabled for everyone. I don't want surprise nondeterministic behavior.

I agree BuildStream will make this much better. :)
Comment 13 Rafael Fontenelle 2017-08-06 13:27:43 UTC
Created attachment 357059 [details] [review]
3.26: gtk-doc depends on source-highlight

The attached patch includes source-highlight to sysdeps-3.26 and add it as a dependency of gtk-doc in core-deps-3.26.
Comment 14 Michael Catanzaro 2017-08-06 14:38:05 UTC
Review of attachment 357059 [details] [review]:

Thanks!
Comment 15 Rafael Fontenelle 2017-08-06 19:48:10 UTC
Review of attachment 357059 [details] [review]:

Committed: 9f214f2f7cb58151873f1723734c95e7fdb4bf58
Comment 16 Sébastien Wilmet 2017-08-07 17:49:56 UTC
Thank you Rafael. It's normal if I'm a bit pissed off from time to time, don't worry ;)
Comment 17 Rafael Fontenelle 2017-08-07 19:54:47 UTC
No problem at all, Sébastien. If it was me in your position, I'd probably get mad as well. Actually, I'm glad you pointed it out, as I really didn't know whether it was a important dependency or not.