Permalink
Browse files

updates for .NET Standard TPRTC and .NET Core TPDTC loading

  • Loading branch information...
dsyme committed Feb 27, 2018
1 parent 6367ebe commit d8edf49f873c3b54cdd3a2b0e22479d28933349f
Showing with 439 additions and 3,002 deletions.
  1. +0 −72 .paket/paket.targets
  2. +7 −16 CONTRIBUTING.md
  3. +0 −48 FSharp.Data.netcore.sln
  4. +2 −14 FSharp.Data.sln
  5. +4 −3 README.md
  6. +4 −0 RELEASE_NOTES.md
  7. +0 −1 appveyor.yml
  8. +3 −43 build.fsx
  9. +1 −1 docs/content/ja/contributing.md
  10. +1 −1 docs/content/ja/library/CsvProvider.fsx
  11. +1 −1 docs/content/library/CsvProvider.fsx
  12. +28 −0 netfx.props
  13. +0 −8 nuget/FSharp.Data.nuspec
  14. +21 −23 paket.dependencies
  15. +70 −1,089 paket.lock
  16. +0 −17 src/AssemblyInfo.Portable259.fs
  17. +0 −17 src/AssemblyInfo.Portable7.fs
  18. +1 −1 src/CommonProviderImplementation/AssemblyResolver.fs
  19. +1 −1 src/CommonProviderImplementation/ConversionsGenerator.fs
  20. +4 −4 src/CommonProviderImplementation/Helpers.fs
  21. +3 −3 src/CommonProviderImplementation/QuotationBuilder.fs
  22. +2 −2 src/Csv/CsvGenerator.fs
  23. +2 −2 src/Csv/CsvProvider.fs
  24. +0 −32 src/DefineConstants.targets
  25. +0 −196 src/FSharp.Data.DesignTime.fsproj
  26. +0 −1 src/FSharp.Data.DesignTime.fsproj.paket.references
  27. +0 −87 src/FSharp.Data.DesignTime.netcore.fsproj
  28. +0 −2 src/FSharp.Data.DesignTime.netcore.fsproj.paket.references
  29. +69 −0 src/FSharp.Data.DesignTime/FSharp.Data.DesignTime.fsproj
  30. +0 −159 src/FSharp.Data.Portable259.fsproj
  31. +0 −159 src/FSharp.Data.Portable7.fsproj
  32. +0 −164 src/FSharp.Data.fsproj
  33. +0 −1 src/FSharp.Data.fsproj.paket.references
  34. +0 −61 src/FSharp.Data.netcore.fsproj
  35. +0 −3 src/FSharp.Data.netcore.fsproj.paket.references
  36. +63 −0 src/FSharp.Data/FSharp.Data.fsproj
  37. +2 −2 src/Html/HtmlGenerator.fs
  38. +1 −1 src/Html/HtmlProvider.fs
  39. +1 −1 src/Json/JsonConversionsGenerator.fs
  40. +1 −1 src/Json/JsonExtensions.fs
  41. +1 −1 src/Json/JsonGenerator.fs
  42. +1 −1 src/Json/JsonProvider.fs
  43. +2 −0 src/Net/Http.fs
  44. +1 −3 src/Runtime.fs
  45. +3 −4 src/Test.fsx
  46. +3 −4 src/TypeProviderInstantiation.fs
  47. +2 −2 src/WorldBank/WorldBankProvider.fs
  48. +1 −1 src/Xml/XmlGenerator.fs
  49. +1 −1 src/Xml/XmlProvider.fs
  50. +1 −2 src/paket.references
  51. +3 −1 tests/FSharp.Data.DesignTime.Tests/DocumentationTests.fs
  52. +23 −279 tests/FSharp.Data.DesignTime.Tests/FSharp.Data.DesignTime.Tests.fsproj
  53. +6 −0 tests/FSharp.Data.DesignTime.Tests/Program.fs
  54. +3 −7 tests/FSharp.Data.DesignTime.Tests/SignatureTests.fs
  55. +14 −6 tests/FSharp.Data.DesignTime.Tests/app.config
  56. +0 −6 tests/FSharp.Data.DesignTime.Tests/paket.references
  57. +13 −165 tests/FSharp.Data.Tests.CSharp/FSharp.Data.Tests.CSharp.csproj
  58. +0 −2 tests/FSharp.Data.Tests.CSharp/paket.references
  59. +5 −5 tests/FSharp.Data.Tests/CsvProvider.fs
  60. +22 −253 tests/FSharp.Data.Tests/FSharp.Data.Tests.fsproj
  61. +0 −6 tests/FSharp.Data.Tests/FSharp.Data.Tests.paket.fsproj.references
  62. +1 −1 tests/FSharp.Data.Tests/HtmlProvider.fs
  63. +3 −1 tests/FSharp.Data.Tests/HttpIntegrationTests.fs
  64. +2 −2 tests/FSharp.Data.Tests/JsonProvider.fs
  65. +4 −4 tests/FSharp.Data.Tests/JsonValue.fs
  66. +2 −0 tests/FSharp.Data.Tests/MockServer.fs
  67. +6 −0 tests/FSharp.Data.Tests/Program.fs
  68. +7 −7 tests/FSharp.Data.Tests/UriUtils.fs
  69. +17 −1 tests/FSharp.Data.Tests/app.config

