Skip to content
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

Merged
merged 3 commits into from
May 28, 2015
Merged

POC: Implement multiple unsaved file checking #8

merged 3 commits into from
May 28, 2015

Conversation

rojepp
Copy link
Contributor

@rojepp rojepp commented May 26, 2015

multifile

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

@rojepp
Copy link
Contributor Author

rojepp commented May 26, 2015

On my machine I got diffs when running integration tests because FSharp.Core is missing. Not sure if it is on my machine only.

@rneatherway
Copy link
Contributor

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.

@rojepp
Copy link
Contributor Author

rojepp commented May 27, 2015

Sure, I'll add tests for it within a few days. And post the diffs probably tonight.

@rojepp
Copy link
Contributor Author

rojepp commented May 27, 2015

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.

@rneatherway
Copy link
Contributor

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:

References = List.sortBy Path.GetFileName p.References

That might do the trick.

rneatherway added a commit that referenced this pull request May 28, 2015
POC: Implement multiple unsaved file checking
@rneatherway rneatherway merged commit 42cf4cc into ionide:master May 28, 2015
@rneatherway
Copy link
Contributor

@rojepp rojepp deleted the multiple_file_check branch June 22, 2015 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for checking unsaved files, same as in XS/VS
2 participants