Recent

Author Topic: "LCLVersion" in *.lfm files  (Read 952 times)

piola

  • Full Member
  • ***
  • Posts: 156
  • Lazarus 2.2, 64bit on Windows 8.1 x64
"LCLVersion" in *.lfm files
« on: June 12, 2025, 01:52:31 pm »
Hello,

why does Lazarus keep adding and removing the LCLVersion=4.0.0.0 in the *.lfm files. This drives me crazy because I often get changes in git just because of this line.

My hope was that it's fixed/changed in Lazarus 4.0, but this line is still being added or removed from time to time.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12314
  • FPC developer.
Re: "LCLVersion" in *.lfm files
« Reply #1 on: June 12, 2025, 02:11:56 pm »
Probably to detect when upgrades are necessary.  Lazarus has way more public available versions than something like Delphi, so that makes the upgrade matrix more complicated

piola

  • Full Member
  • ***
  • Posts: 156
  • Lazarus 2.2, 64bit on Windows 8.1 x64
Re: "LCLVersion" in *.lfm files
« Reply #2 on: June 12, 2025, 02:47:25 pm »
Yes, of course that what the line itself is for. But I'm working with a fixed Lazarus version, e.g. 4.0. After some changes in the form, Lazarus removes the LCLVersion=4.0.0.0 line completely (it's not present anymore in the .lfm file), and after some more changes, it gets added again. The content 4.0.0.0 doesn't change, but the entire line is being added or removed.

wp

  • Hero Member
  • *****
  • Posts: 12909
Re: "LCLVersion" in *.lfm files
« Reply #3 on: June 12, 2025, 03:21:10 pm »
You should file a bug report about it, if possible, with conditions after which the line disappears and after which it comes back.

zeljko

  • Hero Member
  • *****
  • Posts: 1770
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: "LCLVersion" in *.lfm files
« Reply #4 on: June 12, 2025, 04:54:27 pm »
Same problem with trunk. Sometimes it completely removes LCLVersion ,sometimes it adds LCLVersion to the .lfm

etrusco

  • New Member
  • *
  • Posts: 17
Re: "LCLVersion" in *.lfm files
« Reply #5 on: June 17, 2025, 09:21:48 pm »
From the code, the only condition to skip storing the LCLVersion is "Parent <> nil". May this is related to the docked IDE? Or is there any special handling in TWriter?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • Debugger - SynEdit - and more
    • wiki
Re: "LCLVersion" in *.lfm files
« Reply #6 on: June 17, 2025, 09:45:17 pm »
Well, that probably checks that it a top level component (frame or form / but frame, only if not embedded on a form).

Because once a frame is embedded into a form, then the form already writes the lcl version.

But, afaik in the docked form editor the form has a parent.

If that is what is causing it, then that is a bug. (and there must be some better check / I.e. if the parent is csDesigning)...
IIRC, but I can't recall there is some function for that already... (might not check that flag, but another, but would serve the purpose)

zeljko

  • Hero Member
  • *****
  • Posts: 1770
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: "LCLVersion" in *.lfm files
« Reply #7 on: June 17, 2025, 11:05:36 pm »
Yes, I'm using anchordocking + docked form editor, so it is definitelly bug of docked form editor.

 

TinyPortal © 2005-2018