Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade fcs and fscore #1534

Merged
merged 7 commits into from
Apr 27, 2017
Merged

Conversation

matthid
Copy link
Member

@matthid matthid commented Apr 26, 2017

... trying to cherry pick to make merging easier later (hopefully)...

@matthid
Copy link
Member Author

matthid commented Apr 26, 2017

  • Upgrades to net45 (drops net40 support)
  • drops xunit v1 Support and upgrades to v2 (Might break xunit1 users obviously, not sure about this)
  • cschelper works with VS2017 (they changed the csc.exe path for some reason)
  • Upgrades FSharp.Core and FSharp.Compiler.Service.

@matthid matthid changed the title [WIP] Upgrade fsc and fscore Upgrade fsc and fscore Apr 26, 2017
@cloudRoutine
Copy link
Member

nice! 🎊

@matthid matthid changed the title Upgrade fsc and fscore Upgrade fcs and fscore Apr 27, 2017
@forki forki merged commit 6cfb9f4 into fsprojects:master Apr 27, 2017
@forki
Copy link
Member

forki commented Apr 27, 2017

awesome that seems to work. FAKE can self-build! Good work!
@nosami @7sharp9 can you please test the 4.59 for mono compat?

@nosami
Copy link
Member

nosami commented Apr 27, 2017

