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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove older impls #1174

Merged
merged 7 commits into from Oct 12, 2023
Merged

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Oct 10, 2023

WHAT

馃 Generated by Copilot at 0919866

Removed the NamedText type and related code from the project and replaced it with more efficient and consistent source text implementations. Simplified the LSP server implementation and the code fix scaffolding process. Updated the documentation and tests accordingly.

馃 Generated by Copilot at 0919866

We're sailing on the Roslyn sea, with adaptive LSP
We've left behind the NamedText, it was a heavy mess
So heave away, me hearties, heave away with glee
We'll test our code fixes with any IFSACSourceText

馃殌馃Ч馃摑

WHY

We've been running on newer implementations for a while and seems to be time to clean up older implementations.

  • Removed NamedText
  • Removed FsAutocompleteLSP

Should I also remove any of the "seams" I put in like IFSACSourceText?

I also haven't refactored AdaptiveLSP just yet.

HOW

馃 Generated by Copilot at 0919866

  • Remove the NamedText type and its dependencies from the code base, replacing it with the RoslynSourceText type that implements the IFSACSourceText interface more efficiently and consistently (link, link, link, link, link)
  • Simplify the LSP server implementation by removing the FsAutoComplete.Lsp.fs file and the FSharpLspServer type, and using the AdaptiveFSharpLspServer type instead (link, link, link, link, link, link, link, link, link)
  • Update the scaffolding process and the documentation for creating a new code fix to reflect the removal of the FsAutoComplete.Lsp.fs file from the registration of the code fix (link, link, link, link, link, link, link)
  • Modify the HelpersTests and the Tests modules in the test/FsAutoComplete.Tests.Lsp project to take a textFactory argument of type ISourceTextFactory to allow testing different implementations of the IFSACSourceText interface (link, link, link, link, link, link, link)
  • Remove the unused initNamedText and addToNamedText functions from the Helpers module in the ./benchmarks/SourceTextBenchmarks.fs file, and the irrelevant Named_Text_changeText_everyUpdate benchmark from the SourceText_LineChanges_Benchmarks type in the same file (link, link, link)

@@ -154,7 +154,7 @@ module Parser =

let sourceTextFactory: ISourceTextFactory =
match sourceTextFactoryOption with
| SourceTextFactoryOptions.NamedText -> new NamedTextFactory()
| SourceTextFactoryOptions.NamedText -> new RoslynSourceTextFactory()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left in the old parameters for now. Need to test removing these.

@Krzysztof-Cieslak
Copy link
Member

Should I also remove any of the "seams" I put in like IFSACSourceText?

yeah, I think so.

@Krzysztof-Cieslak
Copy link
Member

I also haven't refactored AdaptiveLSP just yet.

That's fine; let's do it in separate PR, and focus this one on just removing things.

@TheAngryByrd TheAngryByrd enabled auto-merge (squash) October 12, 2023 02:22
@TheAngryByrd TheAngryByrd merged commit 2e2593a into ionide:main Oct 12, 2023
9 checks passed
nojaf pushed a commit to nojaf/FsAutoComplete that referenced this pull request Nov 3, 2023
* Remove NamedText implementation

* 馃  Remove FsAutoComplete.Lsp

* Fix codefix scaffolding

* formatting

* Remove unused State/Commands

* Cleanup RoslynSourceText

* Remove SourceText CLI option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants