Comments (12)
Hi @rneatherway ,
sorry to swap venues but I don't really want to spam the whole mailing list!
My debug log for the above fsx file looks like this:
LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: 'c:\rip\SddConf.Properties\Serialization.fsx'
LanguageService: ParseAndCheckFileInProject: Trigger parse (fileName=c:\rip\SddConf.Properties\Serialization.fsx)
LanguageService agent: Dequeued request 0 remaining
LanguageService agent: start parsing - c:\rip\SddConf.Properties\Serialization.fsx
LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: 'c:\rip\SddConf.Properties\Serialization.fsx'
LanguageService agent: parse completed
LanguageService agent: Typecheck source...
LanguageService: Parsing: Get typed parse result, fileName=c:\rip\SddConf.Properties\Serialization.fsx
LanguageService: Not using stale results - trying typecheck with timeout
LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: 'c:\rip\SddConf.Properties\Serialization.fsx'
LanguageService agent: Typecheck completed
LanguageService agent: Update typed info - HasFullTypeCheckInfo? true
LanguageService agent: Awaiting request
LanguageService agent: Dequeued request 0 remaining
LanguageService agent: start parsing - c:\rip\SddConf.Properties\Serialization.fsx
LanguageService: Starting background compilations
LanguageService agent: parse completed
LanguageService agent: Typecheck source...
LanguageService: Parsing: Get typed parse result, fileName=c:\rip\SddConf.Properties\Serialization.fsx
LanguageService: Parsing: using stale results
Result: Crack symbol text at column 0
Identifier: [""]
Line string: #r "packages/FParsec/lib/net40-client/FParsecCS.dll"
LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: 'c:\rip\SddConf.Properties\Serialization.fsx'
LanguageService agent: Typecheck completed
LanguageService agent: Update typed info - HasFullTypeCheckInfo? true
LanguageService agent: Awaiting request
LanguageService: Parsing: Get typed parse result, fileName=c:\rip\SddConf.Properties\Serialization.fsx
LanguageService: Parsing: using stale results
Result
Nothing obvious looking so I'll try and turn on the debug attribute in Emacs.
from zarchive-fsharpbinding.
And the debug log looks like this:
1431355373.887: Parsing "c:/rip/SddConf.Properties/Enterprise.fsx"
1431355373.887: tooltip "c:/rip/SddConf.Properties/Enterprise.fsx" 1 0 400
1431355374.058: {"Kind":"INFO","Data":"Background parsing started"}
1431355374.058: Received 'INFO' message of length 65
1431355374.463: tooltip "c:/rip/SddConf.Properties/Enterprise.fsx" 3 0 400
1431355375.509: tooltip "c:/rip/SddConf.Properties/Enterprise.fsx" 1 0 400
1431355376.015: {"Kind":"ERROR","Data":"Timeout when fetching typed parse result"}
1431355376.015: Received 'ERROR' message of length 65
1431355377.399: {"Kind":"errors","Data":[{"StartLine":0,"StartLineAlternate":1,"EndLine":0,"EndLineAlternate":1,"StartColumn":0,"EndColumn":80,"Severity":"Error","Message":"The module/namespace 'System.Runtime.CompilerServices' from compilation unit 'mscorlib' did not contain the namespace, module or type 'ExtensionAttribute'","Subcategory":"typecheck","FileName":"c:\\rip\\SddConf.Properties\\Enterprise.fsx"},{"StartLine":27,"StartLineAlternate":28,"EndLine":27,"EndLineAlternate":28,"StartColumn":4,"EndColumn":21,"Severity":"Warning","Message":"This expression should have type 'unit', but has type 'string'. Use 'ignore' to discard the result of the expression, or 'let' to bind the result to a name.","Subcategory":"typecheck","FileName":"c:\\rip\\SddConf.Properties\\Enterprise.fsx"}]}
1431355377.399: Received 'errors' message of length 65
1431355377.401: {"Kind":"INFO","Data":"No tooltip information"}
1431355377.401: Received 'INFO' message of length 65
1431355377.491: {"Kind":"INFO","Data":"No tooltip information"}
1431355377.491: Received 'INFO' message of length 65
from zarchive-fsharpbinding.
Thanks, could you uncomment LanguageService.fs:319-320 and rerun the first debug session?
from zarchive-fsharpbinding.
LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: 'c:\rip\SddConf.Properties\Serialization.fsx'
GetScriptCheckerOptions: ProjectFileName: c:\rip\SddConf.Properties\Serialization.fsx.fsproj, ProjectFileNames: [|"c:\rip\SddConf.Properties\paket-files\xyncro\chiron\src\Chiron\Chiron.fs";
"c:\rip\SddConf.Properties\Serialization.fsx"|], ProjectOptions: [|"--noframework"; "--warn:3";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\FSharp.Core.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Runtime.Remoting.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Runtime.Serialization.Formatters.Soap.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Services.dll";
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll";
"-r:C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\FSharp.Compiler.Interactive.Settings.dll";
"-r:c:\rip\SddConf.Properties\packages/FsCheck/lib/net45/FsCheck
from zarchive-fsharpbinding.
Looks like this:
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll"
should be
"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"
on my system (or even 4.5.1)
from zarchive-fsharpbinding.
OK, so this is coming direct from FSharp.Compiler.Service. How have you configured fsi.exe to be launched, or what is the value of the variable inferior-fsharp-program?
from zarchive-fsharpbinding.
inferior-fsharp-program is a variable defined in `inf-fsharp-mode.el'.
Its value is
"\"c:/Program Files (x86)/Microsoft SDKs/F#/3.1/Framework/v4.0/fsi.exe\""
This variable may be risky if used as a file-local variable.
Documentation:
*Program name for invoking an inferior fsharp from Emacs.
from zarchive-fsharpbinding.
It should be noted that evaluating the file in inferior-fsharp works without error.
from zarchive-fsharpbinding.
I think this is an FCS bug. I would proceed by making a repro using just FCS, you can call it as described here: http://fsharp.github.io/FSharp.Compiler.Service/editor.html
The skeleton will look like this:
// Reference F# compiler API
#r "FSharp.Compiler.Service.dll"
open System
open Microsoft.FSharp.Compiler.SourceCodeServices
// Create an interactive checker instance
let checker = FSharpChecker.Create()
let projOptions =
checker.GetProjectOptionsFromScript(file, input)
|> Async.RunSynchronously
let parseResults2, checkFileAnswer2 =
checker.ParseAndCheckFileInProject(file, 0, input, projOptions)
|> Async.RunSynchronously
from zarchive-fsharpbinding.
Thanks Robin, I'll try and do that. In the short term, is there any way of sending a framework version from Emacs?
from zarchive-fsharpbinding.
I'm sorry, there isn't. My earlier comment about the framework version was mistaken -- the framework is only used in the case that FCS doesn't tell us which FSharp.Core to use (LanguageService line 308). Unless I'm mistaken we are really just at the mercy of FCS here.
from zarchive-fsharpbinding.
This issue was moved to fsharp/emacs-fsharp-mode#15
from zarchive-fsharpbinding.
Related Issues (20)
- Can't compile code in Windows HOT 6
- Syntax highlighting doesn't cope with international chars HOT 3
- Documentation comments in MonoDevelop are broken since new ToolTip on Linux HOT 1
- Adding Glyph to Completion output in fsautocomplete HOT 8
- Syntax highlighting: Strange output HOT 5
- [emacs] Symbol's function definition is void: -any HOT 1
- Tutorial creates empty project HOT 2
- fsharpbinding does not parse ProjectReferences? HOT 1
- fsautocomplete will not start under mono 3.2.8 in Ubuntu/Linux Trusty HOT 1
- FSX script crashing fsautocomplete. HOT 1
- fsautocomplete.exe not run with mono 3.2.8 HOT 1
- Question on error HOT 3
- Missing type info tooltips in Lubuntu 14.04 HOT 2
- Auto-completion for fsx files stops working HOT 3
- [github] Escaped double quotes in verbatim strings conflict with triple-quoted strings HOT 3
- NRE when creating an .fsx file in XS HOT 1
- Atom.io support? HOT 20
- fsharpbinding is not available as the default package in SublimeText package control HOT 4
- could not import MSBuildExtensionPath32 in Monodevelop HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zarchive-fsharpbinding.