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: Update lsp workspace #1594

Merged
merged 5 commits into from
Aug 27, 2024
Merged

feat: Update lsp workspace #1594

merged 5 commits into from
Aug 27, 2024

Conversation

He1pa
Copy link
Contributor

@He1pa He1pa commented Aug 22, 2024

feat: lsp workspace.

  1. delete db and use workspace to store compile result.
  2. Initialize the global workspace when starting lsp. For file changes, update the workspace for files in the global workspace and create a temporary workspace for files not in the global workspace (compatible with old versions, consistent with previous behavior).
  3. Publish Diag globally, not only in the currently opened file
  4. use DBState to present compile state: init, in compiling and ready

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@He1pa He1pa changed the title [wip] feat: Update lsp workspace feat: Update lsp workspace Aug 27, 2024
…result. 2.Initialize the global workspace when starting lsp. For file changes, update the workspace for files in the global workspace and create a temporary workspace for files not in the global workspace (compatible with old versions, consistent with previous behavior). 3.Publish Diag globally, not only in the currently opened file

Signed-off-by: he1pa <18012015693@163.com>
Signed-off-by: he1pa <18012015693@163.com>
Signed-off-by: he1pa <18012015693@163.com>
…ady)

Signed-off-by: he1pa <18012015693@163.com>
Signed-off-by: he1pa <18012015693@163.com>
@He1pa He1pa marked this pull request as ready for review August 27, 2024 09:01
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 10575019807

Details

  • 307 of 395 (77.72%) changed or added relevant lines in 10 files are covered.
  • 57 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.1%) to 70.82%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/tools/src/LSP/src/notification.rs 15 16 93.75%
kclvm/tools/src/LSP/src/tests.rs 34 35 97.14%
kclvm/tools/src/LSP/src/to_lsp.rs 23 24 95.83%
kclvm/tools/src/LSP/src/util.rs 10 11 90.91%
kclvm/tools/src/LSP/src/request.rs 29 51 56.86%
kclvm/tools/src/LSP/src/state.rs 172 234 73.5%
Files with Coverage Reduction New Missed Lines %
kclvm/tools/src/LSP/src/request.rs 1 62.72%
kclvm/sema/src/resolver/mod.rs 1 99.06%
kclvm/driver/src/lib.rs 1 82.28%
kclvm/tools/src/LSP/src/tests.rs 3 98.59%
kclvm/sema/src/core/global_state.rs 5 92.02%
kclvm/tools/src/LSP/src/util.rs 5 44.57%
kclvm/tools/src/LSP/src/dispatcher.rs 11 65.71%
kclvm/tools/src/LSP/src/notification.rs 12 78.69%
kclvm/tools/src/LSP/src/state.rs 18 77.67%
Totals Coverage Status
Change from base Build 10571823119: -0.1%
Covered Lines: 51529
Relevant Lines: 72761

💛 - Coveralls

kclvm/parser/src/lib.rs Show resolved Hide resolved
kclvm/parser/src/lib.rs Show resolved Hide resolved
@Peefy Peefy merged commit f6e7057 into kcl-lang:main Aug 27, 2024
11 of 12 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