Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Q# Code Actions in Visual Studio Code are not included as "Quick Fixes" #1268

Open
@guenp

Description

@guenp

Describe the bug

Code actions do not work. When hovering over a code warning, the pop up says "no fixes available".

Screenshot 2021-11-23 100314

The following error is displayed in the logs:

[2021-11-23 09:09:58.889] [exthost] [warning] quantum.quantum-devkit-vscode - Code actions of kind 'quickfix 'requested but returned code action does not have a 'kind'. Code action will be dropped. Please set 'CodeAction.kind'.

To Reproduce

Create a new file with the following contents and hover over "using":

namespace Qrng {
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Canon;

    operation Name(target : Qubit) : Unit
    is Adj + Ctl {
        using q = Qubit() {
            foo bar baz;
        }
    }

}

Expected behavior

I expect to see a light bulb with a code action drop down.

System information

  • Visual Studio Code extension v0.21.2111.177148
  • Windows 11

Additional context

This issue was also seen on the previous version v0.20.2110

Metadata

Metadata

Assignees

Labels

area: editorExtensions for Visual Studio and Visual Studio CodebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions