Fix missing FactoryBuilder.Commit() in dictionary-based complex type loading paths#3630
Merged
marcschier merged 2 commits intoMar 19, 2026
Merged
Conversation
|
|
…eSystem Co-authored-by: marcschier <[email protected]>
Copilot
AI
changed the title
[WIP] Fix broken immutable EncodeableFactory implementation
Fix missing FactoryBuilder.Commit() in dictionary-based complex type loading paths
Mar 19, 2026
marcschier
approved these changes
Mar 19, 2026
marcschier
marked this pull request as ready for review
March 19, 2026 17:35
romanett
approved these changes
Mar 19, 2026
marcschier
deleted the
copilot/fix-broken-encodeablefactory-implementation
branch
March 19, 2026 20:10
13 tasks
mrsuciu
pushed a commit
to mrsuciu/UA-.NETStandard
that referenced
this pull request
Mar 20, 2026
…loading paths (OPCFoundation#3630) * Fix missing Commit() after LoadDictionaryDataTypesAsync in ComplexTypeSystem Co-authored-by: marcschier <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: marcschier <[email protected]> (cherry picked from commit 4c78751)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
FactoryBuilder.Commit()was never called whenLoadDictionaryDataTypesAsyncwas the active loading path inLoadAsyncandLoadNamespaceAsync. Both methods returned the dictionary load result directly, bypassing the commit. Any complex types registered during dictionary loading were silently dropped from the immutableEncodeableFactory, breaking all reads of those types.Affected methods in
ComplexTypeSystem.cs:LoadAsync— triggered whenDisableDataTypeDefinitionis set orLoadBaseDataTypesAsyncreturnsfalseLoadNamespaceAsync— same conditionFix: Replace the early return with a local
allTypesLoadedvariable, always callCommit(), then return the stored result — matching the pattern already used correctly inLoadTypeAsync:Related Issues
Types of changes
Checklist
Further comments
The regression was introduced in #3241 which added the immutable
EncodeableFactorybuilder pattern. TheLoadTypeAsyncmethod had the correct structure (commit outside the conditional), butLoadAsyncandLoadNamespaceAsyncwere not updated consistently.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
http://api.nuget.org:443/DigiCertTrustedG4TimeStampingRSA4096SHA2562025CA1.crl/usr/bin/dotnet dotnet restore UA.slnx(http block)http://api.nuget.org:443/DigiCertTrustedRootG4.crl/usr/bin/dotnet dotnet restore UA.slnx(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.