-
Notifications
You must be signed in to change notification settings - Fork 156
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
POC: Implement multiple unsaved file checking #8
Conversation
On my machine I got diffs when running integration tests because FSharp.Core is missing. Not sure if it is on my machine only. |
Hmm, that diff sounds a bit annoying. Is that in the list of project references returned? And you are running OS X? I'm a bit surprised because the test project files do contain an explicit reference. This doesn't affect merging this PR, but could you post the diff? Would you also mind adding a new test for this? It should be fairly easy to just copy Test1 and change the parse calls near the top to send some different contents. |
Sure, I'll add tests for it within a few days. And post the diffs probably tonight. |
Before: {"Kind":"project","Data":{"Project":"/test/integration/ErrorTestsJson/Test1.fsproj","Files":["/test/integration/ErrorTestsJson/FileTwo.fs","/test/integration/ErrorTestsJson/Program.fs"],"Output":"/test/integration/ErrorTestsJson/bin/Debug/Test1.exe","References":["/FSharp.Core.dll","/System.Core.dll","/System.dll","/mscorlib.dll"],"Framework":"v4.0"}} After: {"Kind":"project","Data":{"Project":"/test/integration/ErrorTestsJson/Test1.fsproj","Files":["/test/integration/ErrorTestsJson/FileTwo.fs","/test/integration/ErrorTestsJson/Program.fs"],"Output":"/test/integration/ErrorTestsJson/bin/Debug/Test1.exe","References":["/System.Core.dll","/System.dll","/mscorlib.dll","/FSharp.Core.dll"],"Framework":"v4.0"}} FSharp.Core is the only thing that differs. Note, the same diffs occur for me on master, without this PR. I'm on OSX. |
Works nicely in Emacs, thanks! The thing with the FSharp.Core looks like the references are not being output in the same order. I sort them to try to avoid this, but I guess the earlier parts of the path are different on OSX. Could you try changing that line to:
That might do the trick. |
POC: Implement multiple unsaved file checking
I'm sure this can be improved, but it seems to work.
Sorry about the diff containing a lot of non-change lines. I tried using Atom for this. :)
Basic idea is, keep a mutable version of State. This can be queried by IFileSystem at any time.
This means F# compiler sees changes as fact. Fixes #6