Recent

Author Topic: Lowercase Drive in LAZ 4.4 Project Inspector  (Read 789 times)

Adie

  • New Member
  • *
  • Posts: 15
Lowercase Drive in LAZ 4.4 Project Inspector
« on: November 15, 2025, 08:31:19 am »
Hi All
Win11 Laz 4.4

Since I upgraded to 4.4 random new files added to the project get a lowercase drive letter which cause havoc with the TREE.  This never happened in prev Laz versions.  The Name in the Project.LPI file is uppercase but the IDE convert to lowercase.

See the Attachment.

Adie

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12023
  • Debugger - SynEdit - and more
    • wiki
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #1 on: November 15, 2025, 03:32:28 pm »
Since I upgraded to 4.4

That is from 4.2? Or from an earlier (4.0 or 3.x) version?

I don't use the hierarchical project view myself, and a quick try didn't get me this issue (though that was tested with 4.99).

I also glanced over the changes since 4.2 => nothing that looked suspicious. But that doesn't mean there couldn't be something hidden... But its also possible the issue existed, and didn't get triggered before. Either triggered by something else in the IDE, or by a change to the project file, or ....
If your upgrade was from 4.2, have you tried to go back to 4.2 (making a backup of the project first / to keep the files that can reproduce the issue / just in case it is triggered by the lpi/lps)? Did that fix the issue?



Also "Project Options" => Path => that should have a list of all the paths used in your project. Do the all have uppercase D: ?

What else could be different about the file with the lower d: ?
You highlighted "hbudate", how does the xml for "hbcore" look?

BrunoK

  • Hero Member
  • *****
  • Posts: 762
  • Retired programmer
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #2 on: November 15, 2025, 04:39:41 pm »
Naming has been changed to default, probably for linux name convenience, to naming files all in lower case.

Go to Menu/tools/option/environment/naming and
correct the automatic renaming options.

Has been a real nuisance when introduced.

n7800

  • Hero Member
  • *****
  • Posts: 594
  • Lazarus IDE contributor
    • GitLab profile
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #3 on: November 16, 2025, 12:42:57 am »
A quick scan didn't reveal that the Project Inspector checks the case of characters when adding a node. Apparently, it must be OS-specific and take that into account.

Also, it uses a tree filter, and I don't see a property responsible for char case control there either. But I didn't look deeply...

I contacted Juha, who maintains the filters and recently made a change to the file case (#10370).

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4660
  • I like bugs.
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #4 on: November 16, 2025, 10:18:09 am »
I contacted Juha, who maintains the filters and recently made a change to the file case (#10370).
That issue implemented a feature to rename all project files to lower-case.
It can be found in menu Project -> "Rename Unit Files to LowerCase ...".
Nothing to do with filters.
Even that feature renames only file names, not any directory names. Adie's issue here looks weird. Can somebody reproduce somehow?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BrunoK

  • Hero Member
  • *****
  • Posts: 762
  • Retired programmer
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #5 on: November 16, 2025, 02:31:35 pm »
Why should all the users of fpc / lazarus bend to the limitations and uncomfortable use of a case sensitive OS.

When I submit patches, I'm always reminded by some developers of the importance of being cross os / wigetset compatible.

As they say some animals are more equal than others.

Adie

  • New Member
  • *
  • Posts: 15
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #6 on: November 16, 2025, 04:23:56 pm »
Hi all

I solved the issue by simply replacing all the "D:\" with "d:\" in the LPI file to make life easy again.

NOTE: this was NOT a 'filename' case issue.  Just the DRIVE letter was made LOWERCASE IN THE IDE PROJECT INSPECTOR although Uppercase in all files.

Please Close this topic as I do not know how.  :(

THANKS for the effort from the developers - I LOVE LAZARUS.


Adie

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4660
  • I like bugs.
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #7 on: November 16, 2025, 07:34:56 pm »
This forum thread does not need closing. However if you find a way to reproduce the error, please create a bug report with exact steps to reproduce. Then we can figure out which revision caused it.

I don't believe it is a regression caused by Lazarus 4.4 bug fix release. It is more likely an older bug triggered by some unusual workflow.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12023
  • Debugger - SynEdit - and more
    • wiki
Re: Lowercase Drive in LAZ 4.4 Project Inspector
« Reply #8 on: November 16, 2025, 08:09:07 pm »
I guess there are 2 parts to the issue.

Part 1 is reproducible.

Open an existing lpi in an editor outside the IDE and add units

I have a folder on the D drive, so I added some from there. I even used the same folder, but in one case I lowercased the drive letter. (by default they should be uppercase).

And with that the IDE displays this as 2 different path.

Code: Text  [Select][+][-]
  1.     <Units>
  2. ....
  3.       <Unit>
  4.         <Filename Value="D:\lazarus64\lcl\arrow.pp"/>
  5.         <IsPartOfProject Value="True"/>
  6.       </Unit>
  7.       <Unit>
  8.         <Filename Value="d:\lazarus64\lcl\controls.pp"/>
  9.         <IsPartOfProject Value="True"/>
  10.       </Unit>
  11.     </Units>
  12.  

Note, for me the OS always gives uppercase letters, and other than editing the XML, I have not found a way to get a lowercase drive letter in there.

However, the casing of a folder could change. And I have not tested, but have a suspicion that if I change the casing of a folder for which I have some files already added, and then add more to the LPI => that will have similar effects.





That leaves part 2

How can such a drive letter end up in the lpi, without editing the file by hand.



Ultimately, since it likely can happen for folders, the compare algorithm may need to be adjusted...



 

TinyPortal © 2005-2018