Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env"
]
}
38 changes: 22 additions & 16 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"version": 1,
"isRoot": true,
"tools": {
"fake-cli": {
"version": "5.20.4",
"commands": [
"fake"
]
},
"paket": {
"version": "6.2.1",
"commands": [
"paket"
]
},
"version": 1,
"isRoot": true,
"tools": {
"fake-cli": {
"version": "5.20.4",
"commands": [
"fake"
]
},
"paket": {
"version": "6.2.1",
"commands": [
"paket"
]
},
"fable": {
"version": "3.4.9",
"commands": [
Expand All @@ -23,7 +23,13 @@
"fantomas-tool": {
"version": "4.5.4",
"commands": [
"fantomas"
"fantomas"
]
},
"femto": {
"version": "0.9.0",
"commands": [
"femto"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ FakesAssemblies/
_Pvt_Extensions

# Paket dependency manager
.paket
paket-files/

# FAKE - F# Make
Expand All @@ -395,4 +396,6 @@ paket-files/
.ionide/

# Fable
fable_modules
.fable
*.fs.js
557 changes: 0 additions & 557 deletions .paket/Paket.Restore.targets

This file was deleted.

75 changes: 75 additions & 0 deletions FsToolkit.ErrorHandling.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9F888E39
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FunctionMap", "tools\FunctionMap\FunctionMap.fsproj", "{600EA6E9-C9F2-4F02-99EF-1F992711DB1C}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsToolkit.ErrorHandling.AsyncSeq", "src\FsToolkit.ErrorHandling.AsyncSeq\FsToolkit.ErrorHandling.AsyncSeq.fsproj", "{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsToolkit.ErrorHandling.AsyncSeq.Tests", "tests\FsToolkit.ErrorHandling.AsyncSeq.Tests\FsToolkit.ErrorHandling.AsyncSeq.Tests.fsproj", "{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsToolkit.ErrorHandling.Fable.Tests", "tests\FsToolkit.ErrorHandling.Fable.Tests\FsToolkit.ErrorHandling.Fable.Tests.fsproj", "{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsToolkit.ErrorHandling.Tests.Runner", "tests\FsToolkit.ErrorHandling.Tests.Runner\FsToolkit.ErrorHandling.Tests.Runner.fsproj", "{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsToolkit.ErrorHandling.AsyncSeq.Tests.Runner", "tests\FsToolkit.ErrorHandling.AsyncSeq.Tests.Runner\FsToolkit.ErrorHandling.AsyncSeq.Tests.Runner.fsproj", "{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -120,6 +130,66 @@ Global
{600EA6E9-C9F2-4F02-99EF-1F992711DB1C}.Release|x64.Build.0 = Release|Any CPU
{600EA6E9-C9F2-4F02-99EF-1F992711DB1C}.Release|x86.ActiveCfg = Release|Any CPU
{600EA6E9-C9F2-4F02-99EF-1F992711DB1C}.Release|x86.Build.0 = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|x64.ActiveCfg = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|x64.Build.0 = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|x86.ActiveCfg = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Debug|x86.Build.0 = Debug|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|Any CPU.Build.0 = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|x64.ActiveCfg = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|x64.Build.0 = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|x86.ActiveCfg = Release|Any CPU
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571}.Release|x86.Build.0 = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|x64.ActiveCfg = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|x64.Build.0 = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|x86.ActiveCfg = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Debug|x86.Build.0 = Debug|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|Any CPU.Build.0 = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|x64.ActiveCfg = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|x64.Build.0 = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|x86.ActiveCfg = Release|Any CPU
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA}.Release|x86.Build.0 = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|x64.ActiveCfg = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|x64.Build.0 = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|x86.ActiveCfg = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Debug|x86.Build.0 = Debug|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|Any CPU.Build.0 = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|x64.ActiveCfg = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|x64.Build.0 = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|x86.ActiveCfg = Release|Any CPU
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E}.Release|x86.Build.0 = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|x64.ActiveCfg = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|x64.Build.0 = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|x86.ActiveCfg = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Debug|x86.Build.0 = Debug|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|Any CPU.Build.0 = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|x64.ActiveCfg = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|x64.Build.0 = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|x86.ActiveCfg = Release|Any CPU
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30}.Release|x86.Build.0 = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|x64.ActiveCfg = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|x64.Build.0 = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|x86.ActiveCfg = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Debug|x86.Build.0 = Debug|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|Any CPU.Build.0 = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|x64.ActiveCfg = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|x64.Build.0 = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|x86.ActiveCfg = Release|Any CPU
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E0466000-F8E4-416B-B605-C65F7602367A} = {E28025A7-EF6A-45BF-8FA0-75E394D3D42B}
Expand All @@ -129,5 +199,10 @@ Global
{5B1EA296-538E-40E5-BF1D-6CB0F20BB52E} = {E28025A7-EF6A-45BF-8FA0-75E394D3D42B}
{7DABAB8F-4A02-4992-A3A2-6C550F98C13B} = {D8B86171-2147-49EF-8ADA-1CF8B0A20D40}
{600EA6E9-C9F2-4F02-99EF-1F992711DB1C} = {9F888E39-5D40-4E29-9529-67C466722431}
{02DF2AE6-A7D4-4C38-AA4D-651BDD1D3571} = {E28025A7-EF6A-45BF-8FA0-75E394D3D42B}
{5DED3CA8-B331-4B48-A6A2-2EE1410437CA} = {D8B86171-2147-49EF-8ADA-1CF8B0A20D40}
{629C5ADC-6C4D-454C-88EE-CC067FB21D5E} = {D8B86171-2147-49EF-8ADA-1CF8B0A20D40}
{B70E0B97-0CDD-481B-8F77-E1B0A486EB30} = {D8B86171-2147-49EF-8ADA-1CF8B0A20D40}
{3DC38BAA-68F3-4493-B6F7-4A1C8C101897} = {D8B86171-2147-49EF-8ADA-1CF8B0A20D40}
EndGlobalSection
EndGlobal
37 changes: 31 additions & 6 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ let runTestAssembly setParams testAssembly =
if String.isNotNullOrEmpty args.WorkingDirectory
then args.WorkingDirectory else Fake.IO.Path.getDirectory testAssembly
(fun (info: ProcStartInfo) ->
{ info with
{ info with
FileName = "dotnet"
Arguments = sprintf "%s %s" testAssembly (string args)
WorkingDirectory = workingDir } )

let execWithExitCode testAssembly argsString timeout =
let execWithExitCode testAssembly argsString timeout =
Process.execSimple (fakeStartInfo testAssembly argsString) timeout

execWithExitCode testAssembly (setParams Expecto.Params.DefaultParams) TimeSpan.MaxValue
Expand All @@ -161,23 +161,47 @@ let runTests setParams testAssemblies =
| [] -> ()
| failedAssemblies ->
failedAssemblies
|> List.map (fun (testAssembly,exitCode) ->
|> List.map (fun (testAssembly,exitCode) ->
sprintf "Expecto test of assembly '%s' failed. Process finished with exit code %d." testAssembly exitCode )
|> String.concat System.Environment.NewLine
|> Fake.Testing.Common.FailedTestsException |> raise
__.MarkSuccess()

let testAssemblies = "tests/**/bin" </> configuration </> "**" </> "*Tests.dll"
let testProjects = [
"tests/FsToolkit.ErrorHandling.Tests.Runner"
"tests/FsToolkit.ErrorHandling.AsyncSeq.Tests.Runner"
"tests/FsToolkit.ErrorHandling.JobResult.Tests"
"tests/FsToolkit.ErrorHandling.TaskResult.Tests"
"tests/FsToolkit.ErrorHandling.Fable.Tests"
]

let testAssemblies = [
for proj in testProjects do
let projName = proj.Split('/') |> Array.last
let pattern = proj </> "bin" </> configuration </> "**" </> (projName + ".dll")

yield! (!!pattern)
]

Target.create "RunTests" (fun _ ->
runTests id (!! testAssemblies)
runTests id testAssemblies
)

let runFableTests _ =
Npm.test id

Target.create "RunFableTests" runFableTests

Target.create "FemtoValidate" (fun _ ->
let result =
CreateProcess.fromRawCommand "dotnet" [ "femto"; "./tests/FsToolkit.ErrorHandling.Fable.Tests"; "--validate" ]
|> Proc.run

if result.ExitCode <> 0
then
Fake.Testing.Common.FailedTestsException "Femto failed; perhaps you need to update the package.json?" |> raise
)

let release = ReleaseNotes.load "RELEASE_NOTES.md"

Target.create "AssemblyInfo" (fun _ ->
Expand Down Expand Up @@ -228,7 +252,7 @@ Target.create "PublishNuget" (fun _ ->
ToolType = ToolType.CreateLocalTool()
PublishUrl = "https://www.nuget.org"
WorkingDir = distDir
ApiKey =
ApiKey =
match nugetToken with
| Some s -> s
| _ -> p.ApiKey // assume paket-config was set properly
Expand Down Expand Up @@ -279,6 +303,7 @@ Target.create "UpdateDocs" (fun _ ->
==> "NpmRestore"
==> "CheckFormatCode"
==> "Build"
==> "FemtoValidate"
==> "RunTests"
==> "RunFableTests"
==> "NuGet"
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ set -o pipefail
echo "Restoring dotnet tools..."
dotnet tool restore

FAKE_DETAILED_ERRORS=true PAKET_SKIP_RESTORE_TARGETS=true dotnet fake build -t "$@"
FAKE_DETAILED_ERRORS=true dotnet fake build -t "$@"
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "5.0.402"
"version": "5.0.402",
"rollForward": "minor"
}
}
Loading