#1 2021-08-30 12:26:48

Javierus
Member
Registered: 2019-09-18
Posts: 43

Delphi 2007 compiler hangs with mORMot2 and packages

With D2007, If you put mORMot2 in a single package and try to compile it, it will hang

if you break it in a bunch of packages, some will hang when compiling

TRawUtf8List.Create([])

Somehow, the compiler can't handle it correctly

The only solution I've seen is changing in TRawUtf8List this declaration :

    constructor Create(aFlags: TRawUtf8ListFlags); reintroduce; overload;

with this this one:
    constructor CreateWithFlags(aFlags: TRawUtf8ListFlags);

And using the declaration with parameters in the less than one dozen places throught all the mORMot2 code

Idk if it's acceptable or not; if you think it is, I'd make a pull request with the changes

Offline

#2 2021-09-03 08:09:51

Javierus
Member
Registered: 2019-09-18
Posts: 43

Re: Delphi 2007 compiler hangs with mORMot2 and packages

Hi ab,

Could you tell me if you are considering these changes?
If you are, I will wait
If you are not, I will make a patcher for me, so I can keep loading your changes through GitHub

Thank you!

Offline

#3 2021-09-03 09:31:17

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

Re: Delphi 2007 compiler hangs with mORMot2 and packages

Did you try to define the PUREMORMOT2 conditional?

I have renamed the constructor as CreateEx().

I am afraid there will be other issues with Delphi 2007 in other part of the framework.
Using packages is not the best way of having a stable solution on Delphi.

Offline

#4 2021-09-06 08:45:55

Javierus
Member
Registered: 2019-09-18
Posts: 43

Re: Delphi 2007 compiler hangs with mORMot2 and packages

ab wrote:

I have renamed the constructor as CreateEx().

Thank you! Now compiles fine

ab wrote:

Did you try to define the PUREMORMOT2 conditional?

Yes, it was the first I tried, with same result: hangs

ab wrote:

I am afraid there will be other issues with Delphi 2007 in other part of the framework.

I download and compile mORMot2 repo almost every day; no problems so far; will report whenever I find any other trouble

ab wrote:

Using packages is not the best way of having a stable solution on Delphi.

Unfortunately, I can't change that

Offline

Board footer

Powered by FluxBB