Sync copilot context

This commit is contained in:
vczh
2026-05-20 02:08:57 -07:00
parent d8a4d3274c
commit 5db12eeb31
6 changed files with 15 additions and 20 deletions
+1 -4
View File
@@ -19,10 +19,7 @@ cd SOLUTION-ROOT
```
It is possible that, before running `copilotBuild.ps1`, the binary to compile is still running or still being debugged. This could cause the linking to fail. You need to check the error message, and in case when it happens:
- Kill `cdb` process first, if any.
- The cdb path is stored in `$env:CDBPATH`.
- Avoid running `copilotDebug_Stop.ps1` directly.
- Kill the binary process that is blocked.
- Follow `### Stop a Debugger` in `REPO-ROOT/.github/Guidelines/Debugging.md` to stop debugging.
- Rebuild, and this issue should be gone.
### Ensure Target Configuration
+3 -9
View File
@@ -29,15 +29,9 @@ After you are ready, send the `g` command to start running.
### Stop a Debugger
You must call this script to stop the debugger.
Do not stop the debugger using any command.
This script is also required to run before compiling only when Visual Studio Code tasks are not available to you.
```
& REPO-ROOT\.github\Scripts\copilotDebug_Stop.ps1
```
If there is any error message, it means the debugger is not alive, which is fine.
- Kill `cdb` process first, if any.
- The cdb path is stored in `$env:CDBPATH`.
- Kill the binary process that is blocked.
#### Warning
+5
View File
@@ -25,6 +25,7 @@
- Avoid references into containers when mutating them [1]
- Prefer designated initializers for aggregate-like structs [1]
- Construct `Nullable<WString>` explicitly in function calls [1]
- Sort serialization metadata by deterministic keys, not pointer addresses [1]
- `collections::Dictionary` copy assignment is deleted (use move/swap) [1]
- Dereference `Ptr<T>` via `.Obj()` (not `*ptr`) [1]
- `vl::regex` separator regex: `L"[\\/\\\\]+"` [1]
@@ -129,6 +130,10 @@ For small structs used as value objects (especially those with default member in
When passing string literals to a function parameter typed as `Nullable<WString>`, wrap them in `WString(...)` (or otherwise construct a `WString`) to make the conversion explicit. Direct assignment to a `Nullable<WString>` field may compile via an assignment operator, but function-call argument conversion can require explicit construction.
## Sort serialization metadata by deterministic keys, not pointer addresses
When serializing metadata into stable binary output, do not let pointer-address ordering decide indices or item order. Collect items for membership checks if needed, then sort the serialized lists by deterministic keys such as type names or owner-qualified member signatures before assigning indices and writing the stream. This applies to type descriptors, methods, properties, events, and generated custom-type lists whose order would otherwise depend on allocation order or ASLR.
## `collections::Dictionary` copy assignment is deleted (use move/swap)
`collections::Dictionary` does not support copy assignment. When you need to replace one dictionary with another, use move semantics (when appropriate), or rebuild/swap explicitly instead of `a = b`.
-6
View File
@@ -1,6 +0,0 @@
. $PSScriptRoot\copilotShared.ps1
$cdbpath = GetCDBPath
$debuggerNamedPipe = GetDebuggerNamedPipe
$commandLine = "`"$($cdbpath)`" -remote npipe:server=.,pipe=$debuggerNamedPipe -clines 0 -c `"qq`""
echo $commandLine
cmd.exe /S /C $commandLine
-1
View File
@@ -78,7 +78,6 @@ If you need to find any script or support files, they are in the `REPO-ROOT/.git
- `copilotBuild.ps1`
- `copilotExecute.ps1`
- `copilotDebug_Start.ps1`
- `copilotDebug_Stop.ps1`
- `copilotDebug_RunCommand.ps1`
- `copilotRemember.ps1`
- `Build.log`
+6
View File
@@ -138,6 +138,12 @@ Propose any solution you can think of and write them down in the document, you m
- If there is only one `[CONFIRMED]` proposal, you should keep the change in the source code, according to its `### CODE CHANGE` section. And then do `Step 6`.
- If there is multiple `[CONFIRMED]` proposals, you are going to make your decision about which is the best one, and keep that change in the source code, according to its `### CODE CHANGE` section. And then do `Step 6`. You will also need to write in the selected proposal about why it is better than the others, and also tell me directly.
- Understand and implement the proposal.
- **IMPORTANT** The order of confirming a proposal should be in this order:
- Write down the details of a proposal to the document and save the file.
- Summarize `### CODE CHANGE`.
- Execute it and see if it works.
- I would like you to make sure that, before the test cases are running, the proposal has already been documented in the file.
- Test failures not necessary mean the proposal is invalid, it might be because of the implementation. But if you need to change the implementation, you should update the proposal in the same order. Unless it is a fundementally different idea, then abandon the current proposal and propose more.
- Run the test cases to confirm the proposal.
- Ensure all test cases passed.
- If related test cases failed, it means the proposal is denied.