Closed tomasfejfar closed 10 years ago
Same for me (Windows 8.1 64bit, PHP 5.5.11)
Probably fixed in last master version. Can you try it?
dev-master does not work at all.
0.5:
<snip>
............................................................ 1380/1432 (96 %)
....................................................
Checked 1432 files in 19.9 second, no syntax error found
dev-master:
λ parallel-lint .
PHP 5.5.3 | 10 parallel jobs
<nothing happens for 20s - no new processes created>
^CTerminate batch job (Y/N)?
Same here
Can you please try latest version from master branch?
dev-master (d4baef219fba37843ab86825a512fbf9ae65d42b) works fine on Win8, thanks!
Works fine with d4baef2
- Updating jakub-onderka/php-parallel-lint dev-master (d4baef2 => e81e0e1)
Checking out e81e0e1df3edbfbba239f30d896c5c17dedff69f
..... and it's back :(
234d49251b9e736c84b306c183fe901f5b2460e2
git bisect bad 234d49251b9e736c84b306c183fe901f5b2460e2
234d49251b9e736c84b306c183fe901f5b2460e2 is the first bad commit
commit 234d49251b9e736c84b306c183fe901f5b2460e2
Author: Jakub Onderka <jakub.onderka@gmail.com>
Date: Fri Sep 5 07:48:08 2014 +0200
Allow to pass file or folder list to stdin
:100755 100755 422cf2638601ea8c91a00287df3c6efef451461b b0679b56048375660abfa774431d3ba2dae09880 M parallel-lint.php
:040000 040000 b08187735b933299e6f77864be59bf726305d58c 29fd7879a0fd26cbed7a973c6e5936358e63b6a5 M src
Done
Which problem do you have? With "CreateProcess failed, error code - 206" or freeze after lint is start? Because I tested current master on Windows XP and problem is with freeze, because non blocking read from STDIN is not supported on Windows (it is a known bug in PHP).
But can you try last master? It would be fixed.
Freezing problem (https://github.com/JakubOnderka/PHP-Parallel-Lint/issues/34#issuecomment-51662333). Still not fixed in ed9ac311e7b47ea733ef7ba542874feb1f677635
It's actually a pretty old bug :( https://bugs.php.net/bug.php?id=34972
Latest master works for me on OS X and Windows XP. Please, can you try code from this Gist (https://gist.github.com/JakubOnderka/fcbbba47aa4b1a650fa6) a attach the output?
Correct output look like this:
string(21) "Before stream select."
string(20) "After stream select."
int(0)
string(7) "Content"
string(0) ""
C:\Users\tomas\Downloads
λ php non-blocking-stdin.php
string(21) "Before stream select."
string(20) "After stream select."
int(1)
string(16) "Before get line."
s^C
c:\Users\tomas\Downloads>php non-blocking-stdin.php
string(21) "Before stream select."
string(20) "After stream select."
int(0)
string(7) "Content"
string(0) ""
Ha! It works in cmd, but not in cmder (i.e. conemu - http://bliker.github.io/cmder/)
As I said in my comment I can get the same "bad" result within plain standard console window.
That is because stream_select
returns 1
when STDIN
contains any type of console events. And that may be not only key presses! In my example with test.cmd
that was FOCUS_EVENT
. Running in ConEmu that may be KeyUp event (KEY_EVENT
with KEY_EVENT == FALSE
).
So, your code goes to the stream_get_line, but it can't read anything because there is no KeyDown events in the input buffer.
I decided to add '--stdin' parameter to tell Linter to blocking load files and directories to check from standard input. So I think this solve this issue and very thanks to @Maximus5 to explanation why stream_select not work.
exec fails for many files because of error 206 (Filename or extension too long). Works fine for v0.5