show compiled extensions in --version, traceback

Bug #131019 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

The --version output and the display of a traceback should include a line like

  using compiled extensions: knit, bencode, blah, blah

Tags: version
Revision history for this message
Alexander Belchenko (bialix) wrote :

This could be done either implicitly (by inspecting sys.modules) or explicitly (require that each compiled extension during initialization will register himself in some internal registry). Explicit is better than implicit, but it will cost extra calls.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Martin Pool (mbp) wrote :

Doing it from bzr --version may be a bit nontrivial because there are many extensions that we don't or shouldn't even attempt to load when running --version. So we might need to either have a list of known extensions, or search through the directory of bzrlib. (And in that second case we need to be careful if running from a zip or exe or similar.)

Mentioned in https://code.edge.launchpad.net/~mbp/bzr/406113-extension-warnings/+merge/9410

Revision history for this message
Martin Pool (mbp) wrote :

I think this bug is soon almost obsolete, if the fix for bug 406113 is merged:

If we crash, apport will include information about all loaded modules.

If we succeed but some things are not loaded, we will give a warning and/or mutter.

Then in the normal case that the extensions are loaded ok, there's no need to say anything in --version.

Martin Pool (mbp)
Changed in bzr:
assignee: nobody → Martin Pool (mbp)
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 131019] Re: show compiled extensions in --version, traceback

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> I think this bug is soon almost obsolete, if the fix for bug 406113 is
> merged:
>
> If we crash, apport will include information about all loaded modules.

Except if you are on Windows or Mac where we don't have apport....

>
> If we succeed but some things are not loaded, we will give a warning
> and/or mutter.
>
> Then in the normal case that the extensions are loaded ok, there's no
> need to say anything in --version.
>

Good enough for now. Though because a crash will suppress the
failed-to-load warnings, we are still sub-optimal on Windows.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqqVZ8ACgkQJdeBCYSNAAO2FwCeLiqHU8t3m94tVThLKmOL/9ER
mkwAoMhuwBxVYGgTuqm74PuZAoMd5BAb
=Jj/i
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote :

2009/9/11 John A Meinel <email address hidden>:
> Martin Pool wrote:
>> I think this bug is soon almost obsolete, if the fix for bug 406113 is
>> merged:
>>
>> If we crash, apport will include information about all loaded modules.
>
> Except if you are on Windows or Mac where we don't have apport....

True, it's not a total fix. People there are more likely to be
running official packages, therefore we only need to make sure the
extensions are built correctly once. (Except they might be coming
from fink or similar or Mac, or cygwin on Windows...)

We could include the list of extension failures in the traceback.

I do think apport will work ok on those platforms or be easy to fix,
and we should bundle it. Giving a crash file will probably be even
more appreciated by people not used to copying errors from terminals.
Alexander tried it and it looks like it will work but the dependencies
are annoying.

--
Martin <http://launchpad.net/~mbp/>

Martin Pool (mbp)
Changed in bzr:
assignee: Martin Pool (mbp) → nobody
importance: Medium → Low
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: version
removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.