PDA

View Full Version : EurekaLog changes conditional define in IDE


Yahoo Serious
27-Jan-2009, 12:30 PM
[Using Delphi 2007]

I use the conditional define "EUREKALOG" somewhere in my own code, to determine whether to set some EurekaLog-settings. My .dll got different results when building and testing manually (compiled in the IDE with EurekaLog 6018) and when building and testing automatically (daily build,
using command line, EurekaLog 6016).

I determined the cause of this difference. It happens when the .dproj contains the conditional define EurekaLog, but EurekaLog is NOT activated in the .dproj . It turns out this results in a different binary when building inside versus outside the IDE.

I am not quite sure how we got to this .dproj-situation (maybe due to a merge?), but I can reproduce it manually: Save and close a project in the IDE with EurekaLog activated. Edit the ..dproj manually, by setting Activate=0 (in [Exception Log] ). Make the ..dproj read only.

Now open the project in the IDE. View the conditional define (in: Tools | Options | Directoriers/Conditionals), and notice the conditional define for "EUREKALOG;EUREKALOG_VER6".

Exit the options and build the project. View the conditional define, and notice there is no conditional define for "EUREKALOG;EUREKALOG_VER6". It has been automagically removed by EurekaLog(?). However, this is not 'noticed' by the IDE. The project is not marked as changed and the IDE does not request to save them.

This way building inside the IDE will result in a compile WITHOUT the conditional define for "EUREKALOG;EUREKALOG_VER6". However, building outside the IDE will result in a compile WITH the conditional define for "EUREKALOG;EUREKALOG_VER6".

I don't want the IDE and the command-line to build differently!

(I discovered this by an Exception depending on this conditional define.
However, I could not get the Exception reproduced in a small example.
That might also be a difference between 6016 and 6018?
Anyway, the confusing behavior is obvious in any project.)

Yahoo

Karl
30-Jan-2009, 08:45 PM
Hi Yahoo,

I'm going to have to test this with Delphi 2007, in Delphi 7 it asks to save the project and then errors as the project options are read only.

Yahoo Serious
16-Feb-2009, 09:34 AM
Did you try it yet?

Yahoo Serious
24-Mar-2009, 02:17 PM
I'm still waiting.
Cheers Yahoo

Alex
24-Mar-2009, 04:50 PM
Hi.

Karl is no longer works with us, so it happens that this thread was forgotten. We are sorry.

Okay, I don't quite undestand what exactly do you want to say.
You are saying that you got mailformed dproj file and you have found a way to reproduce its creation. And then you say that EurekaLog behaves incorrectly on this mailformed dproj file. Since the dproj file is not correct then it is not surprising that EL behaves "bad".

Why don't you just correct your dproj file? Or I just don't undestand you properly?

Yahoo Serious
31-Mar-2009, 12:15 PM
Karl is no longer works with us, so it happens that this thread was forgotten. We are sorry.

Okay, understandable

Okay, I don't quite understand what exactly do you want to say.
You are saying that you got mailformed dproj file and you have
found a way to reproduce its creation. And then you say that EurekaLog behaves incorrectly on this malformed dproj file. Since the dproj file is not correct then it is not surprising that EL behaves "bad".

Why don't you just correct your dproj file? Or I just don't undestand you
properly?

My .dproj has the conditional define "EUREKALOG", but has the EurekaLog-setting "Activate=0". This might be considered malformed,
however, it seems to be possible. The point is not that this .dproj is not correct and should be corrected, I already did that (of course). That is a 'work around', which this time takes away the symptoms for me.

The point is that this situation leads to a different situation building the ..dproj using IDE vs. the command-line, without any signal (notification/warning/error/whatever) to the user. IMHO when the .dproj is changed by EurekaLog, EurekaLog should somehow notify the user (or the IDE).
That way the problem is prevented, so it does not take hours (or longer) to identify the cause, when EurekaLog silently modifies the read-only part of the code in the IDE.

Do you get my point?

Cheers Yahoo

Alex
31-Mar-2009, 03:00 PM
Hi.

I think I got what you want to say, but:

Exit the options and build the project. View the conditional define, and notice there is no conditional define for "EUREKALOG;EUREKALOG_VER6".

This is wrong. If your dproj file is marked as read-only and EurekaLog wants to change it (i.e. remove conditionals) - then you'll see a message that dproj file is not writable. EurekaLog does not write to read-only files. And the same message appears at compilation on malformed dproj.

Can you check your issue on the latest 6.0.20 RC 3, please? There is something strange about this "ability" to silently rewrite read-only files.

Yahoo Serious
02-Apr-2009, 01:36 PM
Can you check your issue on the latest 6.0.20 RC 3, please? There is something strange about this "ability" to silently rewrite read-only files.

Okay, I just did. It turns out my scenario to reproduce it, is not valid (anymore?).
However, I reproduced it another way.

The scenario is this (first two steps are different):
- save and close a project in the IDE with EurekaLog *NOT* activated.
- edit the .dproj manually, by adding "EUREKALOG;EUREKALOG_VER6" to the
<DCC_Define>
- make the .dproj (and .dpr?) read only
- open the project in the IDE.
- view the conditional defines (in: Tools | Options | Directoriers/Conditionals), and notice the conditional define for "EUREKALOG;EUREKALOG_VER6".
- compile the project
- view the conditional defines (in: Tools | Options | Directoriers/Conditionals), and notice NO conditional define for "EUREKALOG;EUREKALOG_VER6".
- close all files, and notice NO question about saving a file
(- open the project in the IDE.
- view the conditional defines (in: Tools | Options | Directoriers/Conditionals), and notice the conditional define for "EUREKALOG;EUREKALOG_VER6".) HTH, Yahoo

Alex
02-Apr-2009, 03:36 PM
Hi.

Ok, I'll add an additional checks. We'll release a new RC version soon.