Skip to content

Add empty response for textDocument/implementation request#3699

Merged
nixel2007 merged 2 commits intodevelopfrom
copilot/add-empty-response-implementation
Dec 25, 2025
Merged

Add empty response for textDocument/implementation request#3699
nixel2007 merged 2 commits intodevelopfrom
copilot/add-empty-response-implementation

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Adds a stub handler for textDocument/implementation that returns an empty list. No capability declared, no provider—just prevents clients from getting an error when they send this request.

Changes

  • BSLTextDocumentService: Override implementation() to return empty LocationLink list
  • BSLTextDocumentServiceTest: Add test verifying empty response
@Override
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> implementation(
  ImplementationParams params
) {
  return CompletableFuture.completedFuture(Either.forRight(Collections.emptyList()));
}
Original prompt

Добавить пустой ответ на запрос textDocument/implementation. Без объявления capability и без провайдера, просто пустой ответ.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 24, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copilot AI changed the title [WIP] Add empty response for textDocument/implementation request Add empty response for textDocument/implementation request Dec 24, 2025
Copilot AI requested a review from nixel2007 December 24, 2025 18:12
@nixel2007 nixel2007 marked this pull request as ready for review December 24, 2025 18:13
Copilot AI review requested due to automatic review settings December 24, 2025 18:13
@nixel2007
Copy link
Member

/buildJar

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

Test Results

2 781 files  ±0  2 781 suites  ±0   48m 41s ⏱️ +10s
1 071 tests +1  1 071 ✅ +1  0 💤 ±0  0 ❌ ±0 
9 639 runs  +9  9 639 ✅ +9  0 💤 ±0  0 ❌ ±0 

Results for commit ae8c484. ± Comparison against base commit d80ae40.

This pull request removes 8 and adds 5 tests. Note that renamed tests count towards both.
#, count=1
, count=0
, count=1
A, count=1
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [2] content=
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [6] content=
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [7] content=#
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [8] content=
com.github._1c_syntax.bsl.languageserver.BSLTextDocumentServiceTest ‑ testImplementation()
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [2] content=
, count=0
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [6] content=
A, count=1
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [7] content=#
, count=1
com.github._1c_syntax.bsl.languageserver.diagnostics.MetadataObjectNameLengthDiagnosticTest ‑ [8] content=
#, count=1

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

✅ Собраны JAR-файлы для этого PR по команде /buildJar.

Артефакт: 4963019086

Файлы внутри:

  • bsl-language-server-copilot-add-empty-response-implementation-ae8c484-exec.jar

Copy link
Contributor

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 adds a stub handler for the textDocument/implementation LSP request to prevent client errors. The implementation intentionally returns an empty list without declaring capabilities or providing actual functionality.

Key Changes:

  • Added stub implementation() method that returns an empty LocationLink list
  • Added test to verify the stub returns the expected empty response

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main/java/com/github/_1c_syntax/bsl/languageserver/BSLTextDocumentService.java Adds stub implementation() method that returns empty list wrapped in CompletableFuture
src/test/java/com/github/_1c_syntax/bsl/languageserver/BSLTextDocumentServiceTest.java Adds test verifying the stub method returns non-null empty response

The implementation is clean and appropriate for its purpose as a stub handler. The code follows Java conventions, properly uses the LSP4J types, and includes adequate test coverage. No issues were identified.

@nixel2007 nixel2007 merged commit ec77cec into develop Dec 25, 2025
46 of 47 checks passed
@nixel2007 nixel2007 deleted the copilot/add-empty-response-implementation branch December 25, 2025 10:11
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