Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] JsonProvider.fsx Windows CI testing, don't merge. #1505

Closed
wants to merge 8 commits into from

Conversation

Thorium
Copy link
Member

@Thorium Thorium commented Mar 13, 2024

A temporary branch trying to identify which part of the file fails the CI.

@cartermp
Copy link
Collaborator

Windows CI seems to have been cursed here from time to time 🙃

@Thorium
Copy link
Member Author

Thorium commented Mar 13, 2024

Conclusion:
fsdocs-tool fails for this part of file (lines around 221-244):

(**
In the previous example, `Code` is inferred as a `float`,
even though it looks more like it should be a `string`.
(`4E5` is interpreted as an exponential float notation instead of a string)

Now let's enable inline schemas:
*)

open FSharp.Data.Runtime.StructuralInference

type AmbiguousEntity2 =
    JsonProvider<Sample="""
        { "code":"typeof<string>", "length":"typeof<float<metre>>" }
        { "code":"123", "length":"42" }
        { "code":"4E5", "length":"1.83" }
        """, SampleIsList=true, InferenceMode=InferenceMode.ValuesAndInlineSchemasOverrides>

let code2 = (AmbiguousEntity2.GetSamples()[1]).Code
let length2 = (AmbiguousEntity2.GetSamples()[1]).Length

(*** include-fsi-merged-output ***)

@Thorium Thorium closed this Mar 13, 2024
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