-
Notifications
You must be signed in to change notification settings - Fork 123
GetProjectOptionsFromProjectFile needs to run on reactor thread #335
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
Comments
Here is the project file options from
|
And here are the compiler options while running from msbuild:
|
Also notice that one produced by ping @rneatherway @dsyme |
I suggest using the optional log parameter to see if anything strange is
|
It's quite strange, it doesn't happen all the time. It's as if an error is occurring and the dll references are missed.
|
We'll need a reliable repro for this - can you isolate it Dave? |
@rneatherway @dsyme Its a strange one, I didn't get it yesterday, but I get it each time I need it today, the problem is I memoize it so once its incorrect Im stuck with it. What Im assuming is happening is there is an exception while processing references and there is an empty list returning, all project references are there just no file references. |
Actually I just managed to capture this exception:
|
And another:
|
Looks like its not thread safe to call |
If I add a lock to my usage then I don't get any errors: lock projectInfoCache
(fun () ->Debug.WriteLine (sprintf "LanguageService: GetProjectCheckerOptions: Generating ProjectOptions for %s" <| Path.GetFileName(projFilename) )
let opts = checker.GetProjectOptionsFromProjectFile(projFilename, properties) |
Maybe there is some state within the msbuild task thats invoked or something that not disposed properly? |
If the operation is not thread safe then it should really be run through the Reactor thread in FCS. This is a relatively easy fix to make. |
Running this function out of process would fix this issue and also #342 |
@rneatherway Note this will be fixed by #470 :) |
Closed via #470 |
When running
GetProjectOptionsFromProjectFile
with theMonoDevelop.FSharp.mac-linux.fsproj
I have experienced results where all of the assembly references are missing and only the projectreferences are present.The text was updated successfully, but these errors were encountered: