Skip to content

Commit fdb468a

Browse files
authored
Merge pull request #628 from ncave/master
Fixing binary reader on xplat
2 parents efe549d + da6d0b6 commit fdb468a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/absil/ilread.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3946,15 +3946,15 @@ let ClosePdbReader pdb =
39463946

39473947
let OpenILModuleReader infile opts =
39483948

3949-
if not runningOnMono then
3949+
try
39503950
let mmap = MemoryMappedFile.Create infile
39513951
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mmap opts
39523952
{ modul = modul
39533953
ilAssemblyRefs=ilAssemblyRefs
39543954
dispose = (fun () ->
39553955
mmap.Close()
39563956
ClosePdbReader pdb) }
3957-
else
3957+
with _ ->
39583958
let mc = ByteFile(infile |> FileSystem.ReadAllBytesShim)
39593959
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mc opts
39603960
{ modul = modul

src/fsharp/CompileOps.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,8 +2602,8 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
26022602
clrRoot, (int v1, sprintf "v%d.%d" v1 v2), (v1=5us && v2=0us && v3=5us) // SL5 mscorlib is 5.0.5.0
26032603
| _ ->
26042604
failwith (FSComp.SR.buildCouldNotReadVersionInfoFromMscorlib())
2605-
with _ ->
2606-
error(Error(FSComp.SR.buildCannotReadAssembly(filename),rangeStartup))
2605+
with e ->
2606+
error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup))
26072607
| _ ->
26082608
None, MSBuildResolver.HighestInstalledNetFrameworkVersionMajorMinor(), false
26092609

@@ -2657,8 +2657,8 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
26572657
checkFSharpBinaryCompatWithMscorlib filename ilReader.ILAssemblyRefs ilReader.ILModuleDef.ManifestOfAssembly.Version rangeStartup;
26582658
let fslibRoot = Path.GetDirectoryName(FileSystem.GetFullPathShim(filename))
26592659
fslibRoot (* , sprintf "v%d.%d" v1 v2 *)
2660-
with _ ->
2661-
error(Error(FSComp.SR.buildCannotReadAssembly(filename),rangeStartup))
2660+
with e ->
2661+
error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup))
26622662
| _ ->
26632663
data.defaultFSharpBinariesDir
26642664

src/fsharp/FSharp.Compiler.Service.ProjectCracker/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "6.0.1",
2+
"version": "6.0.2",
33
"buildOptions": {
44
"debugType": "portable",
55
"emitEntryPoint": false,
@@ -36,7 +36,7 @@
3636
"Microsoft.Build.Utilities.Core": "0.1.0-preview-00029-160805",
3737
"System.Runtime.Serialization.Json": "4.0.2",
3838
"FSharp.Compiler.Service": {
39-
"version": "6.0.1",
39+
"version": "6.0.2",
4040
"target": "project"
4141
}
4242
},

src/fsharp/FSharp.Compiler.Service/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "6.0.1",
2+
"version": "6.0.2",
33
"buildOptions": {
44
"debugType": "portable",
55
"compilerName": "fsc",

tests/service/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"dependencies": {
5050
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*",
5151
"NUnit": "3.4.1",
52-
"dotnet-test-nunit": "3.4.0-beta-1",
52+
"dotnet-test-nunit": "3.4.0-beta-2",
5353
"FSharp.Compiler.Service": { "target": "project" }
5454
},
5555

0 commit comments

Comments
 (0)