-
Notifications
You must be signed in to change notification settings - Fork 585
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
retrieve mono version and ignore caching on mono 5.0.0 #1536
Conversation
@nosami :) |
This works - apart from failing caching tests :) |
|
Well you tested it, that's enough for me :) |
Still need to investigate the cause of this System.Reflection.Emit.ModuleBuilder.Save bug. Once that's fixed, we can revisit |
Can't repro with this standalone script #r "FSharp.Compiler.Service.12.0.5/lib/net45/FSharp.Compiler.Service.dll"
open Microsoft.FSharp.Compiler.Interactive.Shell
open System.IO
open System.Text
// Intialize output and input streams
let sbOut = new StringBuilder()
let sbErr = new StringBuilder()
let inStream = new StringReader("")
let outStream = new StringWriter(sbOut)
let errStream = new StringWriter(sbErr)
// Build command line arguments & start FSI session
let argv = [| "C:\\fsi.exe" |]
let allArgs = Array.append argv [|"--noninteractive"|]
let fsiConfig = FsiEvaluationSession.GetDefaultConfiguration()
let fsiSession = FsiEvaluationSession.Create(fsiConfig, allArgs, inStream, outStream, errStream)
let script =
"""
open System
type MyAttr() =
inherit Attribute()
do failwith "test"
[<MyAttr()>]
type Test () =
do ignore ()
[<assembly: MyAttr()>]
do ()
"""
fsiSession.EvalScript script
let builder =
match fsiSession.DynamicAssembly with
| :? System.Reflection.Emit.AssemblyBuilder as builder -> builder
| _ -> failwith "The DynamicAssembly property is no AssemblyBuilder!"
builder.Save("FSI-ASSEMBLY.dll") |
@nosami Can you try with the Do you compile and run the standalone script or run it via fsi? |
I was running it via fsi. Currently working on a repro with Yaaf.FSharp.Scripting |
You can see how the API is used here: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/FSIHelper.fs#L459 Thanks for taking care :) |
Running via fsi makes a difference as then another |
Weirdly, it doesn't repro in a console exe or using Yaaf.Scripting with default options |
Well its a runtime crash, it can be the special way we setup our environment or a timing thing or any combination :/. Maybe it depends on the size of the stack at runtime... |
(In other words I don't have another idea anymore ;) ) |
Yeah.. no worries - will keep digging |
You can only really go the other way: Start with the FAKE code and reduce the code until the error disappears :) |
Fixed by mono/mono#4769 |
Ok secound try...
relates to #1535 and #1534 (comment)