question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stryker cannot handle C# 9 Source Generators

See original GitHub issue

Describe the bug In our project, we rely on source generators, one of the latest and greatest C# 9 features. Looks like their presence in code breaks Stryker’s efforts.

Logs log-20210216.txt

Expected behavior I don’t know if Stryker can theoretically handle all the magic behind source generators. If not, it would be probably enough to just not touch generated stuff at all.

Environment

  • OS: Windows
  • Type of project: core
  • Framework Version: .net 5
  • Stryker Version: 0.21.1

Additional context I also attach the code to reproduce the issue. SourceGeneratorExample.zip

I just run dotnet stryker from the test folder. If I comment generated code (//LogGenerator.Generated.Logger.Log();), everything works.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnMcGlynnMSFTcommented, Jul 2, 2021

I’ve created a Pull Request that demonstrates how to integrate source generators.

0reactions
rouke-broersmacommented, Jul 3, 2021

That’s amazing thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Let's Build an Incremental Source Generator With Roslyn, by ...
This talk was part of the JetBrains .NET Days Online 2022 conference. Details: https://pages.jetbrains.com/dotnet-days-2022 Description: ...
Read more >
Support for C# source generators? - General Discussion
We can't say that we can't handle source generation, because many generators do work just fine with NCrunch and some don't even require ......
Read more >
Webinar: Source Generators with Stefan Pölz
Stefan Pölz explains source generators: how they are currently used in .NET, how you can build your own, test them, and make them...
Read more >
C# Source Generator cannot be created
I found the solution for this by going to Microsoft directly. The error on the failure case is that the generator is dependent...
Read more >
Reprocessed by
The Reprocessed LF1837 is designed for use with Covidien™ electrosurgical generators that include vessel sealing capability.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found