Skip to content

Commit 06a1ba3

Browse files
authored
Merge pull request #177 from njlr/housekeeping/upgrade-net8
housekeeping/upgrade-net8
2 parents 4210e65 + f1fd8d3 commit 06a1ba3

File tree

11 files changed

+126
-65
lines changed

11 files changed

+126
-65
lines changed

.config/dotnet-tools.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
"version": "11.4.3",
77
"commands": [
88
"fsdocs"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"fable": {
12-
"version": "3.4.2",
13+
"version": "4.25.0",
1314
"commands": [
1415
"fable"
15-
]
16+
],
17+
"rollForward": false
1618
}
1719
}
1820
}

.github/workflows/publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88
steps:
99
- uses: actions/checkout@v2
1010
- name: Setup .NET
11-
uses: actions/setup-dotnet@v1
11+
uses: actions/setup-dotnet@v4.3.1
1212
with:
13-
dotnet-version: '5.0.202'
13+
dotnet-version: '8.0.x'
1414
- name: Install tools
1515
run: dotnet tool restore
16-
- name: Build and Test
16+
- name: Build and Test
1717
run: dotnet test -c Release
1818
- name: Pack
1919
run: dotnet pack -c Release
20-
- name: Build docs
20+
- name: Build docs
2121
run: dotnet fsdocs build --properties Configuration=Release
2222
- name: Deploy
2323
uses: peaceiris/actions-gh-pages@v3
@@ -30,5 +30,4 @@ jobs:
3030
run: dotnet nuget push src/FSharp.Control.AsyncSeq/bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_TOKEN_2021 }} --skip-duplicate
3131

3232
# NUGET_ORG_TOKEN_2021 is listed in "Repository secrets" in https://github.com/fsprojects/FSharp.Control.AsyncSeq/settings/secrets/actions
33-
# note, the nuget org token expires around 24 July 2022
34-
33+
# note, the nuget org token expires around 24 July 2022

.github/workflows/pull-request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Setup .NET
13-
uses: actions/setup-dotnet@v1
12+
- name: Setup .NET
13+
uses: actions/setup-dotnet@v4.3.1
1414
with:
15-
dotnet-version: '5.0.202'
15+
dotnet-version: '8.0.x'
1616
- name: Setup Node.js environment
1717
uses: actions/setup-node@v2.4.0
1818
with:
19-
node-version: 14.17.*
19+
node-version: 14.17.*
2020
- name: Install tools
2121
run: dotnet tool restore
22-
- name: Build and Test
22+
- name: Build and Test
2323
run: dotnet test -c Release
2424
- name: Test Fable
25-
run: cd tests/fable && npm i && npm test && cd ../..
25+
run: (cd tests/fable && npm i && npm test)

flake.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
description = "FSharp.Control.AsyncSeq";
3+
4+
# Flake inputs
5+
inputs = {
6+
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405.*.tar.gz";
7+
};
8+
9+
# Flake outputs
10+
outputs = { self, nixpkgs }:
11+
let
12+
# Systems supported
13+
allSystems = [
14+
"x86_64-linux"
15+
"aarch64-linux"
16+
"x86_64-darwin"
17+
"aarch64-darwin"
18+
];
19+
20+
# Helper to provide system-specific attributes
21+
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
22+
pkgs = import nixpkgs { inherit system; };
23+
});
24+
in
25+
{
26+
# Development environment output
27+
devShells = forAllSystems ({ pkgs }: {
28+
default =
29+
30+
pkgs.mkShell {
31+
packages = [
32+
# pkgs.bashInteractive
33+
pkgs.dotnetCorePackages.sdk_8_0
34+
];
35+
};
36+
});
37+
};
38+
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "5.0.202",
3+
"version": "8.0.19",
44
"rollForward": "minor"
55
}
66
}

tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqPerf.fsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#r @"../../bin/FSharp.Control.AsyncSeq.dll"
1+
#r @"../../src/FSharp.Control.AsyncSeq/bin/Release/netstandard2.1/FSharp.Control.AsyncSeq.dll"
22
#nowarn "40"
33
#time "on"
44

@@ -107,7 +107,7 @@ let bindUnfold =
107107

108108

109109

110-
let collect n =
110+
let collect n =
111111
AsyncSeq.replicate n ()
112112
|> AsyncSeq.collect (fun () -> AsyncSeq.singleton ())
113113
|> AsyncSeq.iter ignore
@@ -122,7 +122,7 @@ let collect n =
122122

123123
let Y = Choice1Of2
124124
let S = Choice2Of2
125-
125+
126126
let timeMs = 500
127127

128128
let inp0 = [ ]
@@ -138,19 +138,18 @@ let toSeq (xs:Choice<int, int> list) = asyncSeq {
138138
for x in xs do
139139
match x with
140140
| Choice1Of2 v -> yield v
141-
| Choice2Of2 s -> do! Async.Sleep s }
141+
| Choice2Of2 s -> do! Async.Sleep s }
142142

143143
for (inp,exp) in [ (inp0,exp0) ; (inp1,exp1) ] do
144144

145-
let actual =
145+
let actual =
146146
toSeq inp
147147
|> AsyncSeq.bufferByTime (timeMs - 5)
148148
|> AsyncSeq.map List.ofArray
149149
|> AsyncSeq.toListSynchronously
150-
150+
151151
printfn "actual=%A expected=%A" actual exp
152152

153153
//let ls = toSeq inp |> AsyncSeq.toListSynchronously
154154
//let actualLs = actual |> List.concat
155155

156-

tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#if INTERACTIVE
2-
#load @"../../.paket/load/netcoreapp3.1/Test/NUnit.fsx"
2+
#r "nuget: NUnit, 3.9.0"
33
#time "on"
44
#else
55

@@ -10,7 +10,6 @@ open NUnit.Framework
1010
open FSharp.Control
1111
open System
1212
open System.Threading
13-
open System.Threading.Tasks
1413

1514
type AsyncOps = AsyncOps with
1615
static member unit : Async<unit> = async { return () }

tests/FSharp.Control.AsyncSeq.Tests/FSharp.Control.AsyncSeq.Tests.fsproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
23
<PropertyGroup>
3-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFrameworks>net8.0</TargetFrameworks>
45
<IsPackable>false</IsPackable>
56
</PropertyGroup>
67
<ItemGroup>
@@ -13,4 +14,4 @@
1314
<PackageReference Include="NUnit" Version="3.9.0" />
1415
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
1516
</ItemGroup>
16-
</Project>
17+
</Project>

0 commit comments

Comments
 (0)