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

Language server first pass #884

Merged
merged 61 commits into from
Jan 29, 2024
Merged

Conversation

micahscopes
Copy link

@micahscopes micahscopes commented May 9, 2023

This is an initial implementation of the Fe language server. See the readme for further details.

Progress

May 2023

  • Orientation, research and study of rust-analyzer, Fe compiler
  • LSP server crate scaffolding
  • LSP-based VSCode extension
  • Hover prototype
    • printing debug information
  • Basic development setup and documentation

June 2023

  • Diagnostics publishing prototype
    • using current deprecated diagnostics functionality

July 2023

  • Syntax highlighting in the VSCode extension via Textmate grammar file
  • Initial work on transitioning to the new compiler architecture
    • Salsa2022 database setup for language server
    • Overhaul diagnostics types to support types in new compiler crates
    • Working prototype of new diagnostics functionality based on @Y-Nak's name-resolution branch

August 2023

  • Improvements to LSP server + VSCode extension development setup
  • Improved document/didChange handling
  • Flexible LSP server global logging support using the log crate
  • Further work on transitioning to the new compiler overhaul
    • Go-to definition prototype working for standalone .fe files; based on @Y-Nak's compiler rewrite
      • Name resolution from cursor position
      • Snap tests and unit tests for go-to definition functionality
    • Error handling improvements
      • At the time, the rewritten name resolution only supported type resolution in the early resolution stage, but the data types and LSP server implementation should seamlessly support progress on the new compiler's name resolution functionality without many changes

September 2023

  • Go-to definition cleanup
  • Initial "workspace" functionality
    • a data structure and API for generating, caching and synchronizing necessary salsa inputs to support language server functionality
    • should support file synchronization via filesystem watching and LSP file change events alike
    • Sketch of initial workspace cache data structures
      • Featuring a prefix tree based lookup for salsa inputs representing files, ingots and top-modules
      • Supporting local, external and standalone ingot caches.
    • Upgraded go-to definition functionality to work with "local" ingots containing multiple modules
    • Integration of workspace data structures with existing language server data structures; slight refactor of existing architecture
    • Initial workspace sync prototype and tests
  • Initial support for subdiagnostics
  • Research and study of rust-analyzer's file synchronization functionality
  • Workspace sync API brainstorming and design

November/December 2023

  • Improve the internal synchronization API for the "workspace" data structure to support an explicit update step
  • Integrate the "workspace" data structure with LSP events and a rudimentary filesystem watcher

@micahscopes micahscopes force-pushed the language-server branch 2 times, most recently from 5153132 to 5d351eb Compare August 22, 2023 00:05
@micahscopes micahscopes force-pushed the language-server branch 2 times, most recently from 4d56fb2 to 7a02940 Compare September 8, 2023 17:48
@micahscopes micahscopes force-pushed the language-server branch 2 times, most recently from 1854298 to 2bf653b Compare January 29, 2024 14:29
@micahscopes micahscopes marked this pull request as ready for review January 29, 2024 14:32
@micahscopes micahscopes changed the title Language server Language server first pass Jan 29, 2024
Copy link
Collaborator

@sbillig sbillig left a comment

Choose a reason for hiding this comment

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

🎉

@sbillig sbillig merged commit fd274c9 into ethereum:fe-v2 Jan 29, 2024
6 of 7 checks passed
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.

2 participants