From ca710a99a686cbce463d7748d76de7f73dcc6c04 Mon Sep 17 00:00:00 2001 From: vczh Date: Tue, 21 Apr 2026 00:30:18 -0700 Subject: [PATCH] Refresh Copilot assets --- .github/KnowledgeBase/Learning.md | 5 +++++ .github/Scripts/copilotDebug_RunCommand.ps1 | 3 ++- .github/Scripts/copilotDebug_Start.ps1 | 3 ++- .github/Scripts/copilotDebug_Stop.ps1 | 3 ++- .github/Scripts/copilotShared.ps1 | 5 +++++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/KnowledgeBase/Learning.md b/.github/KnowledgeBase/Learning.md index 7368d27c..8fe8d091 100644 --- a/.github/KnowledgeBase/Learning.md +++ b/.github/KnowledgeBase/Learning.md @@ -19,6 +19,7 @@ - Dereference `Ptr` via `.Obj()` (not `*ptr`) [1] - `vl::regex` separator regex: `L"[\\/\\\\]+"` [1] - Use 2-space indentation in embedded XML/JSON literals [1] +- `collections::List` has deleted copy constructor; use `std::move()` for structs with `List` members [1] # Refinements @@ -97,3 +98,7 @@ When writing XML or JSON inside a C++ string literal (e.g. `LR"GacUISrc(... )Gac In `vl::regex::Regex`, both `/` and `\\` are escaping characters, and incorrect escaping inside `[]` can throw errors like `Illegal character set definition.` To split paths by either `/` or `\\`, a verified pattern is `L"[\\/\\\\]+"`, and using `Regex::Split(..., keepEmptyMatch=false, ...)` conveniently drops empty components (so `//` behaves like `/`). + +## `collections::List` has deleted copy constructor; use `std::move()` for structs with `List` members + +When a C++ struct contains `vl::collections::List` fields, the struct's implicit copy constructor is deleted. Appending such structs to a `vl::collections::List` by copy will fail at compile time with `error C2280`. Use `std::move()` when adding these structs to destination lists (e.g. `list.Add(std::move(model))`). Note: there is no repo-provided `Move()` utility; always use `std::move()` from ``. diff --git a/.github/Scripts/copilotDebug_RunCommand.ps1 b/.github/Scripts/copilotDebug_RunCommand.ps1 index 5bbe1b6e..da7c5236 100644 --- a/.github/Scripts/copilotDebug_RunCommand.ps1 +++ b/.github/Scripts/copilotDebug_RunCommand.ps1 @@ -8,6 +8,7 @@ if ([string]::IsNullOrEmpty($Command)) { . $PSScriptRoot\copilotShared.ps1 $cdbpath = GetCDBPath -$commandLine = "echo .remote_exit | `"$($cdbpath)`" -remote npipe:server=.,pipe=VlppUnitTest -clines 0 -c `"$Command`"" +$debuggerNamedPipe = GetDebuggerNamedPipe +$commandLine = "echo .remote_exit | `"$($cdbpath)`" -remote npipe:server=.,pipe=$debuggerNamedPipe -clines 0 -c `"$Command`"" echo $commandLine cmd.exe /S /C $commandLine diff --git a/.github/Scripts/copilotDebug_Start.ps1 b/.github/Scripts/copilotDebug_Start.ps1 index b504706e..df438856 100644 --- a/.github/Scripts/copilotDebug_Start.ps1 +++ b/.github/Scripts/copilotDebug_Start.ps1 @@ -25,6 +25,7 @@ Write-Host "Selected $executableName`: $($latestFile.Path) (Modified: $($latestF $debugArgs = GetDebugArgs $solutionFolder $latestFile $Executable $cdbpath = GetCDBPath -$commandLine = "`"$($cdbpath)`" -server npipe:pipe=VlppUnitTest -cf `"$PSScriptRoot\copilotDebug_Init.txt`" -o `"$($latestFile.Path)`" $debugArgs" +$debuggerNamedPipe = GetDebuggerNamedPipe +$commandLine = "`"$($cdbpath)`" -server npipe:pipe=$debuggerNamedPipe -cf `"$PSScriptRoot\copilotDebug_Init.txt`" -o `"$($latestFile.Path)`" $debugArgs" echo $commandLine cmd.exe /S /C $commandLine diff --git a/.github/Scripts/copilotDebug_Stop.ps1 b/.github/Scripts/copilotDebug_Stop.ps1 index 1342c92f..82cb7a9e 100644 --- a/.github/Scripts/copilotDebug_Stop.ps1 +++ b/.github/Scripts/copilotDebug_Stop.ps1 @@ -1,5 +1,6 @@ . $PSScriptRoot\copilotShared.ps1 $cdbpath = GetCDBPath -$commandLine = "`"$($cdbpath)`" -remote npipe:server=.,pipe=VlppUnitTest -clines 0 -c `"qq`"" +$debuggerNamedPipe = GetDebuggerNamedPipe +$commandLine = "`"$($cdbpath)`" -remote npipe:server=.,pipe=$debuggerNamedPipe -clines 0 -c `"qq`"" echo $commandLine cmd.exe /S /C $commandLine diff --git a/.github/Scripts/copilotShared.ps1 b/.github/Scripts/copilotShared.ps1 index 5a651cb9..3bda45ea 100644 --- a/.github/Scripts/copilotShared.ps1 +++ b/.github/Scripts/copilotShared.ps1 @@ -8,6 +8,11 @@ function GetCDBPath { return $env:CDBPATH } +function GetDebuggerNamedPipe { + $debuggerRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path + return ($debuggerRoot -replace "[^A-Za-z0-9]", "").ToUpperInvariant() +} + function GetSolutionDir { $currentDir = Get-Location $solutionFolder = $null