#1 2013-08-26 11:12:00

davidheffernan
Member
Registered: 2013-05-16
Posts: 22

Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

I recently discovered that Synopse.inc has this code:

{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

I don't understand why, but for 64 bit targets only, this means that any DUnit projects that include a unit that includes Synopse.inc, fail to enumerate test methods.  I'm building with XE3.

It seems to me that these options should not be specified in the Synopse.inc file.  The appropriate place for them is in the .dpr file.  Since they have an impact on the entire project, it feels wrong that they appear in Synopse.inc.

Offline

#2 2013-08-26 11:21:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

The 64 bit issue did not appear by us.
But we do not use DUnit, but the test classes included within SynCommons, which relies on "old RTTI".

I do not understand why it impact the entire project, whereas they are meant to be local.
http://docwiki.embarcadero.com/RADStudi … e_(Delphi)
http://docwiki.embarcadero.com/RADStudi … e_(Delphi)

Sounds like a XE3 bug.
You can just comment this part of the Synopse.inc content to circumvent this bug.

Offline

#3 2013-08-26 14:45:18

davidheffernan
Member
Registered: 2013-05-16
Posts: 22

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

Yes, I know I can comment this out. But if Synopse.inc breaks RTTI in my project, for sure it will affect others. Anyway, I can work around it, but you may wish to dig a bit deeper for the benefit of your other users.

Offline

#4 2013-08-26 15:04:40

chapa
Member
Registered: 2012-04-30
Posts: 117

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

I confirm it brokes my RTTI also. XE2-XE4 as far as I tried, maybe other versions too.
It has been commented here.

Every time after full BUILD the problem occurs. Then if I modify only one unit and COMPILE, everything runs ok then.

Offline

#5 2013-08-26 15:15:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

Pretty weird.
Half-backed implementation?

If we put a conditional which will remove the new RTTI if defined, does it make sense to you?
What is your proposal for a name?

These settings were just in Synopse.inc to reduce the exe size for our internal projects.
It will definitively be less confusing if the default is to generate the new RTTI -even if it creates monstruous content!

Offline

#6 2013-08-27 08:28:57

davidheffernan
Member
Registered: 2013-05-16
Posts: 22

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

Yes, it is very weird.  I've not yet isolated the fault into an SSCCE so that a QC report can be logged.  Or perhaps there already is one.

Anyway, thanks for listening and understanding.  As for the naming of a conditional, I won't make a suggestion.  You know your users better than anyone and I'm sure you'll come up with a sensible name that follows your existing conventions and naming patterns.

Offline

#7 2013-08-27 15:34:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

We have added a NEWRTTINOTUSED conditional.

It is unset by default, for compatibility.

See http://synopse.info/fossil/info/9394e4600b

It should circumvent the compiler problem, and not change the default behavior.

Thanks for the feedback

Offline

#8 2016-05-20 09:30:43

Stefan
Member
Registered: 2012-11-23
Posts: 26

Re: Synopse.inc incorrectly specifies $WEAKLINKRTTI and $RTTI

FWIW it was this bug that caused this: http://qc.embarcadero.com/wc/qcmain.aspx?d=79943

Offline

Board footer

Powered by FluxBB