Skip to content

feat add source st file path to twins#526

Merged
PTKu merged 4 commits into
devfrom
feat-add-source-st-file-path-to-twins
May 30, 2026
Merged

feat add source st file path to twins#526
PTKu merged 4 commits into
devfrom
feat-add-source-st-file-path-to-twins

Conversation

@PTKu
Copy link
Copy Markdown
Contributor

@PTKu PTKu commented May 30, 2026

Summary

  • Emits a new SourceFileAttribute on transpiled types so generated twin/POCO/Onliner C# carries the originating .st source file path.
  • Adds SourceFileAttribute + SourceFileAttributeHelper and wires emission through the Onliner and Plain source builders; regenerates all expected unit fixtures (ax/tia/ix) accordingly.
  • Adds dependency tooling: update-latest-deps.ps1, update-vulnerable-deps.ps1, shared _deps-common.ps1; pins transitive vulnerabilities and bumps Inxton.Operon / NuGet packages.
  • Refactors operon-variables.css for consistency.

Note: this repository has no CHANGELOG.md, so the description is derived from commits and the diff stat rather than a changelog entry.

Commits

feat

  • 408526f feat(compiler): emit SourceFileAttribute on transpiled types

chore

  • 55af31f chore(deps): add dep update/audit scripts; pin transitive vulns

Other

  • c7789de Update Inxton.Operon and NuGet packages to latest versions
  • b062f19 Update integrity hash for @ax/stc package in apax-lock.json
  • 1393a00 Exclude generated bin and obj directories from samples in test projects to prevent duplicate-attribute errors
  • 492fd74 Refactor CSS variables for improved consistency and clarity

Diff stat

 scripts/update-latest-deps.ps1                     | 692 +++++++++++++++++++++
 scripts/update-vulnerable-deps.ps1                 | 593 ++++++++++++++++++
 .../wwwroot/css/operon-variables.css               | 499 ++++++++++++---
 .../tia/.g/Onliners/compileromitsattribute.g.cs    | 257 ++++----
 .../ax/.g/Onliners/compileromitsattribute.g.cs     | 257 ++++----
 scripts/_deps-common.ps1                           | 153 +++++
 .../SourceFileAttributeTests.cs                    | 118 ++++
 .../units/expected/tia/.g/Onliners/misc.g.cs       |  81 +--
 .../units/expected/ax/.g/Onliners/misc.g.cs        |  81 +--
 .../expected/tia/.g/Onliners/configuration.g.cs    |  77 +--
 .../expected/ax/.g/Onliners/configuration.g.cs     |  77 +--
 .../ax/.g/Onliners/types_with_name_attributes.g.cs |  71 ++-
 .../.g/Onliners/types_with_name_attributes.g.cs    |  71 ++-
 .../expected/tia/.g/Onliners/struct_simple.g.cs    |  70 ++-
 .../expected/ax/.g/Onliners/struct_simple.g.cs     |  70 ++-
 .../Attributes/SourceFileAttribute.cs              |  38 ++
 .../Helpers/SourceFileAttributeHelper.cs           |  36 ++
 .../samples/sourcefile/src/sub/widget.st           |  17 +
 Directory.Packages.props                           |  15 +-
 … and 175 more files
 195 files changed, 3244 insertions(+), 844 deletions(-)

Test plan

  • Run the modified PowerShell script(s) end-to-end and verify exit code 0
  • apax build from a workspace succeeds (the src/apax/apax-lock.json + Directory.Packages.props changes resolve)
  • dotnet build from solution root succeeds
  • PLC code compiles via apax build; affected .st sample sequences transpile with the new SourceFileAttribute
  • CsTests SourceFileAttributeTests pass and all regenerated expected fixtures match

Generated by /pr-description-update. Last regenerated: 2026-05-30.

PTKu and others added 4 commits May 30, 2026 16:26
Decorate every generated C# type (twin + POCO) with
[AXSharp.Connector.SourceFileAttribute] naming its origin .st file,
relative to project src, forward-slash normalized. Origin now travels
with the compiled artifact via reflection.

- Both Onliner and Plain builders; classes/FBs, structs, interfaces,
  and Onliner enums + named-value enums
- Merged Configuration/TwinController skipped (no single source)
- Dedup sample .st FQNs (namespace::type unique per file): the
  golden tree is validated by both per-file and whole-project tests,
  so duplicate FQNs leaked wrong source paths
- Regenerate unit/consumer goldens; hand-fix Configurations.g.cs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add scripts/update-latest-deps.ps1 (latest-stable bumps with cake
build-verify + bisection) and scripts/update-vulnerable-deps.ps1
(GitHub Advisory remediation), sharing scripts/_deps-common.ps1.
AXSharp/Operon and net10.0-tied framework packages stay frozen.

- Pin System.Security.Cryptography.Xml 10.0.6 and NuGet.Protocol
  6.11.2 in a managed transitive-vuln ItemGroup
- Refresh blazor npm lockfiles (picomatch advisory + name fields)
- gitignore scripts/reports/ (transient timestamped run output)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PTKu PTKu merged commit 446317c into dev May 30, 2026
2 checks passed
@PTKu PTKu deleted the feat-add-source-st-file-path-to-twins branch May 30, 2026 14:52
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.

1 participant