Repository navigation
fix(pack): warn about deprecated target keys for plugin-only packages - #3980
Closed
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Closed
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Conversation
…#3965) apm pack read the plugin-manifest targets from raw YAML through manifest_target_restriction, bypassing the deprecation warning owner, so a package without dependencies: never saw the target:, vscode or compilation.target warnings that install and compile print. manifest_target_restriction now takes the manifest path and, when given, reads through ManifestTargetDeclaration.from_manifest, which emits the warnings once per run. Both pack reads (detect_outputs and the plugin manifest producer) pass it. Fixes #3965 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 19, 2026 19:15
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change restoring deprecation warnings for plugin-only apm pack packages.
No open issues 🎉
What changed in this PR
Fixes #3965 by making apm pack emit target deprecation warnings for plugin-only packages through the existing warning owner, matching install and compile behavior.
Changes:
- Adds an optional manifest path to target restriction reads and passes it from both pack call sites.
- Adds real-CLI regression tests for all three deprecated forms, asserting each warning appears exactly once.
- Records the user-visible fix in the changelog.
| File | Description |
|---|---|
tests/integration/test_pack_deprecation_warning_lifecycle.py |
Tests plugin-only pack warnings and generated plugin manifests. |
src/apm_cli/models/manifest_targets.py |
Routes path-aware restriction reads through the existing warning owner. |
src/apm_cli/core/build_orchestrator.py |
Supplies the manifest path at both target-reading call sites. |
CHANGELOG.md |
Documents the restored pack deprecation warnings. |
Review effort: Balanced
7 of 9 tasks
Collaborator
Author
Takeshi Masukawa (takeaship)
pushed a commit
to takeaship/apm
that referenced
this pull request
Nov 20, 2026
…microsoft#3965) Harvested from microsoft#3980. Raw apm.yml readers must pass the manifest path to manifest_target_restriction; only APMPackage-loaded configs may omit it (closed-world guard). Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
apm packon a plugin-only package (nodependencies:) printed none of the 0.37 deprecation warnings fortarget:, thevscodealias, orcompilation.target. Install and compile print them. Pack read the plugin-manifest targets from raw YAML throughmanifest_target_restriction, which bypasses the warning owner. Only the bundle path, which runs whendependencies:exists, went throughAPMPackageand warned.manifest_target_restrictioninmodels/manifest_targets.py(the target-declaration owner) now takes an optional manifest path. When the path is given, it reads throughManifestTargetDeclaration.from_manifest, which emits the warnings once per run through_warn_deprecated_manifest_keys. Both pack reads incore/build_orchestrator.py(detect_outputsand the plugin-manifest producer) pass the path. The per-process dedupe keeps a pack withdependencies:at one warning per key. Docs already say APM warns for these keys, so they need no change.Issue and approved scope
Issue: Fixes #3965
Human scope-approval comment: #3965 (comment)
Does this PR complete the issue, or what remains? It completes the issue. Deprecation timelines are unchanged (out of scope).
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
tests/integration/test_pack_deprecation_warning_lifecycle.pyruns the real CLIapm packon a plugin-only package with each deprecated form:target: claude,codex,targets: [vscode, codex], andcompilation.target. It asserts the exact-replacement warning appears exactly once. All 3 cases fail on main and pass here..venv/bin/python -m pytest -q -n 6 tests/unit/models tests/unit/core/test_build_orchestrator.py tests/unit/test_packer.py tests/unit/integration/test_mcp_integrator*.py: 424 passed.uvx [email protected] check/format --check(src, tests, architecture linter scripts): clean. pylint R0801: 10.00/10.bash scripts/lint-auth-signals.sh: clean.bash scripts/lint-architecture-boundaries.sh: rc 0.Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regenerated