question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No documentation is produced in completion item during test run

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.68.1
  • OS Version: macOS 12.4

Steps to Reproduce:

  1. Generate a completion item in an LSP sample where documentation is included in the items.
  2. Write a test case expecting documentation in the completion items.

Our LSP extension adds documentation to the completion items. The documentation can be seen when running the extension manually.

      const documentation: MarkupContent = {
        kind: "markdown",
        value: [
          `## Module: ${output.source}, Output: ${output.key}`,
          `${docString}`,
          `${moduleRepoDocString}`,
          `${internalLineDocString}`,
        ].join("\n"),
      };

      return {
        label: `$workitem.${output.source}.outputs.${output.key}`,
        kind: CompletionItemKind.Value,
        data: index + 1,
        preselect: true,
        sortText: "1" + String(index + 1).padStart(4, "0"),
        detail: "Module-level output",
        documentation,
      };

However, the completion items produced during a test run have everything except the documentation:

{"label":"$workitem.bp-iks-vpc-gen2-cluster.outputs.cluster_id","kind":"Value","detail":"Module-level output","documentation":{},"sortText":"10001","preselect":true,"insertText":"$workitem.bp-iks-vpc-gen2-cluster.outputs.cluster_id"}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Jun 27, 2022

The behavior you are seeing is expected. The server fills in details and documentation lazily on a resolve call only for the item selected in the UI. You either need to trigger the resolve call via another command or fill in the properties during the normal completion call.

See https://github.com/gee4vee/lsp-testing-bugs/blob/d2da939e972c75d6e65b794b7666f2a3b0c8218a/server/src/server.ts#L212

I will close the issue. Please ping if something is still unclear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Execution in Software Testing: Exact Process and Plan ...
This exploratory testing is carried out in the application without any test scripts and documentation. It also helps in getting familiar with ...
Read more >
STLC (Software Testing Life Cycle) Phases, Entry, Exit Criteria
Contrary to popular belief, Software Testing is not just a single/isolate ... Test Cycle Closure phase is completion of test execution which ...
Read more >
Test Analysis Report - DoIT
The Test Analysis Report records results of the tests., presents the capabilities and deficiencies for review, and provides a means of assessing software ......
Read more >
Asynchronous Tests and Expectations - Apple Developer
Asynchronous code doesn't execute directly within the current flow of code. ... When you can't use Swift async , use expectations to test...
Read more >
Code completion | PyCharm Documentation - JetBrains
Basic code completion helps you complete the names of classes, methods, and keywords within the visibility scope. When you invoke code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found