Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

Apparently Rust allows split implementations of a struct across files for a module. So moved all the extension specific code into separate files. No functional change.

@SteveL-MSFT SteveL-MSFT requested review from Copilot and tgauth August 16, 2025 23:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the extensions code by splitting the DscExtension implementation across separate files to improve code organization. No functional changes are made to the existing functionality.

Key changes:

  • Split extension methods into capability-specific files
  • Moved implementation code from dscextension.rs to dedicated files
  • Added necessary imports to each new implementation file

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
dsc_lib/src/extensions/dscextension.rs Removed extension method implementations and helper functions, kept core struct definition
dsc_lib/src/extensions/discover.rs Added discovery capability implementation with imports and helper code
dsc_lib/src/extensions/import.rs Added import capability implementation with imports and helper code
dsc_lib/src/extensions/secret.rs Added secret capability implementation with imports and helper code

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Aug 18, 2025
Merged via the queue into PowerShell:main with commit 0a65344 Aug 18, 2025
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the extension-refactor branch August 18, 2025 16:14
SteveL-MSFT pushed a commit to SteveL-MSFT/DSC that referenced this pull request Dec 1, 2025
Fix merge conflict

----
#### AI description  (iteration 1)
#### PR Classification
This pull request is a preview release that refactors extension API implementations and improves build/CI processes.

#### PR Summary
The release reorganizes extension functionalities by moving the discover, import, and secret logic from a central file into dedicated modules, while enhancing build scripts and pipeline configuration for more robust releases.
- `src/extensions/dscextension.rs`: Removed legacy implementations of extension methods (discover, import, secret) and their helper functions.
- `src/extensions/import.rs`, `src/extensions/secret.rs`, `src/extensions/discover.rs`: Introduced modular implementations with corresponding helper functions to streamline extension handling.
- `build.ps1` and tree-sitter build scripts: Improved error handling, verbose logging, and dependency installation checks.
- CI pipeline files (e.g., `.pipelines/DSC-Official.yml`, `.pipelines/DSC-Windows.yml`, and `.cargo/config.toml`): Updated parameters, token references, and target/linker settings to support multi-architecture builds.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

Related work items: PowerShell#1056, PowerShell#1059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants