Address review feedback: document that 'winget configure --enable' is
required before running winget configure manually, since the feature
may not be enabled by default.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a one-command developer environment setup that uses WinGet
Configuration (DSC) to install all build prerequisites: Developer Mode,
CMake, Visual Studio 2022, and the required VS workloads/components.
New files:
- tools/setup-dev-env.ps1: Detects any existing VS 2022 edition
(Community/Professional/Enterprise) and runs the matching WinGet
configuration. Defaults to Community when no VS 2022 is found.
- .vsconfig: Declares the required VS components (MSVC, ATL, Clang,
Windows SDK 26100, UWP tools, .NET desktop/WinUI workloads) so
VS Installer can import them directly.
- .config/configuration.winget: WinGet DSC config for VS Community.
- .config/configuration.vsProfessional.winget: Same for Professional.
- .config/configuration.vsEnterprise.winget: Same for Enterprise.
Updated doc/docs/dev-loop.md to document the automated setup and
reference the new .vsconfig and winget configuration files, while
keeping manual install instructions in a collapsed details block.
* Replace pre-commit hook with CMake-generated clang-format check
Replace the old pre-commit hook that shelled out to PowerShell and
never blocked commits (-NoFail) with a CMake-generated hook that
calls clang-format directly on staged C/C++ files.
- Add tools/hooks/pre-commit.in as a CMake template
- CMake resolves the clang-format path at configure time via
LLVM_INSTALL_DIR, matching the existing FormatSource.ps1.in pattern
- Hook blocks commits on formatting errors, skips gracefully if
clang-format is not available (cmake not yet run)
- ~5x faster than the old PowerShell approach (~0.5s vs ~2.6s)
* Make pre-commit hook behavior configurable via WSL_PRE_COMMIT_MODE
Add WSL_PRE_COMMIT_MODE CMake cache variable with three modes:
- warn (default): report formatting issues without blocking commit
- error: block commit when formatting issues are found
- fix: auto-format files and re-stage them
Also addresses PR feedback:
- Generate hook into build tree, copy to source tree for out-of-source builds
- Use repo-local tools/clang-format.exe instead of LLVM_INSTALL_DIR path
- Use @ONLY in configure_file to avoid shell variable substitution issues
- Document modes in dev-loop.md and UserConfig.cmake.sample
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add /attachdebugger option to automatically launch WinDbgX for test debugging
When /attachdebugger is passed to test.bat, run-tests.ps1 now:
- Starts te.exe with /waitfordebugger in the background
- Polls for the TE.ProcessHost.exe child process via WMI
- Launches WinDbgX attached directly to the test host PID
- With /inproc, attaches to TE.exe itself instead
This replaces the manual workflow of running /waitfordebugger, reading
the PID from the output, and launching WinDbgX separately.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* run-tests: use /inproc with /attachdebugger, simplify exit
Per review feedback from @OneBlue:
- Add /inproc when /attachdebugger is set so WinDbgX attaches
directly to TE.exe instead of polling for TE.ProcessHost.exe
- Simplify exit to pass through TE.exe exit code directly
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: update /attachdebugger to reflect /inproc behavior
The script now always adds /inproc, so update the README to match:
WinDbgX attaches directly to TE.exe, no ProcessHost polling.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Auto-detect host architecture when TARGET_PLATFORM and CMAKE_GENERATOR_PLATFORM are unset, defaulting to ARM64 on ARM64 hosts
- Fix trailing '|' in platform regex that made the else branch unreachable
- Refactor Visual Studio detection to prefer VS2022 and fall back to VS2026 with a clang-format warning- Document x64 .NET 6.0 runtime setup required for WiX on ARM64
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016.
The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021:
Number of commits on the main branch: 2930
Number of contributors: 31
Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.