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] add .NET Core support #212

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ release.cmd
docs/tools/FSharp.Formatting.svclog
docs/tools/XmlWriter

project.lock.json
21 changes: 20 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
init:
- git config --global core.autocrlf input

install:
# Download install script to install .NET cli in .dotnet dir
- ps: $env:CLI_VERSION = "1.0.0-beta-002071"
- ps: mkdir -Force ".\scripts\obtain\" | Out-Null
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1" -OutFile ".\scripts\obtain\install.ps1"
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
- ps: '& .\scripts\obtain\install.ps1 -Channel "preview" -version "$env:CLI_VERSION" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
# add dotnet to PATH
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
# dotnet info
- ps: dotnet --info

build_script:
- cmd: ./build.cmd CI
# build and create package
- ps: dotnet restore
- ps: cd src\FsCheck
- ps: dotnet pack --configuration Release

test: off
version: '{build}'
artifacts:
- path: bin\*.nupkg
- path: bin\*.nupkg
- path: src\FsCheck\bin\Release\*.nupkg
10 changes: 10 additions & 0 deletions src/FsCheck.Dotnetcli.Tests/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="fsharp-daily" value="https://www.myget.org/F/fsharp-daily/api/v3/index.json" />
</packageSources>
</configuration>
16 changes: 16 additions & 0 deletions src/FsCheck.Dotnetcli.Tests/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Learn more about F# at http://fsharp.org

open System

open FsCheck

[<EntryPoint>]
let main argv =
printfn "Hello World!"
printfn "%A" argv

let revRevIsOrig (xs:list<int>) = List.rev(List.rev xs) = xs

Check.Quick revRevIsOrig

0 // return an integer exit code
30 changes: 30 additions & 0 deletions src/FsCheck.Dotnetcli.Tests/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"compilerName": "fsc",
"compileFiles": [
"Program.fs"
],
"frameworks": {
"netstandard1.5" : {
"dependencies": {
"FsCheck": { "version": "1.0.0", "type": "build" },
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-23925"
}
},
"imports": [
"portable-net45+win8",
"dnxcore50"
]
},
"net46" : {
"dependencies": {
"FsCheck": { "version": "1.0.0", "type": "build" }
}
}
}
}
2 changes: 1 addition & 1 deletion src/FsCheck/Arbitrary.fs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ module Arb =
|> convert (fun x -> x :> IDictionary<_,_>) (fun x -> x :?> Dictionary<_,_>)

static member Culture() =
#if PCL
#if PCL || NETSTANDARD1_5
let cultureNames = [
"af"; "af-ZA";
"am"; "am-ET";
Expand Down
10 changes: 10 additions & 0 deletions src/FsCheck/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="fsharp-daily" value="https://www.myget.org/F/fsharp-daily/api/v3/index.json" />
</packageSources>
</configuration>
47 changes: 47 additions & 0 deletions src/FsCheck/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "1.0.0-*",
"compilationOptions": {
},
"compilerName": "fsc",
"compileFiles": [
"AssemblyInfo.fs",
"Common.fs",
"Random.fs",
"Reflect.fs",
"TypeClass.fs",
"Gen.fs",
"ReflectArbitrary.fs",
"Arbitrary.fs",
"ArbitraryExtensions.fs",
"GenExtensions.fs",
"Testable.fs",
"Prop.fs",
"PropExtensions.fs",
"Commands.fs",
"StateMachine.fs",
"Runner.fs",
"RunnerExtensions.fs"
],
"frameworks": {
"net46": {
"dependencies": {
"FSharp.Core": "4.0.0.1"
},
"frameworkAssemblies": {
"System": "",
"System.Core": "",
"System.Numerics": ""
}
},
"netstandard1.5": {
"dependencies": {
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
"NETStandard.Library": "1.5.0-rc2-23925"
},
"imports": [
"portable-net45+win8",
"dnxcore50"
]
}
}
}