-
Notifications
You must be signed in to change notification settings - Fork 789
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
Add ISourceText to language service and use Roslyn's SourceText for FSharp.Editor #6001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
(@TIHan just found a couple of review comments I hadn't submitted) |
|
We are getting closer. I am a little worried that we have two different implementations of |
Awesome! |
I'm ready to merge this. Any objections? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🇮🇹
This PR doesn't seem to have been merged to |
Lots. It will be in master once dev16 ships and we merge into master. |
I think it's bad for OSS FCS development in this repo. |
@auduchinok for FCS we could integrate to the FCS from from a branch other than master, I just chose master because it seemed convenient. If we want features faster we could just as easily pick a non-master branch. 🤷♂️ |
I think it might be ok. What's the divergence between FCS master and visualfsharp master? |
The fact there are pending unshipped changes in dev16.0 is a slight divergence but it is on a path back to convergence when dev16.0 ships. That's normal? |
My point is about not having some PRs merged to master, assuming one builds FCS from source in this repo. Due to all the development is currently happening here I doubt there's a reason to build it from the other repo unless all the FCS development and stuff is moved there as well. |
And other branches may not contain some of PRs merged that are already in |
From a glance there're PRs that are really important like #6191 and this one or are general improvements that'd be great to see in action like #6048 and #6058.
It'd probably be better to try to have it diverged for less time, e.g. until the first public VS preview is released and not the actual release. Other tools have to be updated for changes like this PR as well and it's better to have the changes in previews. |
@auduchinok Yes, things should really go into master unless they specifically need to go into dev16.0 However we have to cut some slack here: @TIHan and others at Microsoft are doing us a great favor by always sitting on the latest VS preview and checking that things are good and performant there. If you're doing regular work there it's kind of hard to switch back and do serious dev work on VS2017 (which is master). So it's better to just live with a bit of divergence and reconcile later. |
The most important thing is that the automatic flows are set up to integrate and flow correctly, which they are. |
I'm building Fantomas against FCS built from |
…Sharp.Editor (dotnet#6001) * Initial ISourceText implementation (does not work yet) * Lexbuffer works * Removing Source. Now using only ISourceText. Added SourceText.ofString. * Fixing tests * We need to use addNewLine for tests to pass * Added test for SourceText.ofString * Trying to fix tests * Simplified ISourceText API. Added RoslynSourceTextTests * Trying to get the build working again * Re-organize prim-lexing.fsi * Handling format strings * Trying to get tests to pass * Trying to fix tests * Ignoring test * unignoring test * Fixed weak table * Removing addNewLine in sourcetext * Fixing interactive checker tests * Fixing more tests * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removed addNewLine * Removing last addNewLine. It's done * Better tests and small optimizations * Adjusting comment * Updating CompilerServiceBenchmarks * Updated nits
We were doing
.ToString()
on Roslyn'sSourceText
type in FSharp.Editor. This is very bad as we are making full copies of the source text and for larges files making large allocations on the LOH. To solve this, we added anISourceText
interface that looks similar to Roslyn'sSourceText
type. It is then implemented in FSharp.Editor with Roslyn'sSourceText
as the implementation detail.This also eradicates adding a new line at the end of every source file in FCS.
This should resolve these issues:
#5935
#5936
#5937