#1 2026-07-16 19:50:44

Mobius1
Member
Registered: 2023-08-16
Posts: 13

issue with string versioning and compiler directive

hi folks,

I'm having a little issue trying to detect faithfully the mORMot2 version via compiler directive, before commit 2.4.15007 the KeepAlive property of THttpClientSocket behave in one way, after that it behaves differently, so for our framework to work properly I need to properly detect mORMot2 version and handle the change in the code, but the directive below doesn't work:

    {$IF SYNOPSE_FRAMEWORK_VERSION < '2.4.15007'}
    vHttp.KeepAlive := Parent.KeepAlive;
    {$IFEND} 

I'm currently in the latest master of mORMot2 on Lazarus with FPC 3.2.3 (fixes branch) and the code inside that block is being compiled, where it shouldn't.

Any ideas on how I could handle that? The dumb machines (AI) have no clue

Offline

#2 2026-07-17 07:04:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,554
Website

Re: issue with string versioning and compiler directive

Yes, currently it is not feasible...
Did you try $if declared() with some other definition close to this commit?

I don't remember the THttpClientSocket.KeepAlive change. What was it?

Anyway, I have added a new SYNOPSE_FRAMEWORK_COMMIT constant value in mormot.core.base:
https://github.com/synopse/mORMot2/commit/18bddf98eb

Offline

Board footer

Powered by FluxBB