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

Bump F# packages for the .NET 9 release #229

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
36 changes: 18 additions & 18 deletions AspNetCore.Demo.Net6/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@
},
"FSharp.Compiler.Service": {
"type": "Transitive",
"resolved": "43.8.300",
"contentHash": "CoPjQYXXwmYkkHm+yxBHSW9IJVLpvwkKGEzXa5A6ebf8v6GfYaxZc5G+VHojDr586oezp1elFemu+A1WWH095A==",
"resolved": "43.9.101",
"contentHash": "Mb7g68UXRLBmeDdrDRpPfjN/HWxTWr9WwqL9lt2PaRPflo8Qg5uxn479Hk4wYCv9dfNEpUy21KZOfCGsNXterw==",
"dependencies": {
"FSharp.Core": "[8.0.300]",
"FSharp.Core": "[9.0.101]",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these lock files need to be updated after a477958, too?

"System.Buffers": "4.5.1",
"System.Collections.Immutable": "7.0.0",
"System.Diagnostics.DiagnosticSource": "7.0.2",
"System.Collections.Immutable": "8.0.0",
"System.Diagnostics.DiagnosticSource": "8.0.0",
"System.Memory": "4.5.5",
"System.Reflection.Emit": "4.7.0",
"System.Reflection.Metadata": "7.0.0",
"System.Reflection.Metadata": "8.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"FSharp.Core": {
"type": "Transitive",
"resolved": "8.0.300",
"contentHash": "Jv44fV7TNglyMku89lQcA4Q6mFKLyHb2bs1Yb72nvSVc+cHplEnoZ4XQUaaTLJGUTx/iMqcrkYGtaLzkkIhpaA=="
"resolved": "9.0.101",
"contentHash": "3/YR1SDWFA+Ojx9HiBwND+0UR8ZWoeZfkhD0DWAPCDdr/YI+CyFkArmMGzGSyPXeYtjG0sy0emzfyNwjt7zhig=="
},
"Humanizer.Core": {
"type": "Transitive",
Expand Down Expand Up @@ -575,8 +575,8 @@
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.2",
"contentHash": "hYr3I9N9811e0Bjf2WNwAGGyTuAFbbTgX1RPLt/3Wbm68x3IGcX5Cl75CMmgT6WlNwLQ2tCCWfqYPpypjaf2xA==",
"resolved": "8.0.0",
"contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
Expand Down Expand Up @@ -893,10 +893,10 @@
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "MclTG61lsD9sYdpNz9xsKBzjsmsfCtcMZYXz/IUr2zlhaTaABonlr1ESeompTgM+Xk+IwtGYU7/voh3YWB/fWw==",
"resolved": "8.0.0",
"contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==",
"dependencies": {
"System.Collections.Immutable": "7.0.0"
"System.Collections.Immutable": "8.0.0"
}
},
"System.Reflection.Primitives": {
Expand Down Expand Up @@ -1307,7 +1307,7 @@
"MirrorSharp.AspNetCore": {
"type": "Project",
"dependencies": {
"MirrorSharp.Common": "[3.0.9, )"
"MirrorSharp.Common": "[3.0.10, )"
}
},
"MirrorSharp.AspNetCore.Demo.Library": {
Expand All @@ -1328,17 +1328,17 @@
"MirrorSharp.FSharp": {
"type": "Project",
"dependencies": {
"FSharp.Compiler.Service": "[43.8.300, )",
"FSharp.Core": "[8.0.300, )",
"FSharp.Compiler.Service": "[43.9.101, )",
"FSharp.Core": "[9.0.101, )",
"Microsoft.Build.Utilities.Core": "[17.12.6, )",
"Microsoft.IO.RecyclableMemoryStream": "[2.2.0, )",
"MirrorSharp.Common": "[3.0.9, )"
"MirrorSharp.Common": "[3.0.10, )"
}
},
"MirrorSharp.IL": {
"type": "Project",
"dependencies": {
"MirrorSharp.Common": "[3.0.9, )",
"MirrorSharp.Common": "[3.0.10, )",
"Mobius.ILasm": "[0.1.0, )",
"System.Drawing.Common": "[9.0.0, )"
}
Expand Down
36 changes: 18 additions & 18 deletions AspNetCore.Demo/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
".NETCoreApp,Version=v3.1": {
"FSharp.Compiler.Service": {
"type": "Transitive",
"resolved": "43.8.300",
"contentHash": "CoPjQYXXwmYkkHm+yxBHSW9IJVLpvwkKGEzXa5A6ebf8v6GfYaxZc5G+VHojDr586oezp1elFemu+A1WWH095A==",
"resolved": "43.9.101",
"contentHash": "Mb7g68UXRLBmeDdrDRpPfjN/HWxTWr9WwqL9lt2PaRPflo8Qg5uxn479Hk4wYCv9dfNEpUy21KZOfCGsNXterw==",
"dependencies": {
"FSharp.Core": "[8.0.300]",
"FSharp.Core": "[9.0.101]",
"System.Buffers": "4.5.1",
"System.Collections.Immutable": "7.0.0",
"System.Diagnostics.DiagnosticSource": "7.0.2",
"System.Collections.Immutable": "8.0.0",
"System.Diagnostics.DiagnosticSource": "8.0.0",
"System.Memory": "4.5.5",
"System.Reflection.Emit": "4.7.0",
"System.Reflection.Metadata": "7.0.0",
"System.Reflection.Metadata": "8.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"FSharp.Core": {
"type": "Transitive",
"resolved": "8.0.300",
"contentHash": "Jv44fV7TNglyMku89lQcA4Q6mFKLyHb2bs1Yb72nvSVc+cHplEnoZ4XQUaaTLJGUTx/iMqcrkYGtaLzkkIhpaA=="
"resolved": "9.0.101",
"contentHash": "3/YR1SDWFA+Ojx9HiBwND+0UR8ZWoeZfkhD0DWAPCDdr/YI+CyFkArmMGzGSyPXeYtjG0sy0emzfyNwjt7zhig=="
},
"Microsoft.Build.Framework": {
"type": "Transitive",
Expand Down Expand Up @@ -519,8 +519,8 @@
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.2",
"contentHash": "hYr3I9N9811e0Bjf2WNwAGGyTuAFbbTgX1RPLt/3Wbm68x3IGcX5Cl75CMmgT6WlNwLQ2tCCWfqYPpypjaf2xA==",
"resolved": "8.0.0",
"contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
Expand Down Expand Up @@ -819,10 +819,10 @@
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "MclTG61lsD9sYdpNz9xsKBzjsmsfCtcMZYXz/IUr2zlhaTaABonlr1ESeompTgM+Xk+IwtGYU7/voh3YWB/fWw==",
"resolved": "8.0.0",
"contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==",
"dependencies": {
"System.Collections.Immutable": "7.0.0",
"System.Collections.Immutable": "8.0.0",
"System.Memory": "4.5.5"
}
},
Expand Down Expand Up @@ -1228,7 +1228,7 @@
"MirrorSharp.AspNetCore": {
"type": "Project",
"dependencies": {
"MirrorSharp.Common": "[3.0.9, )"
"MirrorSharp.Common": "[3.0.10, )"
}
},
"MirrorSharp.AspNetCore.Demo.Library": {
Expand All @@ -1249,17 +1249,17 @@
"MirrorSharp.FSharp": {
"type": "Project",
"dependencies": {
"FSharp.Compiler.Service": "[43.8.300, )",
"FSharp.Core": "[8.0.300, )",
"FSharp.Compiler.Service": "[43.9.101, )",
"FSharp.Core": "[9.0.101, )",
"Microsoft.Build.Utilities.Core": "[17.12.6, )",
"Microsoft.IO.RecyclableMemoryStream": "[2.2.0, )",
"MirrorSharp.Common": "[3.0.9, )"
"MirrorSharp.Common": "[3.0.10, )"
}
},
"MirrorSharp.IL": {
"type": "Project",
"dependencies": {
"MirrorSharp.Common": "[3.0.9, )",
"MirrorSharp.Common": "[3.0.10, )",
"Mobius.ILasm": "[0.1.0, )",
"System.Drawing.Common": "[9.0.0, )"
}
Expand Down
2 changes: 1 addition & 1 deletion FSharp/Advanced/IFSharpSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface IFSharpSession {
/// <param name="assemblyStream">Stream to compile the assembly to.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> that can be used to cancel the call.</param>
/// <returns>A tuple returned from the F# compilation call.</returns>
ValueTask<Tuple<FSharpDiagnostic[], int>> CompileAsync(MemoryStream assemblyStream, CancellationToken cancellationToken);
ValueTask<Tuple<FSharpDiagnostic[], System.Exception?>> CompileAsync(MemoryStream assemblyStream, CancellationToken cancellationToken);

/// <summary>Converts <see cref="FSharpDiagnostic" /> to a <see cref="Diagnostic" />.</summary>
/// <param name="diagnostic"><see cref="FSharpDiagnostic" /> value to convert.</param>
Expand Down
4 changes: 2 additions & 2 deletions FSharp/FSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.12.6" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.0" />
<PackageReference Include="FSharp.Compiler.Service" Version="43.8.300" />
<PackageReference Include="FSharp.Core" Version="8.0.300" />
<PackageReference Include="FSharp.Compiler.Service" Version="43.9.201" />
<PackageReference Include="FSharp.Core" Version="9.0.201" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions FSharp/Internal/CustomFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private CustomFileSystem() {
AssemblyLoader = new CustomAssemblyLoader();
}

public Stream OpenFileForReadShim(string filePath, FSharpOption<bool> useMemoryMappedFile, FSharpOption<bool> shouldShadowCopy) {
public Stream OpenFileForReadShim(string filePath, FSharpOption<bool>? useMemoryMappedFile, FSharpOption<bool>? shouldShadowCopy) {
if (GetVirtualFile(filePath) is { } virtualFile)
return virtualFile.GetStreamWrapper().Reuse();

Expand All @@ -39,8 +39,8 @@ public Stream OpenFileForReadShim(string filePath, FSharpOption<bool> useMemoryM
return new MemoryStream(_fileBytesCache.GetOrAdd(filePath, f => File.ReadAllBytes(f)));
}

public Stream OpenFileForWriteShim(string filePath, FSharpOption<FileMode> fileMode, FSharpOption<FileAccess> fileAccess, FSharpOption<FileShare> fileShare) {
if (GetVirtualFile(filePath) is {} virtualFile)
public Stream OpenFileForWriteShim(string filePath, FSharpOption<FileMode>? fileMode, FSharpOption<FileAccess>? fileAccess, FSharpOption<FileShare>? fileShare) {
if (GetVirtualFile(filePath) is { } virtualFile)
return virtualFile.GetStreamWrapper().Reuse();

throw new NotSupportedException();
Expand Down Expand Up @@ -75,7 +75,7 @@ public string GetDirectoryNameShim(string path) {
}

public DateTime GetLastWriteTimeShim(string fileName) {
if (GetVirtualFile(fileName) is {} virtualFile)
if (GetVirtualFile(fileName) is { } virtualFile)
return virtualFile.LastWriteTime;

EnsureIsAssemblyFile(fileName);
Expand All @@ -86,7 +86,7 @@ public DateTime GetLastWriteTimeShim(string fileName) {
}

public DateTime GetCreationTimeShim(string path) {
if (GetVirtualFile(path) is {} virtualFile)
if (GetVirtualFile(path) is { } virtualFile)
return DateTime.MinValue;

EnsureIsAssemblyFile(path);
Expand Down
17 changes: 9 additions & 8 deletions FSharp/Internal/FSharpSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RecyclableMemoryStreamManager memoryStreamManager
_memoryStreamManager = memoryStreamManager;

Checker = FSharpChecker.Create(
null,
projectCacheSize: null,
keepAssemblyContents: true,
keepAllBackgroundResolutions: true,
legacyReferenceResolver: null,
Expand All @@ -68,24 +68,24 @@ RecyclableMemoryStreamManager memoryStreamManager
parallelReferenceResolution: false,
captureIdentifiersWhenParsing: false,
documentSource: FSharpOption<DocumentSource>.Some(DocumentSource.FileSystem),
useSyntaxTreeCache: false,
useTransparentCompiler: false
useTransparentCompiler: false,
transparentCompilerCacheSizes: null
);
// Checker.ImplicitlyStartBackgroundWork = false;
AssemblyReferencePaths = options.AssemblyReferencePaths;
AssemblyReferencePathsAsFSharpList = ToFSharpList(options.AssemblyReferencePaths);
_projectOptions = new FSharpProjectOptions(
"_",
projectId: null,
projectId: FSharpOption<string>.None,
sourceFiles: new[] { _sourceFile.Path },
otherOptions: ConvertToOtherOptionsSlow(options),
referencedProjects: Array.Empty<FSharpReferencedProject>(),
isIncompleteTypeCheckEnvironment: true,
useScriptResolutionRules: false,
loadTime: DateTime.Now,
unresolvedReferences: null,
unresolvedReferences: FSharpOption<FSharpUnresolvedReferencesSet>.None,
originalLoadReferences: FSharpList<Tuple<range, string, string>>.Empty,
stamp: null
stamp: FSharpOption<long>.None
);
}

Expand Down Expand Up @@ -186,7 +186,7 @@ public async ValueTask<FSharpParseAndCheckResults> ParseAndCheckAsync(Cancellati
return _lastParseAndCheck?.CheckAnswer;
}

public async ValueTask<Tuple<FSharpDiagnostic[], int>> CompileAsync(MemoryStream assemblyStream, CancellationToken cancellationToken) {
public async ValueTask<Tuple<FSharpDiagnostic[], Exception?>> CompileAsync(MemoryStream assemblyStream, CancellationToken cancellationToken) {
Argument.NotNull(nameof(assemblyStream), assemblyStream);
if (_outputStream != null)
throw new InvalidOperationException("Attempted to call CompileAsync when output stream was already set.");
Expand All @@ -195,8 +195,9 @@ public async ValueTask<Tuple<FSharpDiagnostic[], int>> CompileAsync(MemoryStream
try {
_outputStream = assemblyStream;
var compiledAsync = Checker.Compile(args, userOpName: null);
return await FSharpAsync.StartAsTask(compiledAsync, null, cancellationToken)
var result = await FSharpAsync.StartAsTask(compiledAsync, null, cancellationToken)
.ConfigureAwait(false);
return Tuple.Create(result.Item1, result.Item2 is null ? null : result.Item2.Value);
}
finally {
_outputStream = null;
Expand Down
2 changes: 1 addition & 1 deletion FSharp/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MirrorSharp.FSharp.Advanced.IFSharpSession.CompileAsync(System.IO.MemoryStream! assemblyStream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Tuple<FSharp.Compiler.Diagnostics.FSharpDiagnostic![]!, int>!>
MirrorSharp.FSharp.Advanced.IFSharpSession.CompileAsync(System.IO.MemoryStream! assemblyStream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Tuple<FSharp.Compiler.Diagnostics.FSharpDiagnostic![]!, System.Exception?>!>
Loading
Loading