Skip to content

Fix Linux tree template API injection in build-dotnet - #57

Merged
0x5143 merged 4 commits into
masterfrom
copilot/fix-failing-build-dotnet-job
Jul 16, 2026
Merged

Fix Linux tree template API injection in build-dotnet#57
0x5143 merged 4 commits into
masterfrom
copilot/fix-failing-build-dotnet-job

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

build-dotnet was failing because tree table code generation dropped the tree-specific API on Linux. The tree template used platform-dependent newline detection when inserting generated members, so the insertion marker was missed for CRLF output on a LF host.

  • Root cause

    • TreeTableTemplate searched for the insertion point using Environment.NewLine, which is \n on Linux.
    • The base generated table text still contained \r\n, so the tree API block was never inserted.
  • Generator change

    • Update TreeTableTemplate.tt to use deterministic marker matching:
      • try #endregion\r\n} first
      • fall back to #endregion\n}
    • This aligns the tree template with the existing graph template behavior.
  • Generated output sync

    • Update the checked-in TreeTableTemplate.cs to match the T4 source change so repository builds use the corrected generated implementation immediately.
var idx = text.IndexOf("    #endregion\r\n}", StringComparison.Ordinal);
if (idx < 0)
{
    idx = text.IndexOf("    #endregion\n}", StringComparison.Ordinal);
}

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-dotnet Fix Linux tree template API injection in build-dotnet Jul 16, 2026
Copilot AI requested a review from 0x5143 July 16, 2026 00:56
@0x5143
0x5143 marked this pull request as ready for review July 16, 2026 00:57
@0x5143
0x5143 merged commit 71cf0df into master Jul 16, 2026
2 checks passed
@0x5143
0x5143 deleted the copilot/fix-failing-build-dotnet-job branch July 16, 2026 01:11
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.

2 participants