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 761284 - Have the latest stable/unstable GNOME API references
Have the latest stable/unstable GNOME API references
Status: RESOLVED OBSOLETE
Product: devhelp
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: devhelp-maint
devhelp-maint
: 760313 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-29 12:14 UTC by Sébastien Wilmet
Modified: 2021-05-17 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Wilmet 2016-01-29 12:14:59 UTC
I think it was discussed several years ago at a developer experience hackfest.

It would be nice to have access in Devhelp to the latest stable and unstable API references of the GNOME and GTK+ libraries, in an easy way.

Probably by downloading the tarballs and extract the docs in there. But Devhelp needs to know where to download the tarballs.
Comment 1 Sébastien Wilmet 2016-01-29 13:00:35 UTC
It was at the DeveloperExperience2014:
https://wiki.gnome.org/Hackfests/DeveloperExperience2014
https://sigquit.wordpress.com/2014/05/01/profiles-in-devhelp/
Comment 2 Frederic Peters 2016-01-29 13:43:36 UTC
developer.gnome.org could provide required info:

https://developer.gnome.org/devhelp.bundles would give a list of available bundles:

  <devhelp-bundles>
    <devhelp-bundle>/devhelp-bundles/gnome-stable.bundle</devhelp-bundle>
    <devhelp-bundle>/devhelp-bundles/gnome-unstable.bundle</devhelp-bundle>
  </devhelp-bundles>

And then those URIs would have pointer to relevant tarballs, ex:

https://developer.gnome.org/bundles/gnome-stable.bundle
→
<devhelp-bundle>
  <title>GNOME 3.18</title>
  <books>
    <book href="/gtk3/gtk3-html-3.18.7.tar.gz"/>
    <book href="/glib/glib-html-2.46.2.tar.gz"/>
  </books>
</devhelp-bundle>

Then devhelp would have to download those and have some way to switch between bundles. (a default bundle would be "distribution-provided documents")
Comment 3 Sébastien Wilmet 2016-01-29 14:36:30 UTC
As a first iteration, let's just download the latest *stable* docs from gnome.org.

There needs to be a fallback: if the latest stable doc is not downloaded, take the one from the distro.

With a menu item to check if new versions are available, and download them. Maybe this can be done automatically at Devhelp startup, and show an infobar or in-app notification with a button to download the new versions.

As a second iteration, a profile system can be added as is done in the aleksander/profiles branch, to choose between stable and unstable (or "development" or whatever word is nicer).

Latest stable and latest unstable are the only two profiles that make sense to me. Of course for each major version, e.g. the latest GTK+ 2 and the latest GTK+ 3.
Comment 4 Frederic Peters 2016-01-29 14:49:51 UTC
I have now manually put those files in place:

  https://developer.gnome.org/devhelp-bundles/index.bundles
  https://developer.gnome.org/devhelp-bundles/gnome-stable.bundle
Comment 5 Sébastien Wilmet 2016-01-29 14:50:25 UTC
And as just discussed at the new hackfest, to know if new versions are available, the manifest file on gnome.org should contain explicitly the library names and versions, in separate tags or attributes. Devhelp would have a copy of the manifest locally and can compare the two versions, and even show update information like "GTK+ 3.18.6 -> 3.18.7".

But this doesn't work for the first Devhelp startup, since the manifest would not yet be downloaded. And maybe the distro has already the latest version. So maybe the manifest should also be included in the Devhelp sources.
Comment 6 Frederic Peters 2016-01-29 15:01:35 UTC
I added title and version attributes.

Let's just download the file on first startup and consider it will always be newer than the local copies.
Comment 7 Christian Hergert 2016-02-06 18:41:18 UTC
In Builder, we will be getting xdg-app integration landing soon. That means that we'll have access to the GNOME SDK (and ideally the docs shipped as part of the SDK, or optionally another runtime which is based on the SDK+devhelp books).

We can access the xdg-app runtime/sdk via a path prefix, so loading from a specific directory would do us just fine when loading the DhBookManager. We just need a hook in DhBookManager to set the search path.
Comment 8 Sébastien Wilmet 2017-04-15 15:11:21 UTC
The TODO file contained an item on "online download", see
commit 8a17ba502a5d52a64a03538d10d7f6b7ddfcabdc.
Comment 9 Sébastien Wilmet 2017-06-29 11:48:12 UTC
*** Bug 760313 has been marked as a duplicate of this bug. ***
Comment 10 Sébastien Wilmet 2018-01-11 08:51:56 UTC
(In reply to Frederic Peters from comment #4)
> I have now manually put those files in place:
> 
>   https://developer.gnome.org/devhelp-bundles/index.bundles
>   https://developer.gnome.org/devhelp-bundles/gnome-stable.bundle

Their content, in case another sysadmin deletes those files:

index.bundles:

<devhelp-bundles version="1">
  <devhelp-bundle>/devhelp-bundles/gnome-stable.bundle</devhelp-bundle>
</devhelp-bundles>

gnome-stable.bundle:

<devhelp-bundle version="1">
  <title>GNOME 3.18</title>
  <books>
    <book title="GTK+" version="3.18.7" href="/gtk3/gtk3-html-3.18.7.tar.gz"/>
    <book title="GLib" version="2.46.2" href="/glib/glib-html-2.46.2.tar.gz"/>
  </books>
</devhelp-bundle>
Comment 11 Sébastien Wilmet 2018-04-28 14:13:01 UTC
There is now a new infrastructure in libdevhelp which will permit to implement this feature more easily: DhProfile, DhSettings and DhBookList.

The books can be downloaded in different directories, one directory for "GNOME stable" and another directory for "GNOME unstable" (or for specific versions). Switching between versions would just be a matter of changing the DhBookList, and adding all the necessary bits to the UI.
Comment 12 GNOME Infrastructure Team 2021-05-17 15:49:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/devhelp/-/issues/39.