FsReveal
FsReveal copied to clipboard
running paket install or paket update breaks FSReveal with FsiEvaluationException
running paket install or paket update breaks FSReveal:
- git clone FSReveal
- run
build.cmd
slides are processed without an error - run
paket update
it will download the various .NET core libraries - running
build.cmd
will show the following output:
FsiEvaluationException:
Error:
build.fsx(96,32): error FS0001: This expression was expected to have type
ByteSegment
but here has type
byte []
Output: [Loading C:\Users\user\Documents\Source\FsReveal\packages\FSharp.Formatting\FSharp.Formatting.fsx Loading C:\Users\user\Documents\Source\FsReveal\packages\FsReveal\fsreveal\fsreveal.fsx Loading C:\Users\user\Documents\Source\FsReveal\build.fsx]
Input: C:\Users\user\Documents\Source\FsReveal\build.fsx \Arguments: C:\fsi.exe
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](FSharpChoice
2 res) at Microsoft.FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.EvalScript(String filePath) at [email protected](String arg00) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1303 at [email protected](Unit unitVar0) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1277 at Yaaf.FSharp.Scripting.Helper.consoleCapture[a](TextWriter out, TextWriter err, FSharpFunc
2 f) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1221 at Yaaf.FSharp.Scripting.Helper.redirectOut@1247[a](Boolean preventStdOut, OutStreamHelper out, OutStreamHelper err, FSharpFunc2 f) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1254 at [email protected](String text) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1276 --- End of inner exception stack trace --- at [email protected](String text) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1284 at Yaaf.FSharp.Scripting.Helper.session@1306.Yaaf-FSharp-Scripting-IFsiSession-EvalScriptWithOutput(String ) in C:\code\fake\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1308 at Fake.FSIHelper.runScriptUncached(Boolean useCache, String scriptPath, IEnumerable
1 fsiOptions, Boolean printDetails, CacheInfo cacheInfo, TextWriter out, TextWriter err) in C:\code\fake\src\app\FakeLib\FSIHelper.fs:line 471 build.fsx(96,32): error FS0001: This expression was expected to have type ByteSegment but here has type byte []
On Win7 with VS2015 On Win10 with VS2015 and VS2017
Workaround: do not run paket install or update
The first error can be worked around fairly easily, by replacing ASCII.bytes "refreshed"
with ASCII.bytes "refreshed" |> ByteSegment
in build.fsx
.
However after updating build.fsx
to use the modern FAKE libraries, I start hitting problems - I'm guessing due to older FSharp.Literate
or FSharp.Formatting
etc. versions. Currently stuck on this:
System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Formatting-Common>.$YaafFSharpScripting' threw an exception. ---> System.TypeLoadException: Could not load type 'FSharp.Compiler.SourceCodeServices.FSharpChecker' from assembly 'FSharp.Compiler.Service, Version=25.0.1.0, Culture=neutral, PublicKeyToken=null'.
at <StartupCode$FSharp-Formatting-Common>.$YaafFSharpScripting..cctor()
--- End of inner exception stack trace ---
at Yaaf.FSharp.Scripting.Env.get_isMono()
at Yaaf.FSharp.Scripting.FsiOptions.get_Default()
at <StartupCode$FSharp-Literate>[email protected](Unit _arg1)
at FSharp.Literate.FsiEvaluator..ctor(FSharpOption`1 options, FSharpOption`1 fsiObj)
at <StartupCode$FSI_0005>.$FSI_0005_Build$fsx.main@() in D:\Coding\WhatTheFSharp\FsReveal\build.fsx:line 50
Stopped due to error