Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn the user when it is running in an unsupported environment/configuration #2987

Open
xandervedder opened this issue Jul 19, 2024 · 5 comments
Labels
Area: Initialization projects identification and analyze 🚀 Feature request New feature or request hacktoberfest https://hacktoberfest.digitalocean.com

Comments

@xandervedder
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We were trying to run Stryker.NET on a .NET Framework project on an Azure Agent, but it crashed after around 30 seconds. Eventually we found out that the agent was using Linux. Obviously, in most scenarios that does not work, but it took us a while to figure out what exactly the problem was.

Describe the solution you'd like
I would like to see Stryker.NET warn us when it is running in an unsupported environment/configuration (Linux and .NET Framework in this case).

Maybe something along the lines of:
[xx:xx:xx WRN] Stryker detected an unsupported running configuration. Stryker might not work as expected.

Additional context
This is the error we came across:

[05:57:18 ERR] An error occurred during the mutation test run 
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'where.exe' with working directory '/home/vsts/work/1/s'. No such file or directory
   at Stryker.Core.Initialisation.InputFileResolver.AnalyzeAllNeededProjects(List`1 projectList, StrykerOptions options, IAnalyzerManager manager, ScanMode mode)
   at Stryker.Core.Initialisation.InputFileResolver.AnalyzeAndIdentifyProjects(List`1 projectList, StrykerOptions options, IAnalyzerManager manager, ScanMode mode)
   at Stryker.Core.Initialisation.InputFileResolver.ResolveSourceProjectInfos(StrykerOptions options)
   at Stryker.Core.Initialisation.InitialisationProcess.GetMutableProjectsInfo(StrykerOptions options)
   at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)
   at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator)
@xandervedder xandervedder added 🚀 Feature request New feature or request hacktoberfest https://hacktoberfest.digitalocean.com labels Jul 19, 2024
@dupdob
Copy link
Member

dupdob commented Jul 19, 2024

Stryker is supposed to work on Linux, and it is tested on Linux (and macOs for that matter) during integration testing.
So this is a bug

@dupdob dupdob added 🐛 Bug Something isn't working Area: Initialization projects identification and analyze and removed 🚀 Feature request New feature or request hacktoberfest https://hacktoberfest.digitalocean.com labels Jul 19, 2024
@rouke-broersma
Copy link
Member

rouke-broersma commented Jul 19, 2024

@dupdob this is full framework on linux, which is not really supported. We assume we can run vswhere.exe when we are dealing with full framework, but on most linux systems vswhere.exe (and msbuild for that matter) will not be available. currently this crashes with a Win232xception which is not very friendly.

We might at some point be able to detect this scenario and build using mono?

@rouke-broersma rouke-broersma added 🚀 Feature request New feature or request and removed 🐛 Bug Something isn't working labels Jul 19, 2024
@dupdob
Copy link
Member

dupdob commented Jul 19, 2024

ah, thanks :-)
it is still a bug thought: it should fail properly with a 'project analysis failed' or 'build failed' message, not a crash

@rouke-broersma
Copy link
Member

I would class this more as user error. Dotnet framework does not properly build on linux (unless you use mono, but we don't claim to support mono). Hinting to the user that they are doing something unsupported is a nice to have, but really this is PEBCAK. Especially since @xandervedder is a coworker 🤡

@xandervedder
Copy link
Contributor Author

Yes this is definitely a user error 😄, but it might save some time for other users if we warn them about it.

@xandervedder xandervedder added the hacktoberfest https://hacktoberfest.digitalocean.com label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Initialization projects identification and analyze 🚀 Feature request New feature or request hacktoberfest https://hacktoberfest.digitalocean.com
Projects
Status: No status
Development

No branches or pull requests

3 participants