Recent

Author Topic: FileExists() behaviour changed on Linux  (Read 7396 times)

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: FileExists() behaviour changed on Linux
« Reply #30 on: January 25, 2021, 12:53:47 pm »
[…] It should be documented.
Oh, looooooosen up. The documentation is sometimes buggy. Shit happens. Big deal!
« Last Edit: January 25, 2021, 12:57:48 pm by Kays »
Yours Sincerely
Kai Burghardt

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: FileExists() behaviour changed on Linux
« Reply #31 on: January 25, 2021, 01:01:30 pm »
No, it is not buggy - in this case!. Documentation on-line or official distribution belongs to a release, in this case 3.2.0.
If you want up-to-date docs, you have to build them...
That does not mean the docs can not contain bugs, but not in this case. Here is it is a mismatch between versions.
There is a reason for that: many use the pre-built installers from the official repo. You can not go and document features or fixes that are not in that repo. Period.
« Last Edit: January 25, 2021, 01:06:01 pm by Thaddy »
Specialize a type, not a var.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: FileExists() behaviour changed on Linux
« Reply #32 on: January 25, 2021, 01:21:54 pm »
Thaddy, the problem is that the change is in the 3.2.0 release but the documentation doesn't reflect it. It's a documentation bug.

Though it's advertised in the release notes in the wiki which, if I may make so bold, one should read  always before installing a new one.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: FileExists() behavior changed on Linux
« Reply #33 on: January 25, 2021, 01:23:53 pm »
No, it is not buggy - in this case!.
Yes, it is. revision 1730 was committed on August 2.

The FPC 3.2.0 with a modified fileExists implementation was released on June 19. The corrected sysutils.xml did not make it in time. Everything that’s been packaged/generated prior August 2 contains a wrong behavior description. This is how time works, there is no arguing.

I do get MarkMLl’s point: I dare say no ordinary FPC user is regularly checking out and regenerating the latest documentation on their own. I primarily just take the pre-packaged documentation (or what’s on the website), too. There is no point in referring me and others to “But in trunk it’s right. Since August 2.” Only developers look there.
« Last Edit: January 25, 2021, 01:27:58 pm by Kays »
Yours Sincerely
Kai Burghardt

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: FileExists() behavior changed on Linux
« Reply #34 on: January 25, 2021, 01:28:29 pm »
Only developers look there.
Nope. I and many others do too... that's the point... published docs are strictly tied to releases. Also fixes in docs are tied to fixes or trunk.
Consider docs as "in print" and you know what I mean. Subsequent editions (like 3.2.1) contain the erratum's. But you have to create those editions yourself as it stands. Hence I suggested that maybe fpcdeluxe can also build docs conforming to what is checked out as compiler version.
(Although that is torturing the fpcdeluxe maintainer  :'( )
« Last Edit: January 25, 2021, 01:34:19 pm by Thaddy »
Specialize a type, not a var.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: FileExists() behavior changed on Linux
« Reply #35 on: January 25, 2021, 01:50:38 pm »
I do get MarkMLl’s point: I dare say no ordinary FPC user is regularly checking out and regenerating the latest documentation on their own. I primarily just take the pre-packaged documentation (or what’s on the website), too. There is no point in referring me and others to “But in trunk it’s right. Since August 2.” Only developers look there.

Since a few weeks ago a daily snapshot of the documentation is generated so that users can check this more easily.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: FileExists() behaviour changed on Linux
« Reply #36 on: January 25, 2021, 01:51:58 pm »
I know for example, you can open a directory with vi, but I have no idea what you happen if I wrote changes to it ....

emacs .fltk shows:

Quote
/home/trev/.fltk/fltk.org:
  total used in directory 2 available 322.2 GiB
  drwx------  2 trev  wheel   3  3 Jun  2017 .
  drwx------  3 trev  wheel   3  3 Jun  2017 ..
  -rw-r--r--  1 trev  wheel  94 31 Jan  2019 fltk.prefs

Quote
For an application, a file is different to a directory, an application does not care how a directory is treated by the OS, it cares that a directory can contain files, it cannot 'open' a directory to read data, it cannot find multiple files in a file.

It can open a directory to read data - see above :)

Quote
If, at an application level, I want to know if a directory exists, it seems sensible to me to use DirectoryExists(). Similarly, for a file, FileExists().  I care not that its Delphi compatible, its sensible in its own right. At an application level.

And renamefile() renames files AND directories, nicely consistent not!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: FileExists() behaviour changed on Linux
« Reply #37 on: January 25, 2021, 02:18:46 pm »
@Thaddy
It should .... but based on Lazarus version and not FPC ... but needs an update ... soon !
Code: Pascal  [Select][+][-]
  1.   HELPSOURCEURL : array [0..15,0..1] of string = (
  2.     ('0.9.28','/Old%20releases/Lazarus%200.9.28/fpc-lazarus-0.9.28-doc-chm.tar.bz2'),
  3.     ('0.9.30','/Old%20releases/Lazarus%200.9.30/fpc-lazarus-doc-chm-0.9.30.tar.bz2'),
  4.     ('0.9.30.4','/Old%20releases/Lazarus%200.9.30.4/fpc-lazarus-doc-chm-0.9.30.4.tar.bz2'),
  5.     ('1.0.0','/Old%20releases/Lazarus%201.0/fpc-lazarus-doc-chm-1.0.zip'),
  6.     ('1.0.12','/Lazarus%201.0.12/fpc-lazarus-doc-chm-1.0.12.zip'),
  7.     ('1.2','/Lazarus%201.2/fpc-lazarus-doc-chm-1.2.zip'),
  8.     ('1.4','/Lazarus%201.4/doc-chm_fpc2014_laz2015.zip'),
  9.     ('1.6','/Lazarus%201.6/doc-chm-fpc3.0.0-laz1.6.zip'),
  10.     ('1.6.4','/Lazarus%201.6.4/doc-chm-fpc3.0.2-laz1.6.zip'),
  11.     ('1.8','/Lazarus%201.8.0/doc-chm-fpc3.0.2-laz1.8.zip'),
  12.     ('1.8.2','/Lazarus%201.8.2/doc-chm-fpc3.0.2-laz1.8.zip'),
  13.     ('1.8.4','/Lazarus%201.8.4/doc-chm-fpc3.0.4-laz1.8.zip'),
  14.     ('2.0.0','/Lazarus%202.0.0/doc-chm-fpc3.0.4-laz2.0.zip'),
  15.     ('2.0.2','/Lazarus%202.0.2/doc-chm-fpc3.0.4-laz2.0.2.zip'),
  16.     ('2.0.4','/Lazarus%202.0.4/doc-chm-fpc3.0.4-laz2.0.4.zip'),
  17.     ('2.0.6','/Lazarus%202.0.6/doc-chm-fpc3.0.4-laz2.0.6.zip')
  18.   );
  19.  

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: FileExists() behavior changed on Linux
« Reply #38 on: January 25, 2021, 02:41:16 pm »
I do get MarkMLl’s point: I dare say no ordinary FPC user is regularly checking out and regenerating the latest documentation on their own. I primarily just take the pre-packaged documentation (or what’s on the website), too. There is no point in referring me and others to “But in trunk it’s right. Since August 2.” Only developers look there.

If you would look in the documentation subgroup on this forum, you would find snapshots of december and january.

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: FileExists() behavior changed on Linux
« Reply #39 on: January 26, 2021, 12:49:37 am »
Only developers look there.
Nope. I and many others do too... that's the point... […]
I mean, I do, too, but only in cases like this one at hand: When the observed behavior differs from documented (as of at the point of the release) behavior.

I do not consult trunk documentation as my primary source of information to find out information for FPC 3.2.0. trunk documentation may contain per definition documentation that’s not relevant [new features] or even wrong for the latest production release [3.2.0].

Since a few weeks ago a daily snapshot of the documentation is generated so that users can check this more easily.
Awesome! But I got disappointed right away, that the RG doesn’t show properly rendered syntax diagrams. :(
Yours Sincerely
Kai Burghardt

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: FileExists() behavior changed on Linux
« Reply #40 on: January 26, 2021, 09:07:26 am »
Since a few weeks ago a daily snapshot of the documentation is generated so that users can check this more easily.
Awesome! But I got disappointed right away, that the RG doesn’t show properly rendered syntax diagrams. :(

RG? Anyway: the point of the dailies is also that users can easier find bugs in the documentation process, so please reports things you notice (like this one).

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: FileExists() behavior changed on Linux
« Reply #41 on: January 26, 2021, 09:16:51 am »

 

TinyPortal © 2005-2018