Codetools and casing of unit files on Darwin
Original Reporter info from Mantis: MiR
-
Reporter name: Michael Ring
Original Reporter info from Mantis: MiR
- Reporter name: Michael Ring
Description:
I am having an issue with casing of included units and codetools, I searched through Mantis but did not find anything matching:
I am on Lazarus Trunk (from08.03.2021), on a x86_64 Mac with Big Sur installed.
Problem is that lazarus complains about not beeing able to find a unit when it does not have the exact combination of upper/lowercase as the filename in the filesystem.
However, the code still compiles fine because default Darwin Filesystem (and/or) fpc does not care for upper/lower case in filenames on Darwin.
The main reason why this behaviour is quite annoying is that traditionally(??) filenames for embedded Units are lowercase and their definition in cpuinfo.pas is uppercase:
from cpuinfo.pas:
(controllertypestr:'STM32F100X4'; controllerunitstr:'STM32F10X_LD';
ls ~/devel/fpc/rtl/embedded/arm
allwinner_a20.pp cortexm3.pp cortexm7.pp lpc11xx.pp lpc21x4.pp mk22f51212.pp raspi2.pp stm32f10x_cl.pp stm32f10x_md.pp stm32f411xe.pp stm32f745.pp
at91sam7x256.pp cortexm3_start.inc lm3fury.pp lpc122x.pp lpc8xx.pp mk64f12.pp sam3x8e.pp stm32f10x_conn.pp stm32f10x_xl.pp stm32f429.pp stm32f746.pp
cortexm0.pp cortexm4.pp lm3tempest.pp lpc13xx.pp mk20d5.pp nrf51.pp sc32442b.pp stm32f10x_hd.pp stm32f401xx.pp stm32f429xx.pp stm32f756.pp
cortexm0_start.inc cortexm4f_start.inc lm4f120.pp lpc1768.pp mk20d7.pp nrf52.pp stm32f0xx.pp stm32f10x_ld.pp stm32f407xx.pp stm32f446xx.pp xmc4500.pp
Steps to reproduce:
I have a unit in uses:
uses
UThisHasCamelCaseEverywhere;
and the unit filename matches the written unit name.
Codetools works fine...
Then I change to:
uses
uthishascamelcaseeverywhere;
now codetools complains that unit cannot be found when I try to get context help via ctrl-Space.
Mantis conversion info:
- Mantis ID: 38617