Skip to content

Commit d5850c8

Browse files
Cleaning comments/variable names
1 parent b3c5c9a commit d5850c8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/fasmi/Compilation.fs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ open System
33
open FileSystem
44
open FSharp.Compiler.CodeAnalysis
55

6-
// the Assembly attribute to build output as net5.0
6+
// the Assembly attribute to build output as net5.0/net6.0
77

88
let netAttr =
99
#if NET6_0
@@ -22,10 +22,10 @@ do ()
2222

2323
#endif
2424

25-
let netAttrName = "Net50AssemblyAttr.fs"
25+
let netAttrName = "NetAssemblyAttr.fs"
2626

27-
// check the net5.0 assembly attribute file exists or create it
28-
let ensureNet5Attr asmPath =
27+
// check the net5.0/net6.0 assembly attribute file exists or create it
28+
let ensureNetAttr asmPath =
2929
let filePath = dir asmPath </> netAttrName
3030
if not (IO.File.Exists filePath) then
3131
IO.File.WriteAllText(filePath, netAttr)
@@ -36,22 +36,20 @@ let ensureNet5Attr asmPath =
3636
let compile (path: string) (asmPath: string) =
3737
let checker = FSharpChecker.Create(keepAssemblyContents = true)
3838

39-
// fin net5.0 assembly path
40-
let net50Path =
39+
// find .net assembly path
40+
let netPath =
4141
let runtimeDir = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
4242
#if NET6_0
4343

4444
let packDir =
4545
IO.Directory.GetDirectories(runtimeDir </> "../../../packs/Microsoft.NETCore.App.Ref/", "6.0.*")
4646
|> Seq.max
4747
IO.Path.GetFullPath(packDir </> "ref/net6.0")
48-
49-
//IO.Path.GetFullPath(runtimeDir </> "../../../packs/Microsoft.NETCore.App.Ref/6.0.0/ref/net6.0/")
5048
#else
5149
IO.Path.GetFullPath(runtimeDir </> "../../../packs/Microsoft.NETCore.App.Ref/5.0.0/ref/net5.0/")
5250
#endif
5351

54-
let attrfile = ensureNet5Attr asmPath
52+
let attrfile = ensureNetAttr asmPath
5553

5654
let diag,_ =
5755
checker.Compile([| "fsc.exe"
@@ -78,7 +76,7 @@ let compile (path: string) (asmPath: string) =
7876
"--define:NETCOREAPP3_0_OR_GREATER"
7977
"--define:NETCOREAPP3_1_OR_GREATER"
8078
"--optimize+"
81-
for f in IO.Directory.EnumerateFiles(net50Path,"*.dll") do
79+
for f in IO.Directory.EnumerateFiles(netPath,"*.dll") do
8280
$"-r:{f}"
8381
|])
8482
|> Async.RunSynchronously

0 commit comments

Comments
 (0)