This file was deleted.

Oops, something went wrong.
@@ -43,22 +43,13 @@ platform. Type providers consist of two components:
CSV provider, this component does the type inference and generates types
(that are mapped to runtime components by the compiler).
To support multiple targets, we need a _runtime component_ for every single target
(.NET Framework 4.0, PCL profile 7, PCL profile 259). However, we only need one _design time_
component, because that is always going to be executed on desktop .NET in Visual Studio
or Xamarin Studio.
So, there are 3 versions of _runtime_ components and 1 version of _design time_
components. At the moment, this is done by having separate project file for each
component, but they share the same files - the project just defines some symbols that
are then used to include/exclude parts that are not available on certain platforms
using `#if`.
If you open `FSharp.Data.sln`, you'll see the following projects for _runtime components_:
* **FSharp.Data** - .NET Framework 4.0
* **FSharp.Data.Portable7** - PCL profile 7 (.NET Framework 4.5, Windows 8)
* **FSharp.Data.Portable259** - PCL profile 259 (.NET Framework 4.5, Windows 8, Windows Phone 8.1, Windows Phone Silverlight 8)
To support multiple targets, we need a _runtime component_ for both .NET Framework 4.5 (net45) and
.NET Standard 2.0 (netstandard2.0). We also need a _design time_
component for each, to be able to to host the type provider in .NET Core-based tooling.
The _runtime_ components are in the following project:
* **FSharp.Data**
The _design time_ components are in the following project:

This file was deleted.

Oops, something went wrong.
@@ -13,17 +13,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\SetupTesting.fsx = src\SetupTesting.fsx
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data", "src\FSharp.Data.fsproj", "{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data", "src\FSharp.Data\FSharp.Data.fsproj", "{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.DesignTime", "src\FSharp.Data.DesignTime.fsproj", "{B85F245B-3FB9-4253-8251-16F98F05B6EC}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.DesignTime", "src\FSharp.Data.DesignTime\FSharp.Data.DesignTime.fsproj", "{B85F245B-3FB9-4253-8251-16F98F05B6EC}"
ProjectSection(ProjectDependencies) = postProject
{6EBFDE55-9687-40A9-8C1A-6E204ECB117F} = {6EBFDE55-9687-40A9-8C1A-6E204ECB117F}
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.Portable259", "src\FSharp.Data.Portable259.fsproj", "{37D0B998-66DF-42E4-942B-52FEE0C7A3ED}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.Portable7", "src\FSharp.Data.Portable7.fsproj", "{40512F73-8187-4361-A42C-E8C96F3F4592}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -38,14 +34,6 @@ Global
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Release|Any CPU.Build.0 = Release|Any CPU
{37D0B998-66DF-42E4-942B-52FEE0C7A3ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37D0B998-66DF-42E4-942B-52FEE0C7A3ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37D0B998-66DF-42E4-942B-52FEE0C7A3ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37D0B998-66DF-42E4-942B-52FEE0C7A3ED}.Release|Any CPU.Build.0 = Release|Any CPU
{40512F73-8187-4361-A42C-E8C96F3F4592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40512F73-8187-4361-A42C-E8C96F3F4592}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40512F73-8187-4361-A42C-E8C96F3F4592}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40512F73-8187-4361-A42C-E8C96F3F4592}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -22,12 +22,13 @@ You can see the version history [here](RELEASE_NOTES.md).
- FSharp.Core 4.3.1.0 (F# 3.1)
- FSharp.Core 4.4.0.0 (F# 4.0)
- FSharp.Core 4.4.1.0 (F# 4.1)
- FSharp.Core 4.4.3.0 (F# 4.1 update)
## Supported platforms
- .NET Framework 4.5
- PCL profile 7 (.NET Framework 4.5, Windows 8)
- PCL profile 259 (.NET Framework 4.5, Windows 8, Windows Phone 8.1, Windows Phone Silverlight 8)
- .NET Framework 4.x
- .NET Core App 2.x
- .NET Standard 2.0
## Documentation
@@ -1,3 +1,7 @@
#### 3.0.0-beta - February 27 2018
* Drop SourceLink support
* Drop PCL Profile 259, 7, 78 support in favour of netstandard2.0
#### 2.4.5 - February 19 2018
* Add an optional parameter for the `System.Text.Encoding` to use when reading data to the CSV, HTML, and Json providers. This parameter is called `encoding` and should be present on all Load and AsyncLoad methods.
* Fix handling of multipart form data payloads whose size exceeded ~80k bytes.
@@ -4,7 +4,6 @@ build_script:
- cmd: build.cmd CleanInternetCaches
- cmd: build.cmd AppVeyorBuildVersion
- cmd: build.cmd All
- cmd: build.cmd SourceLink
- cmd: build.cmd NuGet
test: off
artifacts:
@@ -2,16 +2,9 @@
// FAKE build script
// --------------------------------------------------------------------------------------
#I "packages/FAKE/tools/"
open Fake
open Fake
#I "packages/buildtools/FAKE/tools/"
#r "FakeLib.dll"
#if MONO
#else
#load "packages/SourceLink.Fake/tools/SourceLink.fsx"
#endif
open System
open System.IO
open Fake
@@ -69,13 +62,8 @@ Target "AssemblyInfo" <| fun () ->
let replace (oldValue:string) newValue (str:string) = str.Replace(oldValue, newValue)
let title =
Path.GetFileNameWithoutExtension file
|> replace ".Portable259" ""
|> replace ".Portable7" ""
|> replace "AssemblyInfo" "FSharp.Data"
let versionSuffix =
if file.Contains ".Portable259" then ".259"
elif file.Contains ".Portable7" then ".7"
else ".0"
let versionSuffix =".0"
let version = release.AssemblyVersion + versionSuffix
CreateFSharpAssemblyInfo file
[ Attribute.Title title
@@ -113,6 +101,7 @@ Target "EnsureNetCoreSdk" <| fun () ->
sdkPath <- Some (DotNetCli.InstallDotNetSDK dotnetSdkVersion)
Target "Build" <| fun () ->
!! "FSharp.Data.sln"
|> MSBuildRelease "" "Rebuild"
|> ignore
@@ -156,31 +145,6 @@ let runTestTask name =
["FSharp.Data.Tests";"FSharp.Data.DesignTime.Tests"]
|> List.iter runTestTask
// --------------------------------------------------------------------------------------
// Source link the pdb files
#if MONO
Target "SourceLink" <| id
#else
open SourceLink
Target "SourceLink" <| fun () ->
for file in !! "src/*.fsproj" do
let proj = VsProj.Load file ["Configuration","Release"; "VisualStudioVersion","12.0"]
let files = SetBaseDir __SOURCE_DIRECTORY__ proj.Compiles -- "**/paket-files/**"
let url = sprintf "%s/%s/{0}/%%var2%%" gitRaw gitName
SourceLink.Index files proj.OutputFilePdb __SOURCE_DIRECTORY__ url
CopyFiles "bin" (!! "src/bin/Release/FSharp.Data.*")
CopyFiles "bin/portable7" (!! "src/bin/portable7/Release/FSharp.Data.*")
CopyFiles "bin/portable7" (!! "src/bin/Release/FSharp.Data.DesignTime.*")
CopyFiles "bin/portable259" (!! "src/bin/portable259/Release/FSharp.Data.*")
CopyFiles "bin/portable259" (!! "src/bin/Release/FSharp.Data.DesignTime.*")
#endif
// --------------------------------------------------------------------------------------
// Build a NuGet package
@@ -290,10 +254,6 @@ Target "Help" <| fun () ->
printfn ""
printfn " Other targets:"
printfn " * CleanInternetCaches"
#if MONO
#else
printfn " * SourceLink (requires autocrlf=input)"
#endif
printfn ""
Target "All" DoNothing
@@ -203,7 +203,7 @@ Assembly replacerの動作の詳細については
[hide]
open System
open System.Reflection
open Microsoft.FSharp.Quotations
open FSharp.Quotations
標準的な型プロバイダはいずれも生成時に `AssemblyReplacer` のインスタンスを
取得して、それをコードジェネレータに渡し、適切なコードが
@@ -153,7 +153,7 @@ let small = CsvProvider<"../../data/SmallTest.csv">.GetSample()
以下の単純な計算をみてください:
*)
open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames
open FSharp.Data.UnitSystems.SI.UnitNames
for row in small.Rows do
let speed = row.Distance / row.Time
@@ -145,7 +145,7 @@ The generated properties `Distance` and `Time` are now annotated with units. Loo
following simple calculation:
*)
open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames
open FSharp.Data.UnitSystems.SI.UnitNames
for row in small.Rows do
let speed = row.Distance / row.Time
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>
@@ -19,12 +19,6 @@
<group>
<dependency id="FSharp.Core" version="4.0.0.1"/>
</group>
<group targetFramework="portable-net45+netcore45">
<dependency id="Zlib.Portable" version="1.11.0" />
</group>
<group targetFramework="portable-net45+netcore45+wpa81+wp8">
<dependency id="Zlib.Portable" version="1.11.0" />
</group>
<group targetFramework="net40" />
<group targetFramework="netstandard2.0">
<dependency id="FSharp.Core" version="4.2.3" />
@@ -39,8 +33,6 @@
</metadata>
<files>
<file src="..\bin\Release\net45\*" target="lib/net45" />
<file src="..\bin\Release\portable7\*" target="lib/portable-net45+netcore45" />
<file src="..\bin\Release\portable259\*" target="lib/portable-net45+netcore45+wpa81+wp8" />
<file src="..\bin\Release\netstandard2.0\*" target="lib/netstandard2.0" />
<file src="linqpad-samples\*.*" target="linqpad-samples" />
</files>
Oops, something went wrong.

0 comments on commit d8edf49

Please sign in to comment.