Skip to content

Commit 97e2e8b

Browse files
committed
multi-target, fixup direct project references to other projects, and conditionally-compile away ta call with a new API in .NET 9
1 parent d5b4e21 commit 97e2e8b

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

benchmarks/benchmarks.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFrameworks>net8.0</TargetFrameworks>
6-
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net9.0</TargetFrameworks>
6+
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
77
</PropertyGroup>
88
<ItemGroup>
99
<Compile Include="SourceTextBenchmarks.fs" />

src/FsAutoComplete.Core/AdaptiveExtensions.fs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,12 @@ and AdaptiveCancellableTask<'a>(cancel: unit -> unit, real: Task<'a>) =
413413
real
414414
else
415415
cachedTcs <- new TaskCompletionSource<'a>()
416+
#if NET8_0
417+
cachedTcs.TrySetFromTask real
418+
#if NET9_0_OR_GREATER
416419
cachedTcs.TrySetFromTask real |> ignore<bool>
420+
#endif
421+
#endif
417422
cachedTcs.Task
418423

419424
cached <-

src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net8.0</TargetFrameworks>
4-
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net9.0</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<NoWarn>$(NoWarn);FS0057</NoWarn> <!-- Allows using experimental FCS APIs -->
77
</PropertyGroup>
88
<ItemGroup>
99
<ProjectReference Include="..\FsAutoComplete.Logging\FsAutoComplete.Logging.fsproj" />
1010
<TrimmerRootAssembly Include="FsAutoComplete.Core" />
1111
</ItemGroup>
12-
<ItemGroup>
13-
<!-- Set of projects to compile against locally -->
14-
<ProjectReference Include="..\..\..\proj-info\src\Ionide.ProjInfo.ProjectSystem\Ionide.ProjInfo.ProjectSystem.fsproj" />
15-
<ProjectReference Include="..\..\..\FSharp.Analyzers.SDK\src\FSharp.Analyzers.SDK\FSharp.Analyzers.SDK.fsproj" />
16-
17-
</ItemGroup>
1812
<ItemGroup>
1913
<Compile Include="SemaphoreSlimLocks.fsi" />
2014
<Compile Include="SemaphoreSlimLocks.fs" />

src/FsAutoComplete/FsAutoComplete.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFrameworks>net8.0</TargetFrameworks>
6-
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net9.0</TargetFrameworks>
6+
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
77
<AssemblyName>fsautocomplete</AssemblyName>
88
<ServerGarbageCollection>true</ServerGarbageCollection>
99
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>

test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFrameworks>net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net9.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(BuildNet9)' == 'true'">net8.0;net9.0</TargetFrameworks>
66
<GenerateProgramFile>false</GenerateProgramFile>
77
<RollForward>LatestMajor</RollForward>
88
<IsTestProject>true</IsTestProject>

0 commit comments

Comments
 (0)