{"issue":{"created_at":"2011-12-02T21:26:27Z","state":"open","updated_at":"2011-12-03T06:45:41Z","comments":1,"user":{"gravatar_id":"e46f7cc0d8b4343de5c0bbf8d720982c","id":838643,"url":"https://api.github.com/users/qhuo","login":"qhuo","avatar_url":"https://secure.gravatar.com/avatar/e46f7cc0d8b4343de5c0bbf8d720982c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I've got encountered a ninja bug, which display the following:\r\n\r\nninja: build stopped: stuck [this is a bug]\r\n\r\nI managed to reduce it to the following:\r\n\r\n$ cat build.ninja\r\nrule fork\r\n  description = forking $in to $out...\r\n  command = touch $out\r\n\r\nrule cxx\r\n  description = compiling $in to $out...\r\n  command = cp $in $out\r\n\r\nbuild x.s.cpp x.r.cpp: fork x.cpp\r\nbuild x.o: cxx x.cpp | x.s.cpp\r\n\r\nLet's arrange the file modification times in order.\r\n\r\n$ touch x.r.cpp; sleep 1; touch x.cpp; sleep 1; touch x.s.cpp\r\n\r\nNow running ninja -n with different targets:\r\n\r\n$ ninja -n x.s.cpp\r\nninja: no work to do.\r\n$ ninja -n x.r.cpp\r\n[1/1] forking x.cpp to x.s.cpp x.r.cpp...\r\n$ ninja -n x.o\r\nninja: build stopped: stuck [this is a bug].\r\n\r\nThe build is also stuck even if I do not use the -n option.\r\n\r\nYou may notice that the build.ninja file is exactly the same as the one in #118. This makes me think they could be the same problem. But the impact of this one is more severe.\r\n","assignee":null,"number":148,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2433237,"labels":[],"title":"ninja stuck bug","closed_at":null,"html_url":"https://github.com/martine/ninja/issues/148","url":"https://api.github.com/repos/martine/ninja/issues/148","milestone":null},"action":"created","comment":{"created_at":"2011-12-03T06:45:41Z","updated_at":"2011-12-03T06:45:41Z","user":{"gravatar_id":"7a85827755720aa823b2f5c39abe28b8","id":1212129,"url":"https://api.github.com/users/jsternberg","login":"jsternberg","avatar_url":"https://secure.gravatar.com/avatar/7a85827755720aa823b2f5c39abe28b8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"This bug seems to have been introduced in this commit (https://github.com/martine/ninja/blob/5ff5891f5bed923b983c0f5a23c16d988d55f30e/src/build.h). The example works fine in my local copy, which is before this commit.\r\n\r\nI haven't tried the commit right before it though, but it's a place to start.","id":2999407,"url":"https://api.github.com/repos/martine/ninja/issues/comments/2999407"}}