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

feat(server): implement file synchronization methods and publish diagnostic notifications #47

Merged
merged 16 commits into from
Mar 18, 2025

Conversation

go-wyvern
Copy link
Member

No description provided.

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 88.28452% with 28 lines in your changes missing coverage. Please review.

Project coverage is 66.55%. Comparing base (c4b60be) to head (b51fa4d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/server/text_synchronization.go 92.26% 10 Missing and 4 partials ⚠️
internal/server/util.go 68.75% 7 Missing and 3 partials ⚠️
internal/server/server.go 84.61% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   65.43%   66.55%   +1.11%     
==========================================
  Files          38       39       +1     
  Lines        5772     6007     +235     
==========================================
+ Hits         3777     3998     +221     
- Misses       1755     1762       +7     
- Partials      240      247       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aofei aofei requested a review from Copilot March 14, 2025 01:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements file synchronization methods on the server-side and publishes diagnostic notifications in response to LSP text document events. Key changes include:

  • Addition of comprehensive tests for file modifications in gop/proj_test.go.
  • Implementation of text document lifecycle handlers (didOpen, didChange, didSave, didClose) and asynchronous diagnostics in internal/server/text_syncronization.go.
  • Introduction of the FileChange type and revised ModifyFiles logic in gop/proj.go, along with updating server notification handling in internal/server/server.go.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
gop/proj_test.go Adds new tests covering file addition, update, and multiple file changes.
internal/server/text_syncronization.go Implements text synchronization and diagnostic publishing functionality.
gop/proj.go Introduces FileChange and updates ModifyFiles to use version-based updates.
internal/server/server.go Replaces placeholder TODOs with actual handler calls for notifications.
Comments suppressed due to low confidence (1)

internal/server/text_syncronization.go:1

  • [nitpick] The file name 'text_syncronization.go' appears to have a spelling mistake; consider renaming it to 'text_synchronization.go' for clarity and consistency.
package server

Copy link

qiniu-x bot commented Mar 17, 2025

[Git-flow] Hi @go-wyvern, There are some suggestions for your information:


Rebase suggestions

  • Following commits seems generated via git merge

    Merge branch 'main' into text_syncronization

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

@aofei aofei merged commit 6408b54 into goplus:main Mar 18, 2025
5 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.

3 participants