Can someone help me understand what Rosalyn API is and what is does?
I looked up Rosalyn cause I wanted to contribute to it's open source. But upon reading it's documentation from Microsoft, I was bombarded with so much information that I had to sleep for a few hours. Honestly don't think I am getting anywhere. So I need someone to break it down for me, with easy peasy examples. Thanks in advance.
15 Replies
Roslyn is the C# compiler, which you can also use to do things like code analysis. Yes, it's huge
What exactly are you trying to do with it?
I wanted to see if I could adapt to its codebase and submit a worthy PR to increase my coding knowledge.
I mean, any easy easy examples are necessarily only going to cover a small amount of what it can do
Most of the "up for grabs" issues are around analysis warnings, so maybe start there? You'll be doing an awful lot of reading code - https://sourceroslyn.io is good
The door that only few can enter. I will try to go in and see if I am worthy enough😂
When I submitted a PR for roslyn, I found the issue that I wanted to fix, the spent a long time reading the code and running the relevant unit tests in the debugger until I understood enough to write the fix
There wasn't any documentation or examples because this was part of the compiler internals
If you're tackling something to do with analysers, then there are various guides around
That's impressive. How did you run the codebase on your machine and debug it?
By downloading it and opening it in vs
Okay. Is there a guide on how do it, the right way?
Check the readme?
GitHub
GitHub - dotnet/roslyn: The Roslyn .NET compiler provides C# and Vi...
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. - dotnet/roslyn
Alright, wow. Okay. I will check it. Thanks man
But if I might ask, do you remember what you gained from the experience?
It was fun? I also tend to work on greenfield projects in my professional work, so it was a chance to make sure I could understand someone else's large codebase
Also some of my code gets called whenever someone concatenates two things in C#, which is kinda cool
🤌Real! Proud of you bro. Hopefully I am next
Also, #roslyn is a possibly relevant channel to this conversation
Okay, I will go there when I need to learn more. Thank you fred