Skip to content

Commit 7f38792

Browse files
committed
Add comments explaining FSharp.Core versioning
1 parent f6ff7ab commit 7f38792

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

src/FSharp.Control.TaskSeq.SmokeTests/FSharp.Control.TaskSeq.SmokeTests.fsproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<!-- our smoketests use the highest RTM (non-alpha) FSharp.Core, contrary to the base test project, which uses the lowest possible denominator -->
20-
<PackageReference Update="FSharp.Core" Version="7.0.401" />
19+
<!--
20+
IMPORTANT: Our smoketests use the highest RTM (non-alpha) FSharp.Core, contrary
21+
to the main test project, which uses the lowest possible denominator (6.0.1)
22+
By NOT including the reference, the F# compiler will automatically choose the
23+
highest version available.
24+
This ensures that, if we have a forwards compat issue, we will get an error.
25+
-->
2126
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
2227
<PackageReference Include="FsToolkit.ErrorHandling.TaskResult" Version="4.10.0" />
2328
<PackageReference Include="FsUnit.xUnit" Version="6.0.0" />

src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@
6060
</ItemGroup>
6161

6262
<ItemGroup>
63-
<!-- align test project with minimal required version for TaskSeq, which is 6.0.1 at the moment -->
63+
<!--
64+
Align test project with minimal required version for TaskSeq, which is 6.0.1 at the moment.
65+
This updates the default reference (which is the highest stable version) to be the oldest,
66+
still compatible version of the TaskSeq library.
67+
-->
6468
<PackageReference Update="FSharp.Core" Version="6.0.1" />
6569
<PackageReference Include="FsUnit.xUnit" Version="6.0.0" />
6670
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />

src/FSharp.Control.TaskSeq/FSharp.Control.TaskSeq.fsproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,15 @@ Generates optimized IL code through resumable state machines, and comes with a c
5757
</ItemGroup>
5858

5959
<ItemGroup>
60-
<!-- maximal compatibility with minimal required FSharp.Core version for TaskSeq -->
61-
<PackageReference Update="FSharp.Core" Version="6.0.1" />
60+
<!--
61+
Maximum compatibility with minimally required FSharp.Core version for TaskSeq
62+
IMPORTANT: Leave this in! F# automatically adds an FSharp.Core reference if absent
63+
but it chooses the highest stable version by default (8.0+). This way, we
64+
stick to being most compatible.
65+
-->
66+
<PackageReference Update="FSharp.Core" Version="6.0.1">
67+
<!-- if using "remove unused references", this prevents FSharp.Core from being shown in that list -->
68+
<TreatAsUsed>true</TreatAsUsed>
69+
</PackageReference>
6270
</ItemGroup>
6371
</Project>

0 commit comments

Comments
 (0)