-
Notifications
You must be signed in to change notification settings - Fork 24
Fix for Linux path issue #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thanks. The idea is not bad, but in line 269 (nam := FindFile(LowerCase(nam), 'unit')) it is the case that an explicit "IN " was specified. Here the file path must be taken as is. Additionally, units are not the only file type affected by "FindFile". It would probably make more sense to implement the different handling of paths and files in the Normalize directly. |
|
Thank you for your response. The point being is to have path kept as-is. But, it is impossible to keep filenames in their original form, they have to be converted to lower-case or upper-case. Thanks, and keep up the good work on this excellent project. |
|
The filename with the unit must match the name appearing after the word UNIT exactly. unit MD5; -> filename ‘MD5.pas’ |
|
This is also a viable solution. However, currently the unit filenames must be all written in upper-case, and that is because in Line 280 in c0481f8
Just a gentle reminder, the line Line 715 in c0481f8
|
|
Hi, I think tebe's proposal to enforce exactly same unit and file is only one that will always work without breaking somewhere else. If you can provide a short example where is now still does not work, I can check that. |
|
Thanks for your response. I can confirm that the conversion to lower-case has been solved with that commit you mentioned. However, the unit name problem still exists. I am getting this error:
The name of the file is The issue is in Line 288 in 1ceb15c
TokenAt(i).Name. I suspect the problem is with this line Line 1082 in 1ceb15c
SafeReadChar is converted to upper-case or with this Line 1275 in 1ceb15c
Scanner.pas is trying to load the unit, the unit file name is already converted to upper-case.
|
Fix for Linux path issue #215
I have created a PR which solves the problem on Linux with some tradeoffs. With the PR the path remains as-is (will not be converted) and the unit name is always converted to lower-case for
FindFile(..., 'unit'). So on Linux (and on other case-sensitive OSes), the unit filenames must always be written in lower-case. e.g.usprite.pas