Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Regresion in v0.7 #34

Closed
tomasfejfar opened this issue Jul 23, 2014 · 17 comments
Closed

Regresion in v0.7 #34

tomasfejfar opened this issue Jul 23, 2014 · 17 comments

Comments

@tomasfejfar
Copy link

Warning: proc_open(): CreateProcess failed, error code - 206 in ...vendor\jakub-ond
erka\php-parallel-lint\src\Process.php on line 72
Cannot create new process "php" -n "C:\Users\tomas\AppData\Roaming\Composer\vendor\jakub-onderka\php-parallel-lint\src/.
./bin/skip-linting.php" ".\data\www\bin\check.php" "..." // many more files

exec fails for many files because of error 206 (Filename or extension too long). Works fine for v0.5

@mhujer
Copy link

mhujer commented Jul 23, 2014

Same for me (Windows 8.1 64bit, PHP 5.5.11)

@JakubOnderka
Copy link
Owner

Probably fixed in last master version. Can you try it?

@tomasfejfar
Copy link
Author

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)?

@mhujer
Copy link

mhujer commented Aug 9, 2014

Same here

@JakubOnderka
Copy link
Owner

Can you please try latest version from master branch?

@JakubOnderka JakubOnderka reopened this Aug 16, 2014
@mhujer
Copy link

mhujer commented Aug 16, 2014

dev-master (d4baef2) works fine on Win8, thanks!

@tomasfejfar
Copy link
Author

Works fine with d4baef2

@tomasfejfar
Copy link
Author

  - Updating jakub-onderka/php-parallel-lint dev-master (d4baef2 => e81e0e1)
    Checking out e81e0e1df3edbfbba239f30d896c5c17dedff69f

..... and it's back :(

selfie-0

@tomasfejfar tomasfejfar reopened this Sep 15, 2014
@tomasfejfar
Copy link
Author

234d492

git bisect bad 234d49251b9e736c84b306c183fe901f5b2460e2
234d49251b9e736c84b306c183fe901f5b2460e2 is the first bad commit
commit 234d49251b9e736c84b306c183fe901f5b2460e2
Author: Jakub Onderka <[email protected]>
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

@JakubOnderka
Copy link
Owner

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.

@tomasfejfar
Copy link
Author

Freezing problem (#34 (comment)). Still not fixed in ed9ac31

@tomasfejfar
Copy link
Author

It's actually a pretty old bug :( https://bugs.php.net/bug.php?id=34972

@JakubOnderka
Copy link
Owner

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) ""

@tomasfejfar
Copy link
Author

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

@tomasfejfar
Copy link
Author

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/)

@Maximus5
Copy link

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.

@JakubOnderka
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants