diff --git a/.travis.yml b/.travis.yml index 4f368273..ced21c05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,13 @@ matrix: - mono: latest env: USE_MSBUILD=1 os: linux - - mono: weekly - env: USE_MSBUILD=1 - os: linux sudo: true # use the new container-based Travis infrastructure script: - ./build.sh Pack + +allow_failures: + - mono: weekly + env: USE_MSBUILD=1 + os: linux diff --git a/README.md b/README.md index 314e7e96..868c025f 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,37 @@ See examples the [`examples`](examples) directory. * ComboProvider: the TPDTC and TPRTC are combined together in one assembly which is a single `netstandard2.0` component * BasicProvider: the TPDTC and TPRTC are each available as both `netstandard2.0` and `.NET 4.x` components + +## Type Provider Naming Conventions + +A type provider is simultaneously a tool and a library. The existing guidance is as follows, from https://fsharp.github.io/2014/09/19/fsharp-libraries.html. + +> Likewise, a type provider for a data source or schema format XYZ should normally be placed in “FSharp.Data”, e.g. “FSharp.Data.XYZ”. + +Good type provider naming examples: + +* `FSharp.Text.RegexProvider` + +* `FSharp.Azure.StorageTypeProvider` + +Existing type providers that don't quite follow the guidelines but which are ok: + +* `FSharp.Data` + +Here are some examples of existing type providers that aren't too bad (they are clear) but could be renamed to follow the guidelines: + +* `ExcelProvider` (better would be `FSharp.Interop.ExcelProvider`) + +* `RProvider` (better would be `FSharp.Interop.RProvider`) + +* `ApiaryProvider` (better would be `FSharp.Data.ApiaryProvider`) + +* `SQLProvider` (better would be `FSharp.Data.SQLProvider`) + +* `DynamicsNAVProvider` (better would be `FSharp.Interop.DynamicsNAVProvider`) + +* `DynamicsCRMProvider` (better would be `FSharp.Interop.DynamicsCRMProvider`) + ## Technical Notes ### Using Type Providers with ``dotnet build`` diff --git a/build.fsx b/build.fsx index c8cc6014..8d7c2530 100644 --- a/build.fsx +++ b/build.fsx @@ -33,7 +33,7 @@ let release = |> ReleaseNotesHelper.parseReleaseNotes let useMsBuildToolchain = environVar "USE_MSBUILD" <> null -let dotnetSdkVersion = "2.1.201" +let dotnetSdkVersion = "2.1.401" let sdkPath = lazy DotNetCli.InstallDotNetSDK dotnetSdkVersion let getSdkPath() = sdkPath.Value diff --git a/fsc.props b/fsc.props index 35e51f16..b4a5890b 100644 --- a/fsc.props +++ b/fsc.props @@ -10,6 +10,18 @@ C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0 fsc.exe + + C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp + fsc.exe + + + C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp + fsc.exe + + + C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp + fsc.exe + C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0 fsc.exe diff --git a/paket.dependencies b/paket.dependencies index 5e1cd0a0..7ed6a560 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -16,3 +16,10 @@ group fs40 source https://api.nuget.org/v3/index.json nuget FSharp.Core ~> 4.0.0 +group fs41 + source https://api.nuget.org/v3/index.json + nuget FSharp.Core ~> 4.1.18 + +group fs45 + source https://api.nuget.org/v3/index.json + nuget FSharp.Core ~> 4.5.2 diff --git a/src/FSharp.TypeProviders.SDK.fsproj b/src/FSharp.TypeProviders.SDK.fsproj index 3fe04d00..f930770a 100644 --- a/src/FSharp.TypeProviders.SDK.fsproj +++ b/src/FSharp.TypeProviders.SDK.fsproj @@ -5,6 +5,7 @@ Library true false + true diff --git a/src/ProvidedTypes.fs b/src/ProvidedTypes.fs index 27e2dc48..49bb4d16 100644 --- a/src/ProvidedTypes.fs +++ b/src/ProvidedTypes.fs @@ -154,6 +154,8 @@ namespace ProviderImplementation.ProvidedTypes type Attributes<'T when 'T :> Attribute>() = static let empty = ([| |] : 'T []) |> box |> unbox static member Empty() = empty + + type Attributes = static member CreateEmpty (typ : Type) = let gtype = typedefof>.MakeGenericType([| typ |]) let gmethod = gtype.GetMethod("Empty", BindingFlags.Static ||| BindingFlags.NonPublic ) diff --git a/src/ProvidedTypesTesting.fs b/src/ProvidedTypesTesting.fs index 37e3b080..5fada7c0 100644 --- a/src/ProvidedTypesTesting.fs +++ b/src/ProvidedTypesTesting.fs @@ -709,6 +709,7 @@ module internal Targets = | "3.1" -> "fs31" | "4.0" -> "fs40" | "4.1" -> "fs41" + | "4.5" -> "fs45" | _ -> failwith ("unimplemented F# version" + fsharp) let compatProfiles = match profile with