Skip to content

Add deprecation message to use of copy#1430

Merged
SteveL-MSFT merged 2 commits into
PowerShell:mainfrom
SteveL-MSFT:deprecate-copy
Mar 14, 2026
Merged

Add deprecation message to use of copy#1430
SteveL-MSFT merged 2 commits into
PowerShell:mainfrom
SteveL-MSFT:deprecate-copy

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

PR Summary

As discussed in WG, mark copy as deprecated

PR Context

Fix #1429

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Marks use of the copy loop construct in configuration documents as deprecated by emitting a warning during config validation, and adds a regression test to ensure the warning is surfaced to users.

Changes:

  • Emit a localized warning when a resource contains a copy block.
  • Add an English locale string for the deprecation warning message.
  • Add a PowerShell test asserting the warning appears on stderr when copy is used.

Reviewed changes

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

File Description
lib/dsc-lib/src/configure/mod.rs Emits a warning when validating a config that contains copy.
lib/dsc-lib/locales/en-us.toml Adds the localized deprecation warning string.
dsc/tests/dsc_copy.tests.ps1 Adds a test that verifies copy triggers a deprecation warning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread lib/dsc-lib/src/configure/mod.rs
Comment thread lib/dsc-lib/locales/en-us.toml Outdated
Comment thread dsc/tests/dsc_copy.tests.ps1 Outdated
@SteveL-MSFT SteveL-MSFT requested review from Gijsreyn and tgauth March 12, 2026 23:12
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Mar 14, 2026
Merged via the queue into PowerShell:main with commit 97ba9cb Mar 14, 2026
19 checks passed
@SteveL-MSFT SteveL-MSFT deleted the deprecate-copy branch March 14, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark copy as deprecated

3 participants