Recent

Author Topic: Mac OS autocomplete/unitsearch  (Read 1150 times)

scribly

  • Jr. Member
  • **
  • Posts: 80
Mac OS autocomplete/unitsearch
« on: December 13, 2019, 11:32:37 am »
Not sure if this should be in the operating system group or editor or as a bug tracker issue (This issue has been there for many years), but editor feels more suitable

I'm porting an application originally developed in windows to MacOS , and I am having an issue that often units can't be found in the designer when trying autocomplete for some units unless I open them in the designer first using project->units. (else it gives TCodeToolManager.HandleException: [20170421200056] unit not found)
This isn't that bad, but my project has 300 units, and opening/closing a unit now takes several seconds, and loading the project back takes a very long time

It may have to do with case sensitivity, as one file that doesn't want to get found is WorkerUnit which is stored on disk as workerunit.pas

Is there a setting that I can use to ignore case sensitivity for the codetools ?
edit: Seems changing the unit from "workerunit" to "WorkerUnit" in uses clauses helps
« Last Edit: December 13, 2019, 11:42:40 am by scribly »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Mac OS autocomplete/unitsearch
« Reply #1 on: December 13, 2019, 02:49:51 pm »
Quote
TCodeToolManager.HandleException: [20170421200056]
Clearly a bug for the bugtracker.... (unless already there)

Lowercase filenames a correct, and good. Fpc and Codetools use certain variations to find files.
That is, on a case sensitive files system "WorkerUnit" would not be found, if it was saved as "workeRuniT.pas".
However "unit WorkerUnit" will lead to a search for: the given case, all lowercase, and IIRC all upper case.

As for more info on your issue:

1) Make sure every file that you use, is either:
- listed in the project inspector
- the "package window" of the package to which it belongs.

It should work without, if they are reachable (which I guess they are, or it would not compile).
But it may be worth a try. If it helps, mention it on the bug report.

2) Rather far fetched.....
Ideally you will not have added/edited anything in the "Path" section of the project options / package options.
That is not additional unit/include/ppu search pathes.
If you do have (and there are valid cases) make 100% sure that none of the path overlap. If a location on your disk is listed as a path in the project (or a package), then this location must under no circumstances be reachable through the path of any other package.
Note: if you did break above rule, you would likely have a ton of other issues. Nevertheless, I mention it, as I seen it countless times causing all sort of issues.

 

TinyPortal © 2005-2018