Sign in Join

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

Mailing lists / lazarus / 2013-01

Trunk compilation broken by changing StrikeThrough property name

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Alexander Klenin

Revision 39879 introduced some compile-time conditionals apparently intended to fix a typo while breaking user code, but not Lazarus code.

Unfortunately, Lazarus stopped compiling for me since that revision. I have committed a quick fix in r39885, but I do not understand why that change was made in such a strange manner and how did it compile for the committer -- I tested and both 2.6 and 2.7 give same error.

So please review -- I am afraid I am missing something.

Alexander S. Klenin

Reply by email

Vincent Snijders
to Alexander Klenin

2013/1/19 Alexander Klenin :

Show quoted text 11 lines
Revision 39879 introduced some compile-time conditionals apparently intended to fix a typo while breaking user code, but not Lazarus code. Unfortunately, Lazarus stopped compiling for me since that revision. I have committed a quick fix in r39885, but I do not understand why that change was made in such a strange manner and how did it compile for the committer -- I tested and both 2.6 and 2.7 give same error. So please review -- I am afraid I am missing something.

See also:
http://bugs.freepascal.org/view.php?id=23699

Vincent

Reply by email

Reinier Olislagers
to Alexander Klenin: Revision 39879 introduced some compile-time conditionals apparently intended to fix a…
Alexander Klenin wrote 9 lines
Revision 39879 introduced some compile-time conditionals apparently intended to fix a typo while breaking user code, but not Lazarus code. Unfortunately, Lazarus stopped compiling for me since that revision. I have committed a quick fix in r39885, but I do not understand why that change was made in such a strange manner and how did it compile for the committer -- I tested and both 2.6 and 2.7 give same error.

I originally wrote that patch with the conditionals - sorry for those stupid errors with ($ENDIF).

1. Laz compiled for me with trunk (haven't tested 2.6.x).
2. Quite probably you're compiling TAChart or other components that I don't compile due to too frequent compilation errors on Win64. This caused some of the errors not to lead to compile errors on my end... and probably on the committer's end either.

Thanks for the fix,

regards,
Reinier

Reply by email

Bart
to Alexander Klenin: Revision 39879 introduced some compile-time conditionals apparently intended to fix a…

This part:

  {$IF FPC_FULLVERSION>=20601} //changed in 2.6.2 and 2.7; remove when
FPC 2.6.2+ only is supported
  Font.StrikeThrough := AFont.StrikeThrough;
  {$ELSE}
  Font.StrikeTrough := AFont.StrikeTrough; //old version with typo
  {$ENDIF}

will make it stop working with the 2.6.2RC1 version too, since it's fullversion = 20602

As a quick fix, can we change that to:

  {$IF (FPC_FULLVERSION<20600) or defined(lazcanvas_typo)} //changed
in 2.6.2 and 2.7; remove when FPC 2.6.2+ only is supported
  Font.StrikeTrough := AFont.StrikeTrough; //old version with typo
  {$ELSE}
  Font.StrikeThrough := AFont.StrikeThrough;
  {$ENDIF}

This will allow 2.6.2RC1 users to define lazcanvas_typo when building Lazarus, as a temporary workaround.

Bart

Reply by email

Bart

Hi,

Revision 39879 introduced some compile-time conditionals in lazcanvas (fixing a typo).

This part

  {$IF FPC_FULLVERSION>=20601} //changed in 2.6.2 and 2.7; remove when
FPC 2.6.2+ only is supported
  Font.StrikeThrough := AFont.StrikeThrough;
  {$ELSE}
  Font.StrikeTrough := AFont.StrikeTrough; //old version with typo
  {$ENDIF}
:

However it breaks building with 2.6.2RC1 since it's fullversion = 20602

As a quick fix, can we change that to:

  {$IF (FPC_FULLVERSION<20600) or defined(lazcanvas_typo)} //changed
in 2.6.2 and 2.7; remove when FPC 2.6.2+ only is supported
  Font.StrikeTrough := AFont.StrikeTrough; //old version with typo
  {$ELSE}
  Font.StrikeThrough := AFont.StrikeThrough;
  {$ENDIF}

This will allow 2.6.2RC1 users to define lazcanvas_typo when building Lazarus, as a temporary workaround.

Bart

Reply by email