jbliznak commented on issue #3176:
URL: 
https://github.com/apache/maven-surefire/issues/3176#issuecomment-3900317220

   IIUC you are talking about 3 different concerns:
   
   ---
   
   1) whether powershell is safe to use
   There is probably some misunderstanding:
   > We cannot say "Dear customer. If you want to run your tests you HAVE TO 
install ... PowerShell. Forget about native commands embedded in the Operating 
system. You would not have the comfort you had before but who cares, we are the 
devs whatsoever."
   This is my problem.
   
   And we don't need to say this to users. Because you don't have to install 
powershell - it is there in any recent version of Windows, in the same location 
that is expected by new code.
   It is even recommendation from Microsoft itself to use it as a replacement 
for wmic calls. 
https://techcommunity.microsoft.com/blog/windows-itpro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/4039242
   
   Please do not mistake `powershell` (what is now used in master - which is 
native command embedded in any recent Windows) with `pwsh` (which is a 
standalone distribution that you have to install, but we don't need it).
   
   The only problem with powershell could be if you want to support ancient 
Windows versions which had older version of Powershell that would require 
different command to get process info. I didn't find any information about what 
are the target OS versions that should be supported with surefire. But users 
now should really be using only Win 10+ or Windows Server 2012+ 
(https://endoflife.date/windows or https://endoflife.date/windows-server) - and 
all of those have powershell accepting current command available.
   
   ... We can also complicate it and and change implementation to first try to 
use wmic and fallback to powershell which should cover even more Windows 
versions...but as said, I don't think this is needed.
   
   ---
   
   2) whether we should go only with Java9+ way and drop native commands to 
make it more robust
   > The (2) can be solved once for all, if we use Java 9 and not PowerShell 
not PS not WMIC. This would be ideal!
   
   I agree, the things will get much easier in Surefire 4.x (for Maven 4.x ~ 
JDK17+).
   
   However, you _can't_ go with Java9+ as long as this Surefire 3.x version is 
supposed to be used with Maven 3.x.
   So I see that as irrelevant to this issue, we simply can't do that yet.
   
   ---
   
   3) whether the fallback to ping still works
   > the native command did not fallback to PING after the first crash,
   
   So this I take is a usecase (1) from your previous messages. And AFAICT 
nothing in our PRs changed that logic. 
   
   Yes, it is possible the ping fallback isn't working. Otherwise it would kick 
in also with wmic missing on Win 11 / 2025 and this issue wouldn't even need to 
be reported, right?
   
   --> Should we reopen the issue to cover also this missing case or deal with 
it in separate issue?
   
   ---


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to