diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e0d934c53..b59d24043 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +### 6.0.1-beta002 - Jan 6 2023 + +* Change the namespace of the `InferenceMode` enum from `FSharp.Data.Runtime.StructuralInference` to `FSharp.Data`. + ### 6.0.1-beta001 - Aug 18 2022 * There are now multiple packages diff --git a/src/CommonRuntime/StructuralInference.fs b/src/CommonRuntime/StructuralInference.fs index e2f2c3904..b0ccd4332 100644 --- a/src/CommonRuntime/StructuralInference.fs +++ b/src/CommonRuntime/StructuralInference.fs @@ -12,21 +12,6 @@ open FSharp.Data.Runtime open FSharp.Data.Runtime.StructuralTypes open System.Text.RegularExpressions -/// This is the public inference mode enum with backward compatibility. -type InferenceMode = - /// Used as a default value for backward compatibility with the legacy InferTypesFromValues boolean static parameter. - /// The actual behaviour will depend on whether InferTypesFromValues is set to true (default) or false. - | BackwardCompatible = 0 - /// Type everything as strings - /// (or the most basic type possible for the value when it's not string, e.g. for json numbers or booleans). - | NoInference = 1 - /// Infer types from values only. Inline schemas are disabled. - | ValuesOnly = 2 - /// Inline schemas types have the same weight as value infered types. - | ValuesAndInlineSchemasHints = 3 - /// Inline schemas types override value infered types. (Value infered types are ignored if an inline schema is present) - | ValuesAndInlineSchemasOverrides = 4 - /// This is the internal DU representing all the valid cases we support, mapped from the public InferenceMode. [] type InferenceMode' = diff --git a/src/FSharp.Data.Http/FSharp.Data.Http.fsproj b/src/FSharp.Data.Http/FSharp.Data.Http.fsproj index b1a9c2bf1..fcbc2d9b8 100644 --- a/src/FSharp.Data.Http/FSharp.Data.Http.fsproj +++ b/src/FSharp.Data.Http/FSharp.Data.Http.fsproj @@ -11,6 +11,7 @@ true + diff --git a/src/FSharp.Data.Http/PublicApi.fs b/src/FSharp.Data.Http/PublicApi.fs new file mode 100644 index 000000000..32cc6065c --- /dev/null +++ b/src/FSharp.Data.Http/PublicApi.fs @@ -0,0 +1,17 @@ +namespace FSharp.Data + +/// This is the public inference mode enum used when initializing a type provider, +/// with backward compatibility. +type InferenceMode = + /// Used as a default value for backward compatibility with the legacy InferTypesFromValues boolean static parameter. + /// The actual behaviour will depend on whether InferTypesFromValues is set to true (default) or false. + | BackwardCompatible = 0 + /// Type everything as strings + /// (or the most basic type possible for the value when it's not string, e.g. for json numbers or booleans). + | NoInference = 1 + /// Infer types from values only. Inline schemas are disabled. + | ValuesOnly = 2 + /// Inline schemas types have the same weight as value infered types. + | ValuesAndInlineSchemasHints = 3 + /// Inline schemas types override value infered types. (Value infered types are ignored if an inline schema is present) + | ValuesAndInlineSchemasOverrides = 4 diff --git a/src/Xml/XmlProvider.fs b/src/Xml/XmlProvider.fs index 54e06884d..31c1ec152 100644 --- a/src/Xml/XmlProvider.fs +++ b/src/Xml/XmlProvider.fs @@ -7,6 +7,7 @@ open FSharp.Core.CompilerServices open ProviderImplementation open ProviderImplementation.ProvidedTypes open ProviderImplementation.ProviderHelpers +open FSharp.Data open FSharp.Data.Runtime open FSharp.Data.Runtime.BaseTypes open FSharp.Data.Runtime.StructuralTypes diff --git a/tests/FSharp.Data.DesignTime.Tests/TypeProviderInstantiation.fs b/tests/FSharp.Data.DesignTime.Tests/TypeProviderInstantiation.fs index b632fe664..b7790fbdb 100644 --- a/tests/FSharp.Data.DesignTime.Tests/TypeProviderInstantiation.fs +++ b/tests/FSharp.Data.DesignTime.Tests/TypeProviderInstantiation.fs @@ -5,6 +5,7 @@ open System.IO open ProviderImplementation open ProviderImplementation.ProvidedTypes open ProviderImplementation.ProvidedTypesTesting +open FSharp.Data open FSharp.Data.Runtime open FSharp.Data.Runtime.StructuralInference