Skip to content

Commit

Permalink
speriment
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom committed Dec 16, 2022
1 parent 25f3252 commit c1d6dc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Compiler/Interactive/fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ type internal FsiDynamicCompiler(

let mutable fragmentId = 0

static let mutable dynamicAssemblyId = 0
static let mutable dynamicAssemblyId = 0us

let mutable prevIt : ValRef option = None

Expand Down Expand Up @@ -1399,7 +1399,7 @@ type internal FsiDynamicCompiler(
let EmitInMemoryAssembly (tcConfig: TcConfig, emEnv: ILMultiInMemoryAssemblyEmitEnv, ilxMainModule: ILModuleDef) =

// The name of the assembly is "FSI-ASSEMBLY" for all submissions. This number is used for the Version
dynamicAssemblyId <- dynamicAssemblyId + 1
dynamicAssemblyId <- dynamicAssemblyId + 1us

let multiAssemblyName = ilxMainModule.ManifestOfAssembly.Name

Expand All @@ -1413,7 +1413,9 @@ type internal FsiDynamicCompiler(
]
{ manifest with
Name = multiAssemblyName
Version = Some (parseILVersion $"0.0.0.{dynamicAssemblyId}")

// The Assembly Version descends with each subsequent submission due to coreclr loader mechanics
Version = Some (parseILVersion $"0.0.0.{UInt16.MaxValue - dynamicAssemblyId}")
CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs attrs)
}

Expand Down

0 comments on commit c1d6dc6

Please sign in to comment.