Skip to content

Commit 1245b51

Browse files
authored
Merge pull request #211 from VaclavElias/master
Blog post improvements
2 parents 9ab7d96 + 1f74fd2 commit 1245b51

File tree

5 files changed

+19
-30
lines changed

5 files changed

+19
-30
lines changed

images/blog/2023-06/netlive.png

-895 KB
Binary file not shown.
16.1 KB
Binary file not shown.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"lunr": "^2.3.9",
2323
"markdown-it-anchor": "^8.6.6",
2424
"markdown-it-table-of-contents": "^0.6.0",
25-
"sass": "^1.69.3"
25+
"sass": "^1.69.4"
2626
}
2727
}

posts/2023-10-23-new-diagnostic-analyzers-feature.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,44 @@
22
title: "A closer look: Diagnostic Analyzers with Roslyn"
33
author: joreyk
44
popular: false
5-
image: https://www.jenx.si/wp-content/uploads/2020/10/cs-roslyn-logo.png
5+
image: /images/blog/2023-10/cs-roslyn-logo.webp
66
tags: ['.NET']
77
---
88

9-
Let's take a closer look at the DiagnosticAnalyzer added in Stride.Core.CompilerServices
9+
Let's take a closer look at the `DiagnosticAnalyzer` feature added in `Stride.Core.CompilerServices`. This feature offers real-time code analysis in your IDE, enhancing your workflow.
1010

1111
---
1212

1313
Table of Contents:
1414

1515
[[TOC]]
1616

17-
Stride advances further in utility and features every week.
18-
This blog will cover the new `DiagnosticAnalyzer` features in `Stride.Core.CompilerServices`
17+
Stride continues to evolve, adding new utilities and features every week. This blog post will cover the newly added `DiagnosticAnalyzer` feature in `Stride.Core.CompilerServices`.
1918

20-
## What is a DiagnosticAnalyzer?
19+
## What is a `DiagnosticAnalyzer`?
2120

22-
A `DiagnosticAnalyzer` is a Roslyn feature to scan your code while you are typing in your IDE.
23-
C# uses them too, everytime you see a warning or red squiggly lines in your IDE, a `DiagnosticAanalyzer` get's triggered.
24-
This analyzation has `NOTHING` to do with telemetry.
21+
A `DiagnosticAnalyzer` is a feature from Roslyn that scans your code while you are typing in your IDE. C# also utilizes this feature; every time you see a warning or red squiggly lines in your IDE, a `DiagnosticAnalyzer` gets triggered. Importantly, this analysis has nothing to do with telemetry.
2522

2623
## What does it do?
2724

28-
The new `Diagnostics` cover mostly [Serialization](https://doc.stride3d.net/latest/en/manual/scripts/serialization.html), the analyzers will create warnings when code is written that is incompatible with [Strides Serialization Rules of Thumb](https://doc.stride3d.net/latest/en/manual/scripts/serialization.html#rule-of-thumb).
29-
Each of the error codes follows this format `STRDIAGXXX` where X represents a number digit.
30-
Clicking on the error codes will open a help page which explains in depth why the `DiagnosticAnalyzer` got triggered and explains how to resolve the warning.
31-
The error code pages can be found [here](https://doc.stride3d.net/latest/en/diagnostics/)
25+
The new `Diagnostics` primarily focus on [Serialization](https://doc.stride3d.net/latest/en/manual/scripts/serialization.html). These analyzers generate warnings for code that is incompatible with [Stride's Serialization Rules of Thumb](https://doc.stride3d.net/latest/en/manual/scripts/serialization.html#rule-of-thumb).
3226

33-
## Why?
27+
Each error code follows this format: `STRDIAGXXX`, where 'X' represents a numerical digit. Clicking on these error codes will open a help page that explains in depth why the `DiagnosticAnalyzer` was triggered and how to resolve the warning. You can find these error code pages [here](https://doc.stride3d.net/latest/en/diagnostics/).
3428

35-
It should reduce the "Why is my property not appearing in the Editor?" moments.
36-
Often it's unclear why a property is not showing up in the editor.
37-
The analyzers should help to clarify these situations and help in developing in Stride
29+
## Why use it?
30+
31+
This feature aims to minimize those "Why is my property not showing up in the [Game Studio](https://doc.stride3d.net/latest/en/manual/game-studio/index.html)?" moments. It's often unclear why certain properties don't appear in the editor. These analyzers are designed to clarify such situations, aiding your development process in Stride.
3832

3933
## Current State
4034

41-
The PR to add these Analyzers got merged. But there was no release yet which includes them.
42-
To test them now building the engine from source is an option.
43-
Else wait until the next release package of Stride.
35+
The pull request (PR) to introduce these analyzers has been merged. However, there hasn't been a release that includes them yet. If you're eager to test them out, you can build the engine from the source. Otherwise, you'll have to wait for the next release of Stride's NuGet packages.
4436

4537
## For Engine Developers
4638

47-
It's easy to add new analyzers to the engine.
48-
VS has a bug caused by .NET.
49-
This bug causes VS to only load once Roslyn at start up.
50-
To fix this after adding a new analyzer, compile the `Stride.Core.CompilerServices` and restart VS.
39+
Adding new analyzers to the Stride engine is straightforward. However, be aware that Visual Studio (VS) has a bug caused by .NET, which makes VS load Roslyn only once at startup. To work around this, compile `Stride.Core.CompilerServices` and restart VS after adding a new analyzer.
5140

5241
## Summary
5342

54-
It's a new quality of life feature to easier develop in Stride by getting immediate feedback about problems while coding.
43+
This is a new quality-of-life feature that simplifies development in Stride by providing immediate feedback on coding issues.
5544

56-
Thank you for reading 📖, and happy coding 💻👩‍💻👨‍💻!
45+
Thank you for reading 📖, and happy coding 💻👩‍💻👨‍💻!

0 commit comments

Comments
 (0)