Add ExceptionIfMissing static parameter to JsonProvider and XmlProvider#1688
Draft
Add ExceptionIfMissing static parameter to JsonProvider and XmlProvider#1688
ExceptionIfMissing static parameter to JsonProvider and XmlProvider#1688Conversation
Copilot
AI
changed the title
[WIP] Debug workflow failure for Repo Assist
Add Mar 4, 2026
ExceptionIfMissing static parameter to JsonProvider and XmlProvider
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.
The Repo Assist workflow attempted to implement
ExceptionIfMissingforJsonProviderandXmlProviderbut the patch failed to apply due to a concurrent merge. This implements those changes directly.Changes
New static parameter:
ExceptionIfMissingJsonProviderandXmlProvider(defaults tofalsefor backward compatibility)true, accessing a non-optional field absent from the data raises an exception instead of silently returning""(string) orNaN(float)Runtime
JsonRuntime.GetNonOptionalValueStrict— throws on missing JSON fieldsTextRuntime.GetNonOptionalValueStrict— throws on missing XML/CSV fieldsDesign-time codegen
JsonGenerationContextandXmlGenerationContextcarryExceptionIfMissingConversionsGenerator.convertStringValueandJsonConversionsGenerator.convertJsonValueselect betweenGetNonOptionalValueandGetNonOptionalValueStrictbased on the flagTypeProviderInstantiationupdated with the new fieldUsage
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:
api.worldbank.org/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet /usr/share/dotnet/sdk/8.0.124/FSharp/fsc.dll @/tmp/MSBuildTempJsopSi/tmpb4da9a1a93714c6b98f1703eb9a3321c.rsp(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet /usr/share/dotnet/sdk/8.0.124/FSharp/fsc.dll @/tmp/MSBuildTempWprtaM/tmp19c92066e48a48139df9357346bd807e.rsp(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet /usr/share/dotnet/sdk/8.0.124/FSharp/fsc.dll @/tmp/MSBuildTempEbPPTk/tmpf7fd0ae7d5014b19aea670fbb04318b7.rsp(dns block)schemas.microsoft.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 46539 --endpoint 127.0.0.1:046539 --role client --parentprocessid 9173 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 44603 --endpoint 127.0.0.1:044603 --role client --parentprocessid 9319 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 44795 --endpoint 127.0.0.1:044795 --role client --parentprocessid 9460 --telemetryoptedin false(dns block)tomasp.net/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 46539 --endpoint 127.0.0.1:046539 --role client --parentprocessid 9173 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 44603 --endpoint 127.0.0.1:044603 --role client --parentprocessid 9319 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/FSharp.Data.DesignTime.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.DesignTime.Tests/bin/Debug/net8.0/testhost.dll --port 44795 --endpoint 127.0.0.1:044795 --role client --parentprocessid 9460 --telemetryoptedin false(dns block)www.google.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/FSharp.Data.Core.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/FSharp.Data.Core.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/testhost.dll --port 46425 --endpoint 127.0.0.1:046425 --role client --parentprocessid 10145 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/FSharp.Data.Core.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/FSharp.Data.Core.Tests.deps.json /home/REDACTED/work/FSharp.Data/FSharp.Data/tests/FSharp.Data.Core.Tests/bin/Debug/net8.0/testhost.dll --port 35223 --endpoint 127.0.0.1:035223 --role client --parentprocessid 10307 --telemetryoptedin false(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.