-
Notifications
You must be signed in to change notification settings - Fork 49
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
.ninja_log is truncated when it's more then 101 lines long if -f flag is used #38
Comments
Thanks for the report. Can you elaborate on your use case in which this is a problem? Usually when you have multiple build.ninja files, they are in separate directories, or at least have separate Both ninja and samurai use the following method for determining whether to recompact the log:
The difference between samurai and ninja is that samurai only considers entries that are involved with the build in some way (so in your example with empty.ninja, none of the entries are considered). Matching ninja's behavior here is possible, but would require a new hashtable to keep track of the entries that are obsolete or part of a different manifest. I'm hesitant to do this unless there is some common usage pattern that relies on this behavior. |
Thank you for quick reply and explanation. OK, I understand this. I think, it should be useful to mention this in "Differences from ninja" because behavior is different and may be little bit confusing, because it is dependent of length of .ninja_log file. My use case is embedded OS development where ninja system is used twice. First, for configuring = creating build.ninja files. Secound use is for building. OS source code repo contain common code and code for several SOCs. First (configuration) stage create some of ninja files for building OS variants for this SOCs. Then I build subset of these variants, eg:
This generate two (independent) binary OS images. But, builds are not fully independend. Secound build (can) use lot of objects generated in the first build. I think, the same behavior can be obtained by joining all separated ninja files together and call samu with desired targets. But, there is a minor difference: In development, when part of source tree is in rework and unbuildable (because incorrect ninja file), whole tree is unbuildable. In first stage there is another minor drawback: Need to set $builddir, create unwanted extra directory, which another tools must handle too. Not a big problems, but little bit inconvenience. |
Hi I am running into a similar issue. I am using a high level scripting language to build my code and am farming out the "parallelized compilation of C code" part to ninja. I am not even using ninja for linking the binary, I am just using it for parallel incremental compilation of C code. It involves constantly overwriting an ephemeral |
Not looking for a solution but perhaps that can go in the "Differences from ninja" section of the readme |
When .ninja_log is more then 101 lines long and samu is executed with another buildfile (with -f flag) then .ninja_log file is truncated and reflect only state of last run of samu:
build.ninja :
The text was updated successfully, but these errors were encountered: