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 690464 - same $VERSION in all modules
same $VERSION in all modules
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2012-12-18 23:25 UTC by Kevin Ryde
Modified: 2013-07-29 21:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test module containing tests that use Test::ConsistentVersions (452 bytes, application/octet-stream)
2013-02-28 07:14 UTC, Brian Manning
Details

Description Kevin Ryde 2012-12-18 23:25:22 UTC
Glib::Object::Subclass has a $VERSION set to 0.03 whereas the main Glib-Perl version number is 1.280 or whatever.  It'd be good if the $VERSION were the same throughout.

(Glib::ParseXSDoc, Glib::GenPod, Glib::CodeGen and Glib::MakeHelper have 0.03 or 1.03.)

Updating all the $VERSION for a release can be a bit of a chore.  I use an emacs search-and-replace.  There's a Test::ConsistentVersion which can check that all modules in a dist have the same version number.  It normally looks for a Changes file too, but an undocumented "no_changelog" option suppresses that (and the README check can be suppressed too, if not having the version number in the README).
Comment 1 Torsten Schoenfeld 2013-02-16 20:45:47 UTC
The work required for a release really is the problem here, I think.  Brian, you've been doing the releases lately, so what do you think?

Coincidentally, there's been discussion about this problem recently on the module-authors list: <http://markmail.org/thread/426ayvgqem3joe5s>.
Comment 2 Torsten Schoenfeld 2013-02-17 11:15:20 UTC
Brian writes that he's OK with this change.  So let's do it.  Kevin, can you come up with a patch, preferably including a unit test that does something like the following?

  ok ($Glib::VERSION == $Glib::CodeGen::VERSION == ...)
Comment 3 Kevin Ryde 2013-02-17 20:16:18 UTC
For that module-authors thread I think I'm in the same-version-throughout-the-dist camp :).  Too hard to remember to increment per-file versions at sensible times, and hard for a user to find what number to depend on if there's only a single Changes file.

For tests I've tended to put an explicit "my $want_version = 1.234" in each .t file which exercises a module and its version number.  Which is even more work to update for a dist, though emacs search-and-replace makes it easy enough.  Testing everything else against Glib->VERSION() may be enough.  I'll see if I can do something like that.
Comment 4 Brian Manning 2013-02-28 07:14:19 UTC
Created attachment 237580 [details]
Test module containing tests that use Test::ConsistentVersions
Comment 5 Brian Manning 2013-02-28 07:14:56 UTC
I took a look at Test::ConsistentVersion... it works, but I had to turn most of the functionality off... We don't put the version in the README file, we no longer use Changelog, and the VERSION block is in none of our POD pages currently.  It does however check all of the static *.pm files, so it has some usefulness.  Here's a quick test that includes Test::ConsistentVersion, please try to run 'make test' both before and after installing Test::ConsistentVersion, in order to verify it works with a clean system and one that has that test module installed.
Comment 6 Brian Manning 2013-02-28 07:24:02 UTC
Also pushed to private github repo if you want to pull the change from there:

https://github.com/cpanxaoc/perl-Glib.git
Comment 7 Kevin Ryde 2013-03-03 23:25:20 UTC
> I took a look at Test::ConsistentVersion... it works, but I had to turn most of
> the functionality off... We don't put the version in the README file, we no
> longer use Changelog, and the VERSION block is in none of our POD pages
> currently.

Yes, I don't put a version in readme or the pod parts of my stuff either.

> It does however check all of the static *.pm files, so it has some
> usefulness.

Yes, that's it's best thing.  I think I had trouble at one time with some .pm files which only loaded with dependent modules.  That probably doesn't apply to glib.  If it's an author-only test you don't rely on what the final user has available anyway.
Comment 8 Brian Manning 2013-07-29 00:56:57 UTC
Fixed in release 1.30.0 of Glib.