Skip to content

Build script to incremental - #67

Merged
peterbarancek merged 3 commits into
devfrom
build-script-to-incremental
Nov 3, 2026
Merged

peterbarancek merged 3 commits into
devfrom
build-script-to-incremental

Conversation

@peterbarancek

Copy link
Copy Markdown
Collaborator

No description provided.

peterbarancek and others added 2 commits October 30, 2026 10:06
…ruption

- Record completed build steps in _Vortex/build.state.json; with resume=$true
  a failed build continues from the failed step. Vortex builder runs per
  component (dependency order from csproj/plcproj references), PLC compile per
  tsproj and tests per test project, each checkpointed separately.
- Run Visual Studio for the builder headless (headlessVs) with a COM message
  filter, and add incremental mode (no clean, /Build instead of /Rebuild).
- Load/save tsproj XML as UTF-8 and save only on change. Get-Content read the
  BOM-less files as ANSI, so every build re-encoded the 'µs' of the EL1819
  terminal in XAETcoIo.tsproj; the file grew to ~600 MB and stopped loading.
- Repair the corrupted EL1819 terminal names in XAETcoIo.tsproj.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous repair wrote a 0x01 control character instead of the terminal
name, so XmlDocument.Load fails on CI: "'\x01', hexadecimal value 0x01, is an
invalid character". Restore 'EL1819 16Ch. Dig. Input 24V, 10µs'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Visual Studio cleanup can force-close unrelated developer sessions and lose unsaved work, while non-VS builds omit the required -n false option.

3 open issues
What changed in this PR

This PR updates the build pipeline to support incremental builds, resumable checkpoints, and background Visual Studio automation.

Changes:

  • Adds incremental cleanup and PLC build options, with checkpoints for components, projects, and tests.
  • Introduces hidden Visual Studio lifecycle helpers and dependency-ordered component builds.
  • Preserves UTF-8 XML encoding and documents the new build options.
File Description
README.md Documents headless, incremental, and resume settings.
pipelines/​tcobuildutils.psm1 Adds XML handling, Visual Studio automation, checkpoint storage, and partial solution-filter helpers.
pipelines/​build.ps1 Integrates incremental builds, checkpoints, and per-component build execution.

Review effort: Balanced

Comment thread pipelines/build.ps1
finally
{
if($hiddenVs) { Stop-HiddenVs $hiddenVs }
elseif($doesNeedVs) { Stop-AllVs }

$before = @(Get-Process devenv -ErrorAction SilentlyContinue | ForEach-Object { $_.Id })
$dte = New-Object -ComObject $progId
$vsProcessIds = @(Get-Process devenv -ErrorAction SilentlyContinue | Where-Object { $before -notcontains $_.Id } | ForEach-Object { $_.Id })
Comment thread pipelines/build.ps1
if(-not (Test-BuildStepPending $buildStateFile $step)) { continue }

$slnf = New-PartialSlnf .\TcOpen.plc.slnf $component.Projects $component.Name .\_Vortex\slnf
$command = ".\_Vortex\builder\vortex.compiler.console.exe -s `"$slnf`""
@peterbarancek
peterbarancek merged commit e577580 into dev Nov 3, 2026
1 check passed
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