Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-08

patch testreport

14 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darius Blaszijk
to Michael Van Canneyt

Hi Michael,

Thanks, but I have a question.

Following the testreport patch, I have also a patch for the FPCUnitLazIDEIntf to make use of the plain text output. But I need to put defines around the new option, so people with an older FPC version do not get a broken tool. What defines would that be?

Darius

Earlier message 19 lines
----- Original Message ----- From: "Michael Van Canneyt" To: "FPC developers' list" Sent: Sunday, August 13, 2006 3:02 PM Subject: Re: [fpc-devel] patch testreport > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > >> Here's a patch that implements the ouput as plain text for FPCunit. > > Thank you. Applied. > > Michael. > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Michael Van Canneyt
to Darius Blaszijk
Darius Blaszijk wrote 8 lines
Hi Michael, Thanks, but I have a question. Following the testreport patch, I have also a patch for the FPCUnitLazIDEIntf to make use of the plain text output. But I need to put defines around the new option, so people with an older FPC version do not get a broken tool. What defines would that be?
{$IFNDEF VER2_1}
  // text output
{$ELSE}
  // XML output.
{$ENDIF}

But why would you want to do this ?
It seems to me the XML output is easier to use, since it is structured. What is the need to change it ?

I think it's best to discuss this before changing the mechanism...

Michael.

Show quoted text 28 lines
Darius ----- Original Message ----- From: "Michael Van Canneyt" To: "FPC developers' list" Sent: Sunday, August 13, 2006 3:02 PM Subject: Re: [fpc-devel] patch testreport > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > > > Here's a patch that implements the ouput as plain text for FPCunit. > > Thank you. Applied. > > Michael. > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Darius Blaszijk
to Michael Van Canneyt

----- Original Message -----

Earlier message 80 lines
From: "Michael Van Canneyt" To: "FPC developers' list" Sent: Sunday, August 13, 2006 7:10 PM Subject: Re: [fpc-devel] patch testreport > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > >> Hi Michael, >> >> Thanks, but I have a question. >> >> Following the testreport patch, I have also a patch for the >> FPCUnitLazIDEIntf >> to make use of the plain text output. But I need to put defines around >> the new >> option, so people with an older FPC version do not get a broken tool. >> What >> defines would that be? > > {$IFNDEF VER2_1} > // text output > {$ELSE} > // XML output. > {$ENDIF} > > But why would you want to do this ? > It seems to me the XML output is easier to use, since it is structured. > What is the need to change it ? There is no need to change default output, but I find it more easy to watch the output of the console app as plain text. I personally don't see a reason to use XML as the testapp is purely used to test if nothing is broken after changes. > I think it's best to discuss this before changing the mechanism... Shure. I have added a format option --format=plain. This will output the test for the console testapp as plain text. The problem however is that the object TPlainResultsWriter will not be available for compilerversions before VER2_1 (going from the info you gave me), so I need to hide TPlainResultsWriter and the options for previous versions. That's all I want to do. Is that ok? Darius > > Michael. > >> >> Darius >> >> ----- Original Message ----- From: "Michael Van Canneyt" >> >> To: "FPC developers' list" >> Sent: Sunday, August 13, 2006 3:02 PM >> Subject: Re: [fpc-devel] patch testreport >> >> >> > >> > >> > On Sun, 13 Aug 2006, Darius Blaszijk wrote: >> > >> > > Here's a patch that implements the ouput as plain text for FPCunit. >> > >> > Thank you. Applied. >> > >> > Michael. >> > _______________________________________________ >> > fpc-devel maillist - >> > http://lists.freepascal.org/mailman/listinfo/fpc-devel >> >> _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel >> >> > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Tomas Hajny
to Darius Blaszijk
Darius Blaszijk wrote 21 lines
From: "Michael Van Canneyt" Sent: Sunday, August 13, 2006 7:10 PM > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > >> Hi Michael, >> >> Thanks, but I have a question. >> >> Following the testreport patch, I have also a patch for the >> FPCUnitLazIDEIntf >> to make use of the plain text output. But I need to put defines around >> the new >> option, so people with an older FPC version do not get a broken tool. >> What >> defines would that be? > > {$IFNDEF VER2_1} > // text output > {$ELSE} > // XML output. > {$ENDIF}

.
.

Would this really provide the wanted behaviour?
I'd be very careful with using $IFDEF
VER<minimum_supported_version> rather than $IFDEF
VER<unsupported_versions>. The proposed version
would only work for trunk snapshots (and only for
sufficiently recent ones, of course). Any time a
new release based on trunk is made available,
this would stop working (and I doubt that anybody
would remember to change it at that time). My
recommendation would be to use either:

{$IFDEF VER2_0}
  // XML output only
{$ELSE}
  // text output allowed
{$ENDIF}

(if nothing older than 2.0 is supported anyway -
I guess this is the case here) or possibly:

{$IF defined(VER2_0) or defined(VER1)}
  // XML output only
{$ELSE}
  // text output allowed
{$ENDIF}

Tomas

Reply by email

Darius Blaszijk
to Tomas Hajny
I would like to use it like this;
// XML output.option
  {$IFDEF VER2_1}
    // text output option
  {$ENDIF}

So I would only include the code if the minimum version is supported. IIRC this define will stay there even when new releases are made right? I think this way nothing would be broken. The define would eventually be removed once Lazarus proceeds to 2.2 FPC version but would never hurt keeping the define.

Darius

Earlier message 63 lines
----- Original Message ----- From: "Tomas Hajny" To: "FPC developers' list" Sent: Sunday, August 13, 2006 9:14 PM Subject: Re: [fpc-devel] patch testreport > On 13 Aug 06, at 20:25, Darius Blaszijk wrote: >> From: "Michael Van Canneyt" >> Sent: Sunday, August 13, 2006 7:10 PM >> > On Sun, 13 Aug 2006, Darius Blaszijk wrote: >> > >> >> Hi Michael, >> >> >> >> Thanks, but I have a question. >> >> >> >> Following the testreport patch, I have also a patch for the >> >> FPCUnitLazIDEIntf >> >> to make use of the plain text output. But I need to put defines around >> >> the new >> >> option, so people with an older FPC version do not get a broken tool. >> >> What >> >> defines would that be? >> > >> > {$IFNDEF VER2_1} >> > // text output >> > {$ELSE} >> > // XML output. >> > {$ENDIF} > . > . > > Would this really provide the wanted behaviour? > I'd be very careful with using $IFDEF > VER<minimum_supported_version> rather than $IFDEF > VER<unsupported_versions>. The proposed version > would only work for trunk snapshots (and only for > sufficiently recent ones, of course). Any time a > new release based on trunk is made available, > this would stop working (and I doubt that anybody > would remember to change it at that time). My > recommendation would be to use either: > > {$IFDEF VER2_0} > // XML output only > {$ELSE} > // text output allowed > {$ENDIF} > > (if nothing older than 2.0 is supported anyway - > I guess this is the case here) or possibly: > > {$IF defined(VER2_0) or defined(VER1)} > // XML output only > {$ELSE} > // text output allowed > {$ENDIF} > > > Tomas > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Vincent Snijders
to Darius Blaszijk
Darius Blaszijk wrote 12 lines
I would like to use it like this; // XML output.option {$IFDEF VER2_1} // text output option {$ENDIF} So I would only include the code if the minimum version is supported. IIRC this define will stay there even when new releases are made right? I think this way nothing would be broken. The define would eventually be removed once Lazarus proceeds to 2.2 FPC version but would never hurt keeping the define.

I would follow Tomas suggestion.

{$IFNDEF VER2_0} is much better, also seen our experience with 1.0.x to
2.0.0 experience.

The fpc team created betas for fpc 2.0 which had the version 1.9.x. If you had used {$IFDEF VER1_1} to use some functionality only in svn trunk, then would have to change it to {$IFDEF VER1_9} for the time of betas and {$IFDEF VER2_0} after the release of 2.0.

If you make it {$IFNDEF VER2_0}, there is no need to change it after 2.2, the functionality will be available right away and the Lazarus team can do the clean up, after they made their release of fpc 2.2. If you use {$IFDEF VER2_1}, big chance the first release with fpc 2.2 will NOT include the plain text writer.

Vincent

Reply by email

Tomas Hajny
to Darius Blaszijk: I would like to use it like this; // XML output.option {$IFDEF VER2_1} // text output…
Darius Blaszijk wrote 9 lines
I would like to use it like this; // XML output.option {$IFDEF VER2_1} // text output option {$ENDIF} So I would only include the code if the minimum version is supported. IIRC this define will stay there even when new releases are made right?

No. The meaning of VERx[_y[_z]] conditional
symbol is "this compiler's version is x[.y[.z]]".
So VER2_1 is only defined in FPC 2.1.x. Once a
new release is made from trunk, it will probably
become 2.2.0 or possibly 3.0.0, but certainly not
2.1.x.

I think this way nothing would be broken. The define would eventually be removed once Lazarus proceeds to 2.2 FPC version but would never hurt keeping the define.

Well, it wouldn't be broken, but it wouldn't keep
the plain text output feature either. ;-)

Tomas

Show quoted text 17 lines
----- Original Message ----- From: "Tomas Hajny" To: "FPC developers' list" Sent: Sunday, August 13, 2006 9:14 PM Subject: Re: [fpc-devel] patch testreport > On 13 Aug 06, at 20:25, Darius Blaszijk wrote: >> From: "Michael Van Canneyt" >> Sent: Sunday, August 13, 2006 7:10 PM >> > On Sun, 13 Aug 2006, Darius Blaszijk wrote: >> > >> >> Hi Michael, >> >> >> >> Thanks, but I have a question. >> >> >> >> Following the testreport patch, I have

also a patch for the

>> >> FPCUnitLazIDEIntf >> >> to make use of the plain text output. But

I need to put defines around

>> >> the new >> >> option, so people with an older FPC

version do not get a broken tool.

Show quoted text 12 lines
>> >> What >> >> defines would that be? >> > >> > {$IFNDEF VER2_1} >> > // text output >> > {$ELSE} >> > // XML output. >> > {$ENDIF} > . > . > > Would this really provide the wanted

behaviour?

> I'd be very careful with using $IFDEF > VER<minimum_supported_version> rather than

$IFDEF

> VER<unsupported_versions>. The proposed

version

> would only work for trunk snapshots (and only

for

> sufficiently recent ones, of course). Any

time a

> new release based on trunk is made available, > this would stop working (and I doubt that

anybody

Show quoted text 10 lines
> would remember to change it at that time). My > recommendation would be to use either: > > {$IFDEF VER2_0} > // XML output only > {$ELSE} > // text output allowed > {$ENDIF} > > (if nothing older than 2.0 is supported

anyway -

Show quoted text 10 lines
> I guess this is the case here) or possibly: > > {$IF defined(VER2_0) or defined(VER1)} > // XML output only > {$ELSE} > // text output allowed > {$ENDIF} > > > Tomas

Reply by email

Michael Van Canneyt
to Darius Blaszijk: ----- Original Message ----- From: "Michael Van Canneyt" To: "FPC developers' list" Sent:…
Darius Blaszijk wrote 36 lines
----- Original Message ----- From: "Michael Van Canneyt" To: "FPC developers' list" Sent: Sunday, August 13, 2006 7:10 PM Subject: Re: [fpc-devel] patch testreport > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > > > Hi Michael, > > > > Thanks, but I have a question. > > > > Following the testreport patch, I have also a patch for the > > FPCUnitLazIDEIntf > > to make use of the plain text output. But I need to put defines > > around the new > > option, so people with an older FPC version do not get a broken tool. > > What > > defines would that be? > > {$IFNDEF VER2_1} > // text output > {$ELSE} > // XML output. > {$ENDIF} > > But why would you want to do this ? > It seems to me the XML output is easier to use, since it is structured. > What is the need to change it ? There is no need to change default output, but I find it more easy to watch the output of the console app as plain text. I personally don't see a reason to use XML as the testapp is purely used to test if nothing is broken after changes.

