Issue 1524 in ibus: IBUS EngineDesc should expose a version number

43 views
Skip to first unread message

ib...@googlecode.com

unread,
Oct 12, 2012, 1:31:44 AM10/12/12
to ibus-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1524 by mozbug...@gmail.com: IBUS EngineDesc should expose a
version number
http://code.google.com/p/ibus/issues/detail?id=1524

The EngineDesc interface should expose a get_version() API for the engine
version to help engine debugging.



ib...@googlecode.com

unread,
Oct 12, 2012, 2:21:11 AM10/12/12
to ibus-...@googlegroups.com
Updates:
Labels: Component-ibus

Comment #1 on issue 1524 by damage3...@gmail.com: IBUS EngineDesc should
The problem is, we do not specify version when ibus_engine_desc_new().
So we need both ibus_engine_desc_get_version() and
ibus_engine_desc_set_version() I guess.

I once notice a trivial bug of ibus-pinyin:
https://github.com/ibus/ibus-pinyin/blob/master/lua/lua-plugin-init.c#L76

And I then realize that there is no version stuff in C or Python level.
There are Autotools macros, though, which can be utilized.


ib...@googlecode.com

unread,
Oct 12, 2012, 2:27:14 AM10/12/12
to ibus-...@googlegroups.com
Updates:
Cc: takao.fujiwara1

Comment #2 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
You could use IBUS_*_VERSION in ibusversion.h .
The members will be different between 1.4 and 1.5.
It's not IBusEngineDesc only but also other APIs. 1.4.99 is still an
unstable release.

ibus-anthy checkes if ibus_engine_desc_get_symbol is available:
https://github.com/ibus/ibus-anthy/blob/master/configure.ac#L312

ib...@googlecode.com

unread,
Oct 12, 2012, 2:37:18 AM10/12/12
to ibus-...@googlegroups.com

Comment #3 on issue 1524 by damage3...@gmail.com: IBUS EngineDesc should
We are interested in engine version rather IBus version.
Can ibus-pinyin programmatically know its own version?
If so, I'd fix the trivial bug mentioned above.

For IBusEngineDesc, it seems like ibus_engine_desc_new is quite limited.
We'd better use ibus_engine_desc_new_from_xml_node instead.

ib...@googlecode.com

unread,
Oct 12, 2012, 2:39:21 AM10/12/12
to ibus-...@googlegroups.com

Comment #4 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
> For IBusEngineDesc, it seems like ibus_engine_desc_new is quite limited.

We'd suggest to use ibus_engine_desc_new_varargs instead for the new
IBusEngineDesc.

ib...@googlecode.com

unread,
Oct 12, 2012, 3:15:09 AM10/12/12
to ibus-...@googlegroups.com

Comment #5 on issue 1524 by mozbug...@gmail.com: IBUS EngineDesc should
For ibus-pinyin, it set its VERSION to component when creating a component
in PYMain.cc.

For ibus-table, the table text file should contain a version attribute.
This version attribute should be set to the EngineDesc, at main.py.




ib...@googlecode.com

unread,
Oct 12, 2012, 5:26:35 AM10/12/12
to ibus-...@googlegroups.com

Comment #6 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
What purpose do you use that desc version?
I guess the version is not used by ibus framework but it's used to
communicate between ibus-table and each engine?
I wonder if SERIAL_NUMBER in the table database could resolve it.

ib...@googlecode.com

unread,
Oct 12, 2012, 9:03:24 AM10/12/12
to ibus-...@googlegroups.com

Comment #7 on issue 1524 by mozbug...@gmail.com: IBUS EngineDesc should
Yeh, SERIAL_NUMBER was what I meant.

We can identify which table version the users were using by the
SERIAL_NUMBER, i.e. if the SERIAL_NUMBER's are being updated properly.

ib...@googlecode.com

unread,
Oct 12, 2012, 9:45:30 AM10/12/12
to ibus-...@googlegroups.com

Comment #8 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
I mean if ibus-table could check SERIAL_NUMBER and add some functions likes
ibus_table_engine_*, could you resolve your problem within ibus-table
without modifying the IBusEngineDesc for the common engines?



ib...@googlecode.com

unread,
Oct 12, 2012, 10:30:51 AM10/12/12
to ibus-...@googlegroups.com

Comment #9 on issue 1524 by mozbug...@gmail.com: IBUS EngineDesc should
I'm thinking to display the table's SERIAL_NUMBER in ibus-setup-table so
user has a mean to know what version of the table was currently being used.

You can checkout ibus-setup-table from kaio's github tree. That program is
an stand alone program and getting its' information through the exposed
dbus interface. I don't think ibus_table_engin_* can be directly accessed
through the dbus interface of ibus.



ib...@googlecode.com

unread,
Oct 14, 2012, 9:27:19 PM10/14/12
to ibus-...@googlegroups.com

Comment #10 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
I'm thinking if the ibus-table-setup would have the copy of
engine/tabsqlitedb.py, it could get the SERIAL_NUMBER from the engine name
and the db data.

But if you think it's not good, maybe it's ok to implement new
IBusEngineDesc(name=foo, version=foo).



ib...@googlecode.com

unread,
Oct 16, 2012, 8:55:58 PM10/16/12
to ibus-...@googlegroups.com

Comment #11 on issue 1524 by mozbug...@gmail.com: IBUS EngineDesc should
It could. But it might mis-detect the actual table used. Like some tables
installed at users home directory. The benefit of getting the information
directly from the EngineDesc is that the information were exactly what is
used by the Engine.

Also, since the EngineDesc is a GObject and the name, longname...
attributes are actually gobject properties, why not use the set_property
method. that way, no need to change much API in the future expansion.

ib...@googlecode.com

unread,
Oct 16, 2012, 9:01:31 PM10/16/12
to ibus-...@googlegroups.com

Comment #12 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
OK, sounds good to implement the version in IBusEngineDesc.

ib...@googlecode.com

unread,
Oct 17, 2012, 10:04:37 PM10/17/12
to ibus-...@googlegroups.com

Comment #13 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
Here is the tentative patch.

Attachments:
ibus-xx-desc-version.patch 8.3 KB

ib...@googlecode.com

unread,
Oct 19, 2012, 10:47:05 PM10/19/12
to ibus-...@googlegroups.com
Updates:
Status: Fixed

Comment #14 on issue 1524 by takao.fujiwara1: IBUS EngineDesc should expose
(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages