Skip to content

ci: hell - #1

Open
michioxd wants to merge 12 commits into
mainfrom
add-ci
Open

ci: hell#1
michioxd wants to merge 12 commits into
mainfrom
add-ci

Conversation

@michioxd

@michioxd michioxd commented Apr 13, 2026

Copy link
Copy Markdown
Owner

close after done ci

Summary by CodeRabbit

  • Chores
    • Improved CI XML patching to operate per-file, target fewer XML elements, and create fresh XML context per document to reduce unintended edits.
    • Ensure a UseOfAtl property exists and is set to Static for relevant build configurations; preserve existing include entries when patching.
    • Added CI step to install ATL components into the latest IDE when present, with explicit failure on missing installer.
    • Normalized include-path casing and strengthened file path resolution when saving updates.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

CI workflow PowerShell was refactored to resolve and load project files via Resolve-Path, use a per-file System.Xml.XmlNamespaceManager, narrow XPath to msb:ClCompile/msb:AdditionalIncludeDirectories, append %(AdditionalIncludeDirectories) when patching, ensure UseOfAtl=Static in Configuration PropertyGroups, and add an “Install ATL components” step. WTL include path casing changed in src/foo_opensubsonic.vcxproj.

Changes

Cohort / File(s) Summary
CI workflow & patch logic
.github/workflows/ci.yml
Refactor PowerShell patch: define per-project patch map, Resolve-Path each file, create a System.Xml.XmlNamespaceManager per XML doc, narrow XPath to msb:ClCompile/msb:AdditionalIncludeDirectories, append %(AdditionalIncludeDirectories) to include values, ensure UseOfAtl element exists and set to Static, and save back to resolved path. Added a new “Install ATL components” step that uses vswhere/vs_installer.exe to add ATL components and fails on missing VS path or non‑zero exit.
Source project include casing
src/foo_opensubsonic.vcxproj
Adjusted ClCompile AdditionalIncludeDirectories entries to change WTL include path casing from ..\lib\WTL\Include to ..\lib\wtl\Include without altering other entries.
SDK/project include append behavior
lib/.../*.vcxproj
Patch values updated to append %(AdditionalIncludeDirectories) so existing include directories are preserved when the CI patch step updates include paths.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as CI Runner
  participant PS as PowerShell Patch
  participant VSWhere as vswhere
  participant VSInst as vs_installer.exe
  participant VS as Visual Studio Install

  Runner->>PS: run patch script (per-project map)
  PS->>PS: Resolve-Path, Load XML, create XmlNamespaceManager
  PS->>PS: Modify ClCompile AdditionalIncludeDirectories, ensure UseOfAtl=Static
  PS->>Runner: save patched files to resolved paths

  Runner->>VSWhere: locate latest VS install
  VSWhere-->>Runner: VS install path
  Runner->>VSInst: invoke installer to add ATL components
  VSInst->>VS: modify installation (install ATL)
  VSInst-->>Runner: exit code
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hop through XML leaves with flair and cheer,
I bind the msb namespace, make paths clear,
I save the files where Resolve-Path does show,
I nudge ATL in VS to make builds go,
A tiny casing tweak — a rabbit’s happy glow. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'ci: hell' is vague and does not meaningfully describe the changeset. The word 'hell' appears to be incomplete, placeholder, or corrupted text. Replace the title with a clear, descriptive summary of the main changes, such as 'ci: add ATL component installation and MSBuild WTL integration' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

55-55: Add a fail-fast check when no XML nodes are matched.

Line 55 currently no-ops if the XPath returns zero nodes, which can silently mask SDK/project schema changes and make failures harder to diagnose later in the build.

Proposed diff
           foreach ($f in $map.Keys) {
             [xml]$x = Get-Content $f
             $ns = New-Object System.Xml.XmlNamespaceManager($x.NameTable)
             $ns.AddNamespace("msb", "http://schemas.microsoft.com/developer/msbuild/2003")
-            $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) | % { $_.InnerText = $map[$f] }
+            $nodes = $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns)
+            if ($null -eq $nodes -or $nodes.Count -eq 0) {
+              throw "Patch SDK: No ClCompile/AdditionalIncludeDirectories nodes found in '$f'."
+            }
+            $nodes | % { $_.InnerText = $map[$f] }
             $x.Save($f)
           }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 55, The XPath call
$x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) can
return zero nodes and currently silently no-ops; add a fail-fast check after
calling SelectNodes: if the returned node collection is empty (Count -eq 0 or
null) then log a clear error including the file/key ($f) and namespace ($ns) and
terminate the workflow (throw/Write-Error + exit non‑zero) so schema/SDK
mismatches are surfaced immediately; locate the SelectNodes usage and add this
guard before attempting to set InnerText on the nodes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 55: The XPath call
$x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) can
return zero nodes and currently silently no-ops; add a fail-fast check after
calling SelectNodes: if the returned node collection is empty (Count -eq 0 or
null) then log a clear error including the file/key ($f) and namespace ($ns) and
terminate the workflow (throw/Write-Error + exit non‑zero) so schema/SDK
mismatches are surfaced immediately; locate the SelectNodes usage and add this
guard before attempting to set InnerText on the nodes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05d9a1cf-e37b-4dc9-b1cb-3e8699e3fc3a

📥 Commits

Reviewing files that changed from the base of the PR and between c343ef9 and 98011ed.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

55-55: Fail fast when patch targets are not found.

Right now, if no nodes match, the step silently succeeds. Add an explicit guard so SDK/XML drift is caught at the patch step.

Proposed hardening
-            $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) | % { $_.InnerText = $map[$f] }
+            $nodes = $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns)
+            if (-not $nodes -or $nodes.Count -eq 0) {
+              throw "Patch SDK: no ClCompile/AdditionalIncludeDirectories nodes found in $f"
+            }
+            $nodes | % { $_.InnerText = $map[$f] }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 55, The patch step currently pipes the
result of $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories",
$ns) into a ForEach (%) and silently does nothing when no nodes are matched;
change it to first capture the result of $x.SelectNodes into a variable, check
that it is not null/empty, and if empty fail fast (write an error and exit
non‑zero or throw) so SDK/XML drift is caught; when nodes are present, iterate
over that collection and set $_.InnerText = $map[$f] as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 55: The patch step currently pipes the result of
$x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) into a
ForEach (%) and silently does nothing when no nodes are matched; change it to
first capture the result of $x.SelectNodes into a variable, check that it is not
null/empty, and if empty fail fast (write an error and exit non‑zero or throw)
so SDK/XML drift is caught; when nodes are present, iterate over that collection
and set $_.InnerText = $map[$f] as before.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cce277a6-cce7-48c0-9e9a-2e47ad5ef0c6

📥 Commits

Reviewing files that changed from the base of the PR and between 98011ed and 9217b50.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant