You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove docker container worktree logic (will use VSCode agent worktrees)
* Remove spinup, teardown
* Added tracing and logging for debug version of FieldWorks
-`XCore.Mediator_InvokeTrace`: Mediator invoke and job queue tracing.
42
+
-`XWorks_Timing`: Timing hooks in xWorks (RecordList, etc.).
43
+
-`XWorks_LinkListener`: LinkListener diagnostics.
44
+
- Additional Trace.WriteLine hooks exist in Debug-only helpers (`DebugProcs`, etc.).
45
+
46
+
## Assertions and UI
47
+
-`EnvVarTraceListener` honors `AssertUiEnabled` and `AssertExceptionEnabled` environment variables.
48
+
- Set `AssertUiEnabled=false` to suppress modal assertion dialogs; exceptions are thrown only if `assertexceptionenabled` remains `true`.
49
+
50
+
## Dev switch (auto config)
51
+
- FieldWorks now supports a swappable diagnostics config via `FieldWorks.Diagnostics.config`.
52
+
- Default is quiet. `build.ps1` now enables the dev diagnostics config automatically for Debug builds unless you override `/p:UseDevTraceConfig`. You can also force it via `UseDevTraceConfig=true` or by setting environment variable `FW_TRACE_LOG` before the build; the dev diagnostics file is copied as `FieldWorks.Diagnostics.config` in the output.
53
+
- Dev log location: `Output/Debug/FieldWorks.trace.log` (relative to the app folder) so it’s easy to collect alongside binaries.
54
+
- Dev config logs to `%temp%/FieldWorks.trace.log` and turns on the core switches above. Edit `Src/Common/FieldWorks/FieldWorks.Diagnostics.dev.config` to change log path or switches.
55
+
56
+
## Crash Evidence
57
+
- Check `%LOCALAPPDATA%\CrashDumps` for `FieldWorks.exe.*.dmp` (enable Windows Error Reporting local dumps if missing).
58
+
- Windows Event Viewer → Windows Logs → Application contains `.NET Runtime` and `Application Error` entries.
59
+
60
+
## Proposed Improvements (dev-only)
61
+
- Add `Docs/FieldWorks.trace.sample.config` with the snippet above for easy reuse.
62
+
- Introduce a dev flag (`UseDevTraceConfig=true` or `FW_TRACE_LOG` env var) that copies the dev diagnostics file next to `FieldWorks.exe` in Debug builds so tracing is on by default for local runs.
63
+
- Document standard trace switches in `Docs/logging.md` and keep `EnvVarTraceListener` as the default listener for dev traces.
- On Linux/macOS: Use `./build.sh` and ensure `msbuild`, `dotnet`, and native build tools are installed.
82
82
- Environment variables (`fwrt`, `Platform=x64`, etc.) are set by `SetupInclude.targets` during build.
83
83
84
-
## Worktree and Container Policy
84
+
## Concurrent Builds & Smart Kill
85
85
86
-
FieldWorks uses **git worktrees**for parallel development and **Docker containers** for build isolation:
86
+
FieldWorks supports concurrent builds in **git worktrees**(e.g., VS Code Background Agents) on the same machine.
87
87
88
-
| Location | Build Method | Reason |
89
-
|----------|--------------|--------|
90
-
| Main repo checkout | Host via `.\build.ps1`| Direct access to COM/registry |
91
-
| Worktree (`worktrees/agent-N`) | Container via `.\build.ps1`| COM/registry isolation |
88
+
To prevent conflicts where one build kills another's MSBuild nodes (which hold file locks on `FwBuildTasks.dll`), `build.ps1` uses a **Smart Kill** strategy:
89
+
1.**Scope**: Only kills processes in the current user session.
90
+
2.**Filter**: Only kills processes (msbuild, dotnet, vstest) that:
91
+
- Have the current worktree path in their command line.
92
+
- Have loaded a DLL from the current worktree.
92
93
93
-
**`.\build.ps1` and `.\test.ps1` handle this automatically:**
Host builds use `packages/` in the repo (via `nuget.config`).
62
-
63
-
Containers use **Hyper-V isolation** to fix the Windows Docker `MoveFile()` bug ([moby/moby#38256](https://github.com/moby/moby/issues/38256)). See `DOCKER.md` and `.cache/NUGET_CONTAINER_CACHE_ANALYSIS.md` for details.
48
+
FieldWorks uses **Registration-Free COM** (manifest-only) for most components.
49
+
- Registry isolation is generally not required for standard builds.
50
+
- Worktrees run on the host by default.
51
+
52
+
### NuGet Package Cache (Host Isolation)
53
+
Worktrees running on the host use a shared package cache but isolated scratch folders:
0 commit comments