Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdded a new RSCG (Roslyn Source Code Generator) example titled "TypedPaths" to the documentation catalog. Updated example count from 258 to 259 across README, metadata, and site documentation. Added TypedPaths example code, configuration, tours, and comprehensive documentation in multiple formats. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a new RSCG example entry for TypedPaths (FilesToCode category) and updates the generated site/book/export artifacts to include it as example #259.
Changes:
- Add the TypedPaths example project + metadata (description, readme, NuGet blurb, downloadable zip, VS Code tour, and video script).
- Update aggregated datasets/exports (JSON/XLSX/CSV) and docs indices/category pages to reflect 259 total examples.
- Improve NuGet registration JSON parsing in the generator with error handling (and additional logging).
Reviewed changes
Copilot reviewed 25 out of 28 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| v2/RSCGExamplesData/GeneratorDataRec.json | Adds TypedPaths entry to generator data list. |
| v2/rscg_examples/TypedPaths/video.json | New video script for the TypedPaths example. |
| v2/rscg_examples/TypedPaths/src/FolderToCode/Program.cs | Minimal demo usage of generated TypedPaths constants. |
| v2/rscg_examples/TypedPaths/src/FolderToCode/FolderToCode.csproj | Demo project referencing TypedPaths.Generator and configuring TypedPathsFolder. |
| v2/rscg_examples/TypedPaths/src/FolderToCode/a/andrei.txt | Input file used by the generator to produce a typed path. |
| v2/rscg_examples/TypedPaths/src/FolderToCode.slnx | Solution wrapper for the demo project. |
| v2/rscg_examples/TypedPaths/readme.txt | Captures upstream README content for documentation. |
| v2/rscg_examples/TypedPaths/nuget.txt | Short NuGet description snippet for the example. |
| v2/rscg_examples/TypedPaths/description.json | Example metadata (links, author, “good for”, demo files). |
| v2/rscg_examples_site/static/sources/TypedPaths.zip | Downloadable zipped source for the TypedPaths example. |
| v2/rscg_examples_site/static/exports/RSCG.xlsx | Regenerated Excel export including TypedPaths. |
| v2/rscg_examples_site/static/exports/RSCG.json | Regenerated JSON export including TypedPaths. |
| v2/rscg_examples_site/src/components/HomepageFeatures/index.js | Updates homepage example count (258 → 259). |
| v2/rscg_examples_site/docs/RSCG-Examples/TypedPaths.md | New documentation page for TypedPaths example. |
| v2/rscg_examples_site/docs/RSCG-Examples/index.md | Updates list-by-category page count and adds TypedPaths entry. |
| v2/rscg_examples_site/docs/indexRSCG.md | Updates chronological list count and adds TypedPaths row (#259). |
| v2/rscg_examples_site/docs/Categories/FilesToCode.md | Updates category count and adds TypedPaths to FilesToCode list. |
| v2/rscg_examples_site/docs/Categories/_PrimitiveFilesToCode.mdx | Updates shared category snippet to include TypedPaths. |
| v2/rscg_examples_site/docs/Authors/Alex_Chim.md | Adds new author page listing TypedPaths. |
| v2/rscg_examples_site/docs/about.md | Updates “About” page count (258 → 259). |
| v2/Generator/MultiGeneratorV2.cs | Adds logging + try/catch around NuGet JSON parsing. |
| v2/Generator/all.csv | Adds TypedPaths row (#259) to generator input list. |
| v2/book/pandocHTML.yaml | Includes TypedPaths HTML in pandoc input list. |
| v2/book/list.html | Updates book list count and adds TypedPaths link. |
| v2/book/examples/TypedPaths.html | Adds book HTML page for TypedPaths example. |
| v2/.tours/TypedPaths.tour | Adds VS Code CodeTour for the TypedPaths example. |
| README.md | Updates repo counts/latest update and adds TypedPaths summary section. |
| later.md | Updates “Latest Update” date to 2026-04-01. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var handler = new HttpClientHandler | ||
| { | ||
| AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate | ||
| }; | ||
| HttpClient _client = new(handler); | ||
| Console.WriteLine($"grab data from {url}"); | ||
| var response = await _client.GetAsync(url); | ||
| var data=await response.Content.ReadAsStringAsync(); | ||
| var answer= JsonDocument.Parse(data); | ||
| Console.WriteLine($"{namePackage}: {data}"); |
There was a problem hiding this comment.
HttpClient _client = new(handler); is created per package request but never disposed (and not reused). This can lead to socket exhaustion and unnecessary resource usage when iterating through many packages. Prefer reusing a single HttpClient instance for the generator run, or wrap this instance in a using/await using so it gets disposed after the request(s).
| JsonDocument answer; | ||
| try | ||
| { | ||
| answer = JsonDocument.Parse(data); | ||
| } |
There was a problem hiding this comment.
JsonDocument implements IDisposable, but answer is not disposed here. Use a using declaration (using var answer = JsonDocument.Parse(data);) so buffers are released promptly, especially since this runs in a loop across many packages.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TypedPaths#download-example-net--c-", | ||
| SpeakTest=" "}, |
There was a problem hiding this comment.
This JSON is invalid: the object at the browser step is not closed correctly and SpeakTest=" " is not valid JSON syntax. This will fail any JSON parsing for video scripts. Make SpeakTest a quoted JSON property on the same object (or remove it) and ensure the browser step object is properly closed.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TypedPaths#download-example-net--c-", | |
| SpeakTest=" "}, | |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/TypedPaths#download-example-net--c-","SpeakTest":" "}, |
| ,{ | ||
| "file": "rscg_examples/TypedPaths/src/FolderToCode/Program.cs", | ||
| "description": "File Program.cs \r\n>> dotnet run --project rscg_examples/TypedPaths/src/FolderToCode/FolderToCode.csproj ", | ||
| "pattern": "this is the code" |
There was a problem hiding this comment.
This CodeTour step uses "pattern": "this is the code", but the referenced Program.cs in this PR doesn’t contain that text, so the step likely won’t resolve/highlight anything. Update the pattern to match actual content (e.g., TypedPaths.Src) or switch to a line-based step.
| "pattern": "this is the code" | |
| "pattern": "TypedPaths.Src" |
| <h2>Info</h2> | ||
| Nuget : <a href="https://www.nuget.org/packages/TypedPaths/" target="_blank">https://www.nuget.org/packages/TypedPaths/</a> | ||
|
|
There was a problem hiding this comment.
The NuGet links and package name in this generated HTML point to https://www.nuget.org/packages/TypedPaths/, but the example and docs use TypedPaths.Generator (https://www.nuget.org/packages/TypedPaths.Generator/). This mismatch will send readers to the wrong package (or a non-existent one). Update the URL/text to the generator package.
| const FeatureList = [ | ||
| { | ||
| title: '258 Examples (16 from MSFT)', | ||
| title: '259 Examples (16 from MSFT)', |
There was a problem hiding this comment.
Indentation for the title property is inconsistent with the surrounding object literal (it’s not aligned with Svg and description). If this repo enforces formatting (Prettier/ESLint), this can cause lint/format noise. Re-indent the title line to match the surrounding style.
| title: '259 Examples (16 from MSFT)', | |
| title: '259 Examples (16 from MSFT)', |
| var response = await _client.GetAsync(url); | ||
| var data=await response.Content.ReadAsStringAsync(); | ||
| var answer= JsonDocument.Parse(data); | ||
| Console.WriteLine($"{namePackage}: {data}"); |
There was a problem hiding this comment.
Console.WriteLine($"{namePackage}: {data}"); logs the entire NuGet registration JSON for every package. This can be extremely large and will flood logs / slow down runs. Consider removing it, logging only on failures, or truncating/summarizing the payload (e.g., status code + first N chars).
| Console.WriteLine($"{namePackage}: {data}"); | |
| Console.WriteLine($"{namePackage}: status {(int)response.StatusCode} ({response.StatusCode}), length {data.Length} chars"); |
Summary by CodeRabbit
New Features
Bug Fixes