-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Windows - gmake2 case sensitivity #1241
Comments
I'm not really familiar with the code that you changed, do all object filenames come out lowercase now or does it only impact the comparisons? If the filenames aren't changed, then I don't really see any issue with the change, but it'll need unit tests to ensure that it continues to work. |
It was meant more like a proof-of-concept thing as it did broke VS project generating. |
By the way, this is also one of the changes that GENie fork does: https://github.com/bkaradzic/GENie#changelog-since-fork
|
This issue cost me quite some time. Please fix. Why don't you just add a random 8 character hex code in front of each file or encode the full path into the name? Example File Tree
Example 1
Example 2
|
We strive to make Premake's output deterministic (i.e. running Premake twice on the same input gives the same output). This is important for dev environments where the generated files need to be checked into source control to share with other (non-Premake using) groups. |
I am sure, he did not mean "completely random", but something like "randomly chosen hash algorithm". 😉 |
Didn't specify that, but didn't think of deterministic output names either. But it makes sense to me to keep it deterministic now that you mentioned it. You could also just count up, given a deterministic order. But what about the other suggestion to encode the path? I'm working with @kaldap's dirty fix for now. (I'm using gmake2 only anyway.) Couldn't get their newer fix to work with the current version of Premake right away and didn't want to invest time fixing. |
The function that @kaldap modified already handles filename clashes, in fact it does one of your suggestions:
It just assumes a case sensitive filesystem, which is what the "dirty fix" changes. Some tests and a PR is all that's really required for this to move forward. |
Well, about their quick, dirty fix they wrote:
So I assume it's not a candidate for solving this issue. The other solution:
I have tried to merge it with the |
As far as I'm concerned that "dirty fix" is the preferred fix, it's simple and doesn't rewrite an otherwise working system. |
Agree with @samsinsane…looks to me that all this needs is to be submitted as a PR with a unit test or two to cover the use case.
Can you share some details? Don't see why that would be the case, from this particular fix. |
Oh hey, this building upon something I contributed. |
I think I fixed this: https://github.com/ratzlaff/premake-core/tree/fix_case_insensitive_collisions |
I am using latest Premake 5.0.0-dev on Windows with gmake2 (i am using the arm-none-eabi-* toolchain) builder.
There is a problem with two files of same name but unmatched cases, f.e.: a/Rtc.cpp and b/rtc.c.
It is resolved to Rtc.o and rtc.o which is correct on case-sensitive platforms like Linux, but on Windows version of make it results to overriding one file with another and building only the latest with the following warning message:
I have come with this quick'n'dirty fix, but it probably is not the best solution.
The text was updated successfully, but these errors were encountered: