Skip to content

Move cross platform DSC code to a subsystem - #15127

Merged
Aditya Patwardhan (adityapatwardhan) merged 19 commits into
PowerShell:masterfrom
anmenaga:DscSubsystem1
May 21, 2021
Merged

Move cross platform DSC code to a subsystem#15127
Aditya Patwardhan (adityapatwardhan) merged 19 commits into
PowerShell:masterfrom
anmenaga:DscSubsystem1

Conversation

@anmenaga

Copy link
Copy Markdown

PR Summary

This work is in the context of Minimal PowerShell.
Cross platform DSC code that was in System.Management.Automation.dll is extracted as a PowerShell subsystem (this PR) and moved to a new Microsoft.PowerShell.DscSubsystem.dll to be shipped with PSDesiredStateConfiguration v3 module (PR in PSDesiredStateConfiguration repo).

PR Context

This PR is following guidelines from subsystem architecture document:

  • Cross platform DSC code is removed from System.Management.Automation.dll and placed into a new Microsoft.PowerShell.DscSubsystem.dll in PSDesiredStateConfiguration v3 module.
  • Subsystem interface ICrossPlatformDsc is defined in SMA and implemented in Microsoft.PowerShell.DscSubsystem.dll
  • Subsystem registration happens dynamically with the help of IModuleAssemblyInitializer.OnImport (implemented in Microsoft.PowerShell.DscSubsystem.dll) when PSDesiredStateConfiguration v3 module is loaded.

PR Checklist

@iSazonov

Copy link
Copy Markdown
Collaborator

Cross platform DSC code is removed from System.Management.Automation.dll and placed into a new Microsoft.PowerShell.DscSubsystem.dll in PSDesiredStateConfiguration v3 module.

Why not move the old code too?

@anmenaga

Copy link
Copy Markdown
Author

Ilya (@iSazonov) old code is planned to be removed completely by a separate PR.

@iSazonov

Ilya (iSazonov) commented Apr 1, 2021

Copy link
Copy Markdown
Collaborator

Ilya (@iSazonov) old code is planned to be removed completely by a separate PR.

And the experimental "PS7DscSupport" flag too? Release will contain only new code?

PSDesiredStateConfiguration v3 module (PR in PSDesiredStateConfiguration repo).

Private repo? Is a plan to make public?

@TravisEz13

Copy link
Copy Markdown
Member

Will this be backported anywhere?

@anmenaga

Copy link
Copy Markdown
Author

And the experimental "PS7DscSupport" flag too? Release will contain only new code?

The current plan is: "yes" to both questions.

Private repo? Is a plan to make public?

Yes, the plan is to make it public.

@anmenaga

Copy link
Copy Markdown
Author

Will this be backported anywhere?

Good question; At this point I don't see a strong reason for backporting, considering GC is happy as it currently is without the backport.

Comment thread src/System.Management.Automation/engine/parser/Parser.cs Outdated
Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs Outdated
Comment thread src/System.Management.Automation/resources/ParserStrings.resx Outdated
@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Apr 20, 2021
@ghost ghost added the Stale label May 5, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

@adityapatwardhan

Copy link
Copy Markdown
Member

Andrew (@anmenaga) Please resolve merge conflicts.

@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label May 11, 2021
@adityapatwardhan

Copy link
Copy Markdown
Member

Andrew (@anmenaga) Please respond to comment from Dongbo: #15127 (comment)

@anmenaga

Copy link
Copy Markdown
Author

Updated according to offline discussion with Dongbo and Steve. Dongbo Wang (@daxian-dbw) can you please have another look? Thank you.

Comment thread src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs Outdated
Comment thread test/xUnit/csharp/test_Subsystem.cs
Comment thread test/xUnit/csharp/test_Subsystem.cs
Comment thread test/xUnit/csharp/test_Subsystem.cs
Comment thread test/xUnit/csharp/test_Subsystem.cs Outdated
Comment thread test/xUnit/csharp/test_Subsystem.cs Outdated
@iSazonov

Copy link
Copy Markdown
Collaborator

Andrew (@anmenaga) Great work!

@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants