Allow synchronous usage
the implementation of the parallel processing with on windows requires temporary file creation, where the files communicate over dynamic ports. in a strict firewall environment (every process which want to connect has to be allowed on a specific port or port range first). currently it is not possible to handle this at all (will open a ticket at amphp). the main problem is that the files have random names, so it is not possible to precreate firewall rules.
also see my other ticket at https://github.com/humbug/box/issues/166
would love to see an --no-parallel flag, where your tool works synchronous without the use of amphp.
I would also like to see an abstraction from Amphp (if only to have a Swoole implementation). So with that done, having a purely synchronous version should be easy.
Can you please run composer update to ensure you're getting amphp/dns v0.9.14. That version removed the async hosts file loading which had the dependency on amphp/parallel, so at least that should eliminate the immediate problem for this library.
@c33s I'll soon address the issues you opened in amphp.
https://github.com/amphp/process/issues/37 as soon as 1.1.1 is released you should update
Can you confirm this update fixes the issue on Windows?
@dantleech only partly. on windows a helper process file is needed for amphp to work, with process 1.1.1 the name of this created exe file is always the same, so it is possible to create firewall rules for it (before the filename was random, so no fw rules could be created). so it is a huge improvement.
still it would be cool to use this tool without the need for creating firewall rules for helper processes. so this issue maybe should stay open. but the team at amphp reacted really fast and in an awesome manner to the issue i opened, so i hope a full solution could be find in amphp so it simply works no matter if port access is blocked or not.
still requesting a synchron usage as it would help to unbreak this awesome tool on windows and also help on CI. having the colored output, no --display-bufsize=9999 and no need to limit the request speed as synchron access is simply slower. to fast crawling also easily triggers firewalls,
i have quite a good experience with the symfony process component (but i also use it synchron).
- https://symfony.com/doc/current/components/process.html
- https://github.com/symfony/process