when running script
requested token for ConstructorBuilder

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.build_metadata (System.Reflection.Emit.ModuleBuilder) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.ModuleBuilder.Save () [0x001ad] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine) [0x0022b] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (string) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at Fake.FSIHelper.handleCaching<a_REF> (bool,Yaaf.FSharp.Scripting.IFsiSession,a_REF,System.IO.DirectoryInfo,Fake.FSIHelper/CacheInfo) [0x00046] in <5901bfb57c20dbeda7450383b5bf0159>:0
  at Fake.FSIHelper.runScriptUncached (bool,string,System.Collections.Generic.IEnumerable`1<string>,bool,Fake.FSIHelper/CacheInfo,System.IO.TextWriter,System.IO.TextWriter) [0x00236] in <5901bfb57c20dbeda7450383b5bf0159>:0
  at Fake.FSIHelper.runFAKEScriptWithFsiArgsAndRedirectMessages (bool,Fake.FSIHelper/FsiArgs,System.Collections.Generic.IEnumerable`1<System.Tuple`2<string, string>>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>,bool) [0x0015d] in <5901bfb57c20dbeda7450383b5bf0159>:0
  at Fake.FSIHelper.executeBuildScriptWithArgsAndFsiArgsAndReturnMessages (string,string[],string[],bool) [0x00038] in <5901bfb57c20dbeda7450383b5bf0159>:0
  at Test.FAKECore.when_running_script.RunExplicitWithResult (string,string[],string[],bool) [0x00023] in <4e523b3abfd44163b8ac5d7c21429614>:0
  at Test.FAKECore.when_running_script/<>c.<.ctor>b__25_1 () [0x0006c] in <4e523b3abfd44163b8ac5d7c21429614>:0

There is a mono bug related to the script caching when running on mono 5.0.0.76. I saw this yesterday. Remove the caching code and it's fine.

@forki
Copy link
Member

forki commented Apr 27, 2017

?

@7sharp9
Copy link
Member

7sharp9 commented Apr 27, 2017

Whats the caching code? @nosami

@nosami
Copy link
Member

nosami commented Apr 27, 2017

Fake.FSIHelper.handleCaching - looks like code that reuses a compiled temporary assembly if it's available and valid.

@forki
Copy link
Member

forki commented Apr 27, 2017

yes we should invalidate. @matthid can we do that via release?

@nosami
Copy link
Member

nosami commented Apr 27, 2017

This is definitely a big improvement though. I am able to build FSharp.Compiler.Service with the latest FAKE.

Before this change, I was seeing

Paket version 4.8.4
Downloading fsharp/FAKE:5e78ad79e69e3c3bff23ad907594fa53b81e1304 modules/Octokit/Octokit.fsx to /Users/jason/src/FSharp.Compiler.Service/paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx
3 seconds - ready.
FsiEvaluationException:

Error:

        error FS0193: Specified method is not supported.


Output: [Loading /Users/jason/src/FSharp.Compiler.Service/packages/SourceLink.Fake/tools/SourceLink.fsx
         Loading /Users/jason/src/FSharp.Compiler.Service/paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx
         Loading /Users/jason/src/FSharp.Compiler.Service/build.fsx]


Input: /Users/jason/src/FSharp.Compiler.Service/build.fsx
\Arguments:
  C:\fsi.exe
  --define:MONO

Exception: Yaaf.FSharp.Scripting.FsiEvaluationException: Error while compiling or executing fsharp snippet. ---> System.Exception: Operation failed. The error text has been print the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession.commitResult[a,b] (Microsoft.FSharp.Core.FSharpChoice`2[T1,T2] res) [0x00030] in <5707a2f5ddab8ea7a7450383f5a20757>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession.EvalScript (System.String filePath) [0x00014] in <5707a2f5ddab8ea7a7450383f5a20757>:0
  at [email protected] (System.String arg00) [0x00001] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper+saveScript@1295-1[a].Invoke (System.String path) [0x00033] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper+save_@1276-2[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper.consoleCapture[a] (System.IO.TextWriter out, System.IO.TextWriter err, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] f) [0x0001a] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper.redirectOut@1247[a] (System.Boolean preventStdOut, Yaaf.FSharp.Scripting.Helper+OutStreamHelper out, Yaaf.FSharp.Scripting.Helper+OutStreamHelper err, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] f) [0x0006d] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper+save_@1275-1[a].Invoke (System.String text) [0x0002c] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
   --- End of inner exception stack trace ---
  at Yaaf.FSharp.Scripting.Helper+save_@1275-1[a].Invoke (System.String text) [0x0009e] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Yaaf.FSharp.Scripting.Helper+session@1306.Yaaf-FSharp-Scripting-IFsiSession-EvalScriptWithOutput (System.String ) [0x00001] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
  at Fake.FSIHelper.runScriptUncached (System.Boolean useCache, System.String scriptPath, System.Collections.Generic.IEnumerable`1[T] fsiOptions, System.Boolean printDetails, Fake.FSIHelper+CacheInfo cacheInfo, System.IO.TextWriter out, System.IO.TextWriter err) [0x0019a] in <58dbc8a5ccf1c534a7450383a5c8db58>:0
error FS0193: Specified method is not supported.

CACHING ERROR - please open a issue on FAKE and /cc @matthid

Error: System.NotSupportedException: Type 'FSI_0005.Build' was not completed.
  at System.Reflection.Emit.ModuleBuilder.Save () [0x00048] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (System.String assemblyFileName, System.Reflection.PortableExecutableKinds portableExecutableKind, System.Reflection.ImageFileMachine imageFileMachine) [0x0022b] in <5357e6452d21439088fd8589dfcf1134>:0
  at System.Reflection.Emit.AssemblyBuilder.Save (System.String assemblyFileName) [0x00000] in <5357e6452d21439088fd8589dfcf1134>:0
  at Fake.FSIHelper.handleCaching[a] (System.Boolean printDetails, Yaaf.FSharp.Scripting.IFsiSession session, a fsiErrorOutput, System.IO.DirectoryInfo cacheDir, Fake.FSIHelper+CacheInfo cacheInfo) [0x00046] in <58dbc8a5ccf1c534a7450383a5c8db58>:0

@forki
Copy link
Member

forki commented Apr 27, 2017

these circular dependencies between projects are sometimes meh ;-)

@forki
Copy link
Member

forki commented Apr 27, 2017

"CACHING ERROR - please open a issue on FAKE and /cc @matthid" haha!

@matthid
Copy link
Member Author

matthid commented Apr 27, 2017

@nosami Does it work if you delete the caching folder? I guess its not?

@forki
Copy link
Member

forki commented Apr 27, 2017

error FS0193: Specified method is not supported.

^^ is probably the error

@matthid
Copy link
Member Author

matthid commented Apr 27, 2017

@nosami can you link the mono bug as well?

@nosami
Copy link
Member

nosami commented Apr 27, 2017

I need to come up with a smaller repro I think before I create a mono bug ticket.

@nosami
Copy link
Member

nosami commented Apr 27, 2017

error FS0193: Specified method is not supported.

^^ is probably the error

Fixed by fsharp/fsharp-compiler-docs@7a8aa63

@forki
Copy link
Member

forki commented Apr 27, 2017

so what should we do?

@nosami
Copy link
Member

nosami commented Apr 27, 2017

I'll investigate

@nosami
Copy link
Member

nosami commented Apr 27, 2017

@matthid
Copy link
Member Author

matthid commented Apr 27, 2017

See #1536 and #1535

@nosami
Copy link
Member

nosami commented Apr 29, 2017

Fixed by mono/mono#4769

@matthid matthid deleted the upgrade_fsc_and_fscore branch June 16, 2017 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants