Minor code cleanups - #1800
Minor code cleanups#1800Thorium wants to merge 2 commits into
Conversation
|
/repo-assist Fix the CI |
|
✗ Repo Assist encountered failed, see workflow run. Warning Firewall blocked 4 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.nuget.org"
- "api.worldbank.org"
- "dc.services.visualstudio.com"
- "raw.githubusercontent.com"See Network Configuration for more information.
|
|
🤖 This is an automated response from Repo Assist. I looked into the CI failure. All three failing jobs ( Root cause: Fix: Running --- a/src/FSharp.Data.DesignTime/CommonProviderImplementation/Helpers.fs
+++ b/src/FSharp.Data.DesignTime/CommonProviderImplementation/Helpers.fs
@@ -257,7 +257,10 @@ module internal ProviderHelpers =
match Uri.TryCreate(str, UriKind.RelativeOrAbsolute) with
| false, _ -> None
| true, uri ->
- if String.IsNullOrWhiteSpace str || not uri.IsAbsoluteUri && Seq.exists invalidChars.Contains str then
+ if
+ String.IsNullOrWhiteSpace str
+ || not uri.IsAbsoluteUri && Seq.exists invalidChars.Contains str
+ then
None
else
Some uriI wasn't able to push this directly since the PR branch lives on your fork ( Warning Firewall blocked 4 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.nuget.org"
- "api.worldbank.org"
- "dc.services.visualstudio.com"
- "raw.githubusercontent.com"See Network Configuration for more information.
Add this agentic workflow to your repoTo install this agentic workflow, run |
|
@Thorium Please fix up when you get a chance, thanks |
|
I did already. |
Minor code cleanups.
Copilot generated text-wall:
This pull request introduces several improvements and bug fixes across the codebase, with a focus on more robust type inference, performance and correctness in HTML parsing, and better error handling. The most important changes are summarized below:
HTML Parsing Improvements:
descendantsByfunction inHtmlOperations.fsto use an explicit stack for traversing nodes, improving performance and avoiding stack overflows for deeply nested HTML. The traversal is now pre-order and processes children in document order.hasNamefunction to use a case-insensitive comparison (StringComparison.OrdinalIgnoreCase) for matching node names, ensuring more robust HTML parsing regardless of case.General Robustness and Error Handling:
Helpers.fsby usingString.IsNullOrWhiteSpaceinstead of a manual check, making URI validation more robust and readable.JsonSchema.fsfor invalid reference paths, providing more informative feedback when a reference path does not lead through a record.Type Inference Enhancements:
inferenceModeparameter to theInferColumnTypesmethod inCsvInference.fs, allowing more control over how types are inferred from CSV data.