Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Conversation

nosami
Copy link
Member

@nosami nosami commented Mar 27, 2017

Looks like the problem is due to this commit to
Mono mono/mono@efd53c8
Mono's internal System.Reflection.Emit.MonoGenericClass was renamed
to System.Reflection.Emit.TypeBuilderInstantiation

That broke the workaround in

#if ENABLE_MONO_SUPPORT
if runningOnMono then
Type.GetType("System.Reflection.MonoGenericClass")
else
#endif
.

fixes #685

Mono changed

Looks like the problem is due to this commit to
Mono mono/mono@efd53c8
Mono's internal System.Reflection.Emit.MonoGenericClass was renamed
to System.Reflection.Emit.TypeBuilderInstantiation

That broke the workaround in https://github.com/fsharp/fsharp/blob/5a942daf930d7023c78f578ec6876b86a6f13f1e/src/absil/ilreflect.fs#L619-L623 .
@nosami
Copy link
Member Author

nosami commented Mar 27, 2017

We would need a bump to the FSharp.Compiler.Tools nuget package containing this fix before we can build on Mono again.

I tested it by copying the output of this build into the packages/FSharp.Compiler.Tools.4.0.1.21/tools folder and then running mono /Users/jason/src/fsharp/packages/FSharp.Compiler.Tools.4.0.1.21/tools/fsi.exe --exec "/Users/jason/src/fsharp/src/scripts/fssrgen.fsx" "/Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt" "obj//net40/FSBuild.fs" "obj//net40/FSBuild.resx" from fsharp/FSharp.Build

✔ ~/src/fsharp [master ↑·1|⚑ 1]
12:32 $ cd src/fsharp/FSharp.Build
✔ ~/src/fsharp/src/fsharp/FSharp.Build [master ↑·1|⚑ 1]
12:32 $ mono /Users/jason/src/fsharp/packages/FSharp.Compiler.Tools.4.0.1.21/tools/fsi.exe --exec "/Users/jason/src/fsharp/src/scripts/fssrgen.fsx" "/Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt" "obj//net40/FSBuild.fs"  "obj//net40/FSBuild.resx"
fssrgen: args = [|"/Users/jason/src/fsharp/src/scripts/fssrgen.fsx";
  "/Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt";
  "obj//net40/FSBuild.fs"; "obj//net40/FSBuild.resx"|]
fssrgen.fsx: Reading /Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt
fssrgen.fsx: Parsing /Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt
fssrgen.fsx: Validating /Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt
fssrgen.fsx: Validating uniqueness of /Users/jason/src/fsharp/src/fsharp/FSharp.Build/FSBuild.txt
fssrgen.fsx: Generating /Users/jason/src/fsharp/src/fsharp/FSharp.Build/obj//net40/FSBuild.fs
fssrgen.fsx: Generating resource methods for /Users/jason/src/fsharp/src/fsharp/FSharp.Build/obj//net40/FSBuild.fs
fssrgen.fsx: Generating .resx for /Users/jason/src/fsharp/src/fsharp/FSharp.Build/obj//net40/FSBuild.fs
fssrgen.fsx: Done /Users/jason/src/fsharp/src/fsharp/FSharp.Build/obj//net40/FSBuild.fs

@nosami
Copy link
Member Author

nosami commented Mar 27, 2017

Build passed against Mono 4.8.0 and 4.4.2. AppVeyor failed with an unrelated error

Time Elapsed 00:00:20.03
"Finished"
build-netcore.bat
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 3/27/2017 11:36:59 AM.
     1>Project "C:\projects\fsharp\lib\netcore\build-fsc-netcore.proj" on node 1 (default targets).
     1>RestoreFscNetcore:
         dotnet restore
     1>MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. [C:\projects\fsharp\lib\netcore\build-fsc-netcore.proj]
     1>C:\projects\fsharp\lib\netcore\build-fsc-netcore.proj(67,5): error MSB3073: The command "dotnet restore" exited with code 1.
     1>Done Building Project "C:\projects\fsharp\lib\netcore\build-fsc-netcore.proj" (default targets) -- FAILED.
Build FAILED.
       "C:\projects\fsharp\lib\netcore\build-fsc-netcore.proj" (default target) (1) ->

@dsyme
Copy link
Contributor

dsyme commented Mar 27, 2017

@nosami Thanks, that's great. Could you cherry pick and submit to http://github.com/Microsoft/visualfsharp as well please? (normally we'd integrate it across but this needs to be done more rapidly)

@nosami
Copy link
Member Author

nosami commented Mar 27, 2017

sure!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't compile with Mono master (4.9+)
2 participants