Recent

Author Topic: Preparing FPC 3.2.4, point out road blocks now  (Read 99186 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2524
    • UVviewsoft

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12025
  • FPC developer.
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #166 on: January 23, 2025, 09:42:49 pm »
To my best knowledge, the last merge was September 23th:

https://gitlab.com/freepascal.org/fpc/source/-/commits/release_3_2_4-branch

PascalDragon

  • Hero Member
  • *****
  • Posts: 5851
  • Compiler Developer
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #167 on: January 23, 2025, 10:34:10 pm »
Please consider adding COM-related patches to new release and, if possible, to fixes branch:

https://gitlab.com/freepascal.org/fpc/source/-/issues/41009
https://gitlab.com/freepascal.org/fpc/source/-/issues/41005

These are not even in main yet, so it's very unlikely that they be in 3.2.4.

https://gitlab.com/freepascal.org/fpc/source/-/commit/ac510d391f9d784a00275836715a25a41331460f

That can maybe be merged after the RC.

Can you apply this fix, made in Git 2 years ago?
https://gitlab.com/freepascal.org/fpc/source/-/commit/48b97514193933e20c354a459c1cb37ca8edeb6c

That can maybe also be merged after the RC.

Just release. Other than what is already known at least on my platforms ( quite a lot) I haven't found anything serious. Is the problem just release nanament?
Surely one minor platform can not Withhold a point release!

Yes, the issue is release management, because major targets are still missing.

cpicanco

  • Hero Member
  • *****
  • Posts: 659
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #168 on: January 26, 2025, 11:17:06 pm »
Hi everyone, great work! You’re all awesome!

I was testing Lazarus RC2 (https://forum.lazarus.freepascal.org/index.php/topic,69820.60.html) and encountered an issue with a project that compiles without problems in the trunk but fails to compile in RC2 due to differences between FPC trunk and FPC 3.2.2. Would you recommend addressing these issues for FPC 3.2.4?

1) In Generics.Default, FPC trunk uses const (instead of constref) in TComparer.Compare:

Code: Pascal  [Select][+][-]
  1.   TComparer<T> = class(TInterfacedObject, IComparer<T>)
  2.   public
  3.     class function Default: IComparer<T>; static;
  4.     function Compare(constref ALeft, ARight: T): Integer; virtual; abstract; overload;
  5.  
  6.     class function Construct(const AComparison: TOnComparison<T>): IComparer<T>; overload;
  7.     class function Construct(const AComparison: TComparisonFunc<T>): IComparer<T>; overload;
  8.   end;  

2) FPC 3.2.2 do not propagate String helpers for ShortString's. Hence:

Code: Pascal  [Select][+][-]
  1. // one may change this
  2. TObject.ClassName.Replace('T', '');
  3.  
  4. // to this
  5. String(TObject.ClassName).Replace('T', '');

3) I am getting an internal error 200510032, and also "Undefined symbol: .Lj2139" when trying to use .ToInteger helper with a specialized TDictionary:

Code: Pascal  [Select][+][-]
  1. program rc2test;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}
  7.   cthreads,
  8.   {$ENDIF}
  9.   Classes,
  10.   SysUtils,
  11.   Generics.Collections;
  12.  
  13.   procedure DoIt;
  14.   type
  15.     TMyDictionary = specialize TDictionary<string, string>;
  16.  
  17.   var
  18.     MyDictionary : TMyDictionary;
  19.  
  20.   begin
  21.     MyDictionary := TMyDictionary.Create;
  22.     try
  23.        MyDictionary.Add('Key', '1');
  24.        WriteLn(MyDictionary['Key'].ToInteger);
  25.     finally
  26.        MyDictionary.Free;
  27.     end;
  28.   end;
  29.  
  30. begin
  31.   DoIt;
  32.   ReadLn;
  33. end.

I managed to compile it doing some refactoring:

Code: Pascal  [Select][+][-]
  1. var
  2.   s1 : string;
  3.  
  4. begin
  5.   s1 := MyDictionary['Numeric'];
  6.   WriteLn(s1.ToInteger);
  7. end;

4) TEvent.Create, from syncobjs unit is not overloaded in FPC 3.2.2, so one must create it explicitly. FPC 3.3.1 will call "BasicEventCreate(nil, True,False,'')" when using the overloaded constructor.
Be mindful and excellent with each other.
https://github.com/cpicanco/

 

TinyPortal © 2005-2018