I can see that, but will your patch make plain text the default output for all lazarus related things ? If there are people out there who count on XML output, their stuff will be broken.

As Lazarus matures, backwards compatibility with Lazarus becomes more and more important :-)

Show quoted text 7 lines
> I think it's best to discuss this before changing the mechanism... Shure. I have added a format option --format=plain. This will output the test for the console testapp as plain text. The problem however is that the object TPlainResultsWriter will not be available for compilerversions before VER2_1 (going from the info you gave me), so I need to hide TPlainResultsWriter and the options for previous versions. That's all I want to do. Is that ok?

If it's not the default option, this is fine, because the default remains backwards compatible...

Michael.

Show quoted text 43 lines
Darius > > Michael. > > > > > Darius > > > > ----- Original Message ----- From: "Michael Van Canneyt" > > > > To: "FPC developers' list" > > Sent: Sunday, August 13, 2006 3:02 PM > > Subject: Re: [fpc-devel] patch testreport > > > > > > > > > > > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > > > > > > > Here's a patch that implements the ouput as plain text for > > > > FPCunit. > > > > > > Thank you. Applied. > > > > > > Michael. > > > _______________________________________________ > > > fpc-devel maillist - > > > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > > _______________________________________________ > > fpc-devel maillist - > > http://lists.freepascal.org/mailman/listinfo/fpc-devel > > > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Darius Blaszijk
to Michael Van Canneyt

----- Original Message -----

Earlier message 131 lines
From: "Michael Van Canneyt" To: "FPC developers' list" Sent: Sunday, August 13, 2006 10:43 PM Subject: Re: [fpc-devel] patch testreport > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: > >> ----- Original Message ----- From: "Michael Van Canneyt" >> >> To: "FPC developers' list" >> Sent: Sunday, August 13, 2006 7:10 PM >> Subject: Re: [fpc-devel] patch testreport >> >> >> > >> > >> > On Sun, 13 Aug 2006, Darius Blaszijk wrote: >> > >> > > Hi Michael, >> > > >> > > Thanks, but I have a question. >> > > >> > > Following the testreport patch, I have also a patch for the >> > > FPCUnitLazIDEIntf >> > > to make use of the plain text output. But I need to put defines >> > > around the new >> > > option, so people with an older FPC version do not get a broken tool. >> > > What >> > > defines would that be? >> > >> > {$IFNDEF VER2_1} >> > // text output >> > {$ELSE} >> > // XML output. >> > {$ENDIF} >> > >> > But why would you want to do this ? >> > It seems to me the XML output is easier to use, since it is structured. >> > What is the need to change it ? >> There is no need to change default output, but I find it more easy to >> watch >> the output of the console app as plain text. I personally don't see a >> reason >> to use XML as the testapp is purely used to test if nothing is broken >> after >> changes. > > I can see that, but will your patch make plain text the default output for > all lazarus related things ? If there are people out there who count on > XML > output, their stuff will be broken. > > As Lazarus matures, backwards compatibility with Lazarus becomes more and > more > important :-) > > >> >> > I think it's best to discuss this before changing the mechanism... >> Shure. I have added a format option --format=plain. This will output the >> test >> for the console testapp as plain text. The problem however is that the >> object >> TPlainResultsWriter will not be available for compilerversions before >> VER2_1 >> (going from the info you gave me), so I need to hide TPlainResultsWriter >> and >> the options for previous versions. That's all I want to do. Is that ok? > > If it's not the default option, this is fine, because the default remains > backwards compatible... I thought of that ideed. The code will remain backwards compatible. The only thing changed is a new output option. I hope this reassures you ;) Darius > > Michael. > >> >> Darius >> >> > >> > Michael. >> > >> > > >> > > Darius >> > > >> > > ----- Original Message ----- From: "Michael Van Canneyt" >> > > >> > > To: "FPC developers' list" >> > > Sent: Sunday, August 13, 2006 3:02 PM >> > > Subject: Re: [fpc-devel] patch testreport >> > > >> > > >> > > > >> > > > >> > > > On Sun, 13 Aug 2006, Darius Blaszijk wrote: >> > > > >> > > > > Here's a patch that implements the ouput as plain text for >> > > > > FPCunit. >> > > > >> > > > Thank you. Applied. >> > > > >> > > > Michael. >> > > > _______________________________________________ >> > > > fpc-devel maillist - >> > > > http://lists.freepascal.org/mailman/listinfo/fpc-devel >> > > >> > > _______________________________________________ >> > > fpc-devel maillist - >> > > http://lists.freepascal.org/mailman/listinfo/fpc-devel >> > > >> > > >> > _______________________________________________ >> > fpc-devel maillist - >> > http://lists.freepascal.org/mailman/listinfo/fpc-devel >> >> _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel >> > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Graeme Geldenhuys
to Darius Blaszijk: ----- Original Message ----- From: "Michael Van Canneyt" To: "FPC developers' list" Sent:…
Darius Blaszijk wrote 6 lines
Shure. I have added a format option --format=plain. This will output the test for the console testapp as plain text. The problem however is that the object TPlainResultsWriter will not be available for compilerversions before VER2_1 (going from the info you gave me), so I need to hide TPlainResultsWriter and the options for previous versions. That's all I want to do. Is that ok?

I have the same issue... Chicken and Egg situation. Changes have been added to FPCUnit after FPC 2.0.2, but I need them now in Lazarus. I applied a few patches, but most of them I am holding off until after the the FPC 2.0.4 release. I figured the IFDEF's will be getting ugly in Lazarus, so only use the locally until 2.0.4.

Anyway, I did this in our local projects and then use the FPC202 or FPC202OrAbove defines...

  {$if defined(ver1) or (defined(ver2_0) and (fpc_patch<2))}
    {$fatal tiOPF2 requires at least FPC 2.0.2}
  {$ELSEIF (defined(ver2_0) and (fpc_patch=2))}
    {$DEFINE FPC202}
  {$ELSE}
    {$DEFINE FPC202OrAbove}
  {$IFEND}

Regards,
- Graeme -

There's no place like 127.0.0.1

Reply by email

Marco van de Voort
to Graeme Geldenhuys
Show quoted text 17 lines
On 8/13/06, Darius Blaszijk wrote: I have the same issue... Chicken and Egg situation. Changes have been added to FPCUnit after FPC 2.0.2, but I need them now in Lazarus. I applied a few patches, but most of them I am holding off until after the the FPC 2.0.4 release. I figured the IFDEF's will be getting ugly in Lazarus, so only use the locally until 2.0.4. Anyway, I did this in our local projects and then use the FPC202 or FPC202OrAbove defines... {$if defined(ver1) or (defined(ver2_0) and (fpc_patch<2))} {$fatal tiOPF2 requires at least FPC 2.0.2} {$ELSEIF (defined(ver2_0) and (fpc_patch=2))} {$DEFINE FPC202} {$ELSE} {$DEFINE FPC202OrAbove} {$IFEND}

Note that the ver1 check is afaik useless since ver1 doesn't support {$if defined

Reply by email

Graeme Geldenhuys
to Marco van de Voort
Marco van de Voort wrote 10 lines
> {$if defined(ver1) or (defined(ver2_0) and (fpc_patch<2))} > {$fatal tiOPF2 requires at least FPC 2.0.2} > {$ELSEIF (defined(ver2_0) and (fpc_patch=2))} > {$DEFINE FPC202} > {$ELSE} > {$DEFINE FPC202OrAbove} > {$IFEND} Note that the ver1 check is afaik useless since ver1 doesn't support {$if defined

This brings me to another issue with $IF .... See my new post titled "$IF issues".

Regards,
Graeme.

There's no place like 127.0.0.1

Reply by email