From d3e2a01c44c4f3335a9c936c732ddb34dbf89465 Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Thu, 30 Nov 2023 14:09:52 -0800 Subject: [PATCH 1/2] make empty pk array mean unsigned --- src/Compiler/AbstractIL/ilread.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Compiler/AbstractIL/ilread.fs b/src/Compiler/AbstractIL/ilread.fs index 2e28354e95c..78082e34ca7 100644 --- a/src/Compiler/AbstractIL/ilread.fs +++ b/src/Compiler/AbstractIL/ilread.fs @@ -1946,7 +1946,12 @@ and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx = Name = name AuxModuleHashAlgorithm = hash SecurityDeclsStored = ctxt.securityDeclsReader_Assembly - PublicKey = pubkey + PublicKey = + // The runtime and C# treat a 0 length publicKey as an unsigned assembly, so if a public record exists with a length of 0 + // treat it as unsigned + match pubkey with + | Some pkBytes when pkBytes.Length > 0 -> pubkey + | _ -> None Version = Some(ILVersionInfo(v1, v2, v3, v4)) Locale = readStringHeapOption ctxt localeIdx CustomAttrsStored = ctxt.customAttrsReader_Assembly From 0c1a216e79b42e5ecc28aedaaf37190b75ad75db Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Thu, 30 Nov 2023 14:23:17 -0800 Subject: [PATCH 2/2] Ughh! release notes --- docs/release-notes/FSharp.Compiler.Service/8.0.200.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/FSharp.Compiler.Service/8.0.200.md b/docs/release-notes/FSharp.Compiler.Service/8.0.200.md index 33e81141302..c0d199a7864 100644 --- a/docs/release-notes/FSharp.Compiler.Service/8.0.200.md +++ b/docs/release-notes/FSharp.Compiler.Service/8.0.200.md @@ -1 +1,2 @@ -- Miscellaneous fixes to parens analysis - https://github.com/dotnet/fsharp/pull/16262 \ No newline at end of file +- Miscellaneous fixes to parens analysis - https://github.com/dotnet/fsharp/pull/16262 +- Fixes #16359 - correctly handle imports with 0 length public key tokens - https://github.com/dotnet/fsharp/pull/16363 \ No newline at end of file