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 154520 - can't inherit from inhibited interface
can't inherit from inhibited interface
Status: RESOLVED FIXED
Product: orbit-cpp
Classification: Deprecated
Component: idl-compiler
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Bowie Owens
Bowie Owens
Depends on:
Blocks: 101455
 
 
Reported: 2004-10-05 02:19 UTC by Bowie Owens
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bowie Owens 2004-10-05 02:19:22 UTC
Try and inherit from Bonobo::Unknown when it is included as it should be.

The bug comes from the fact that only un-inhibited interfaces have all the
scope, base list, and other data structures set up correctly. Even though that
information is available from the inhibited IDL_tree nodes.

I've made a start at creating an Interface representation that doesn't rely on
construction from an un-inhibited IDL_tree interface. But the problem is the
getItem() method. Most types have the same flaw as interface. So I pretty much
have to fix all of them to fix anything.
Comment 1 Bowie Owens 2004-10-05 02:44:10 UTC
Bryan, thanks for your email (posted below). I've identified this as a bug in
the way inhibited interfaces are handled. I know how to fix it but the problem
is it involves a whole lot of little changes. Hopefully I'll snare some time for
this soon. I've made a start but it doesn't help much. In the mean time the you
should be able to get by with -D'ing all the __xxx_COMPILATION guards that are
inhibit'ing interfaces.

Bryans email:

I'm trying to generate some orbit classes to wrap evolution-data-
server's API and it relies heavily on bonobo.  I've been trying to
generate the cpp source with orbitcpp like this:

orbit-idl-2 --headerguardprefix=EVOLUTION_CALMM_ -
I /usr/share/idl/evolution-data-server-1.0 -I /usr/share/idl/bonobo-2.0
-I /usr/share/idl/bonobo-activation-2.0 /usr/share/idl/evolution-data-
server-1.0/Evolution-DataServer-Calendar.idl

orbit-idl-2 -lcpp -D__GNOME_Evolution_Calendar_CalView_COMPILATION -
I /usr/include/libbonobomm-2.6/bonobomm/ -I /usr/share/idl/evolution-
data-server-1.0 -I /usr/share/idl/bonobo-2.0 -I /usr/share/idl/bonobo-
activation-2.0 /usr/share/idl/evolution-data-server-1.0/Evolution-
DataServer-Calendar.idl

but I get this error: /usr/share/idl/bonobo-
activation-2.0/Bonobo_Unknown.idl:28: unknown
identifier ::Bonobo::Unknown

I know ::Bonobo::Unknown is defined in libbonobomm, but I'm not sure how
to tell orbitcpp that.  Thanks in advance!

Comment 2 Murray Cumming 2004-10-05 06:11:56 UTC
What is an "inhibited interface"?
Comment 3 Bowie Owens 2004-10-05 06:18:17 UTC
Any interface that is inhibit'ed by a pragma or an only-top command line option.
 The idl parser doesn't tell us about them when it parses them. But it does pass
us an IDL_tree with all the info needed when they are referenced later. In the
problematic code Bonobo::Unknown is inhibited.

#pragma inhibit push
module Bonobo {
 interface Unknown {
 };
};
#pragram inhibit pop

module GNOME {
module Evolution {

module Calendar {

// Bonobo::Unknown seems to be undefined because we haven't set up the C++
// data-structures. But everything we need to know is there in IDL_tree.
 interface CalView : Bonobo::Unknown {
 };
};
};
};

Comment 4 Bowie Owens 2004-10-13 04:59:53 UTC
I've reworked enough classes that we should be able support interfaces within an
inhibit block properly. Although, I've hit a temporary snag which because
IDLSequence doesn't work properly without active typedefs. See bug 155258. Once
that is out of the way I should be able to debug the changes made to get this far.
Comment 5 Bowie Owens 2004-10-20 00:30:14 UTC
Hope you're still with me Bryan. I have hacked away at the idl compiler back end
such that it can now handle inheritance from inhibited interfaces. The changes
are pretty substantial and wide ranging (why I've been too lazy to do it until
now). As such there are a few bugs to sort out. In particular the generated code
is no longer able to be compiled. That should be relatively easy to fix in
comparison.
Comment 6 Bowie Owens 2004-10-20 05:14:02 UTC
Bryan, I've fixed enough things that Evolution-DataServer-Calendar.idl can be
parsed by orbitcpp. I haven't tried compiling the code that is generated. I hope
you haven't lost interest in this because I would appreciate some testing from you.
Comment 7 Bryan Forbes 2004-10-20 15:44:53 UTC
I just got my laptop (my only linux box) back from the shop, so I'll be testing
this in the next few days.
Comment 8 Bowie Owens 2004-10-29 05:09:00 UTC
Ok, I've tried compiling the generated source for
Evolution-DataServer-Calendar.idl. Naturally, it's not working at the moment.
I've fixed a few things but I stopped at a problem with the Calendar namespace
at the bottom of GNOME::Evolution::Calendar getting dropped at in some places.
Not sure what is going on but it should be easy to fix (until the next problem
crops up), but it'll take a few days before I can spend some time on this.
Comment 9 Bowie Owens 2004-11-03 01:33:40 UTC
The problem with the namespace getting dropped is fixed. The next problem is
duplicate entries are appearing in the skeleton code. Maybe have it sorted
tommorrow sometime.
Comment 10 Bowie Owens 2004-11-04 00:27:50 UTC
Finally! Orbitcpp copes with Evolution-DataServer-Calendar.idl and it even
generates output that compiles. I've had to do a lot of hacking to get this to
come together so I don't know if the generated code will run properly. Hope so.

You may notice that the tests don't build at the moment. The code that handles
Unions needs to be brought in line with the recent changes. This doesn't impact
on the Evolution-DataServer-Calendar.idl but does impact on Bonobo (so don't try
rebuilding Bonobo just yet).
Comment 11 Bowie Owens 2004-11-30 05:32:02 UTC
I fixed the Union problem I mentioned above (along with some other stuff). So
Bonobo builds and so do the tests. If you are still interested in the
Evolution-DataServer-Calendar.idl stuff, I'd appreciate confirmation that it
builds for you (it does for me).