microsoft / winget-dsc

MIT License
23 stars 14 forks source link

Make bootstrapping an IDE easier #117

Closed Trenly closed 1 week ago

Trenly commented 2 weeks ago
Microsoft Reviewers: Open in CodeFlow
Trenly commented 2 weeks ago

@denelon

denelon commented 2 weeks ago

Hey, would you be interested in building a WinGet Configuration for folks that would ensure VSCode and the extension is installed?

I'm going to update the guidance in the future, so for now I'd put one as "./configurations/configuration.dsc.yaml" And I'd put a copy of it under the new location in the future as well. I'm still talking with @crutkas and others about the new guidance.

We're going to suggest using the ".winget" extension for the configuration files in Git based projects. I think Clint was suggesting using the ".config" directory, but I didn't want to step on anything there by adding another "*.yaml" file. I've also seen a PR to add ".winget" as a YAML extension in VSCode.

Trenly commented 2 weeks ago

Yep! I can do that

denelon commented 2 weeks ago

The ID is displayed in the output of the run which is nice as well:

image

It might be worth adding ids for the extensions.

denelon commented 2 weeks ago

It worked on my local x64 device (some of the components were already installed): image

Next, I'll test in Windows Sandbox.

Trenly commented 2 weeks ago

I could probably shorten some of the IDs too

denelon commented 2 weeks ago

It looks like it might not be installing the extensions.

Can you verify on your end if they are appearing? It might be how the Sandbox WDAGUtility account is administrator or something else might be broken on my end.

image

Trenly commented 2 weeks ago

Will check

Trenly commented 2 weeks ago

@denelon - It does not install the extensions for me. So, I switched over to using the Microsoft.VSCode.DSC module in this repo. . . . and they still don't install. Doesn't matter if VSCode is open or closed.

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Get -Property @{Name='redhat.vscode-yaml'}

Name               Version Exist Insiders
----               ------- ----- --------
redhat.vscode-yaml 1.15.0   True    False

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Test -Property @{Name='redhat.vscode-yaml'}

InDesiredState
--------------
          True

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Get -Property @{Name='EditorConfig.EditorConfig'}

Name                      Version Exist Insiders
----                      ------- ----- --------
EditorConfig.EditorConfig         False    False

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method test -Property @{Name='EditorConfig.EditorConfig'}

InDesiredState
--------------
         False

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method set -Property @{Name='EditorConfig.EditorConfig'}

RebootRequired
--------------
         False

PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method test -Property @{Name='EditorConfig.EditorConfig'}

InDesiredState
--------------
         False
denelon commented 2 weeks ago

OK, so it looks like we have a bug to go chase down.

Trenly commented 2 weeks ago

Given that it isn't a bug with the configuration file, but a bug in the DSC Resource, should this wait to merge?

denelon commented 1 week ago

Do you want me to go ahead and merge it since we have a bug on the module already created? I'm fine with that since the blast radius is small right now.

Trenly commented 1 week ago

I think that would be great @denelon

ryfu-msft commented 1 week ago

/azp run

azure-pipelines[bot] commented 1 week ago
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
Trenly commented 1 week ago

The yaml looks good to me so lets go ahead and get this checked in. I'll look into fixing the bug for VSCode dsc.

Already raised a PR to fix it