Skip to content

Add deprecation message to use of copy#1430

Open
SteveL-MSFT wants to merge 2 commits intoPowerShell:mainfrom
SteveL-MSFT:deprecate-copy
Open

Add deprecation message to use of copy#1430
SteveL-MSFT wants to merge 2 commits intoPowerShell:mainfrom
SteveL-MSFT:deprecate-copy

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

As discussed in WG, mark copy as deprecated

PR Context

Fix #1429

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

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.

@SteveL-MSFT SteveL-MSFT requested review from Gijsreyn and tgauth March 12, 2026 23:12
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

2 participants