DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Need a way to extract DSC resource schema for IntelliSense scenario

Open anmenaga opened this issue 2 years ago • 3 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

For configuration example below, there should be a way to call dsc.exe to request schema for types PowerShellGet/MSFT_PSRepository and TestFileDscResource/FileResource (that are handled by DSC/PowerShellGroup resource provider) to be used in IntelliSense when authoring configurations with these types.

- name: Get info from classic DSC resources
  type: DSC/PowerShellGroup
  properties:
    resources:
    - name: Get PS Repository Info
      type: PowerShellGet/MSFT_PSRepository
      properties:
        Name: PSGallery
    - name: Check File
      type: TestFileDscResource/FileResource
      properties:
        Path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
        Ensure: Present

Expected behavior

`dsc.exe` should be able to return schema for resources that are processed by resource providers.

Actual behavior

Currently this is not implemented.

Error details

No response

Environment data

v1.

Version

v1

Visuals

No response

anmenaga avatar May 10 '23 22:05 anmenaga

Related to #78

Bpoe avatar May 17 '23 00:05 Bpoe

For the editor, would we deliver this through the existing PowerShell extension or should we publish a new language extension for DSC?

mgreenegit avatar Jun 21 '23 16:06 mgreenegit

It's probably more work, but if part of the goal for the project is to move DSC beyond "a PowerShell thing", I think a separate extension is going to be important in the long run. That would also allow the extension to ship with a vendored DSC executable specific to that version of the extension instead of relying on the locally installed version, that sort of thing.

michaeltlombardi avatar Jun 22 '23 14:06 michaeltlombardi

Fixed using PSAdapter cache; used in VS Code Extention #448

anmenaga avatar Jul 11 '24 00:07 anmenaga