Missing RTTI for interface methods
Original Reporter info from Mantis: abouchez
-
Reporter name: Arnaud Bouchez
Original Reporter info from Mantis: abouchez
- Reporter name: Arnaud Bouchez
Description:
In FPC, RTTI is generated only for properties, not methods.
Whereas since Delphi 6, RTTI is generated for methods, not properties.
This is a showstopper for any serious work with interfaces in FPC, including stub/mock, or services. Interface is the path to abstraction, and implementation of SOA/SOLID patterns. See http://blog.synopse.info/post/2012/10/14/Interfaces-in-practice%3A-dependency-injection,-stubs-and-mocks
Purpose of this bug report is to have the same RTTI level for interfaces as it was available since Delphi 6, since 2002.
BTW this issue is a showstopper for finishing to integrate our mORMot Open Source framework with FPC - remote ORM works well, but interface-based SOA needs RTTI for all methods.
Steps to reproduce:
There is no RTTI available, so we can't state which kind of RTTI is expected.
Perhaps the same information than with Delphi 6, in addition to existing property definition information.
Additional information:
Currently, even the property information is not yet usable - see http://bugs.freepascal.org/view.php?id=25254
As far as I understood procedure objectdef_rtti_interface_full(def:tobjectdef) in ncgrtti.pas, the method-related RTTI is missing for IInvokable.
The same level of RTTI as with Delphi 6 is needed, i.e. nor only the method name (as with vmtMethodTable), but with all parameters information, calling convention and function result.
Mantis conversion info:
- Mantis ID: 26774
- Version: 2.7.1
- Fixed in version: 3.1.1
- Fixed in revision: 35341 (#26135d60)
- Monitored by: » WCampelo (Walter Campelo), » luizamerico (Luiz Americo), » abouchez (Arnaud Bouchez), » EgonHugeist (EgonHugeist/ZeosDevTeam), » @PascalDragon (Sven Barth)