Add detailed file-level logging to unpack command#252
Merged
danielmeppiel merged 5 commits intomainfrom Mar 12, 2026
Merged
Conversation
- Add dependency_files and skipped_count to UnpackResult - Show per-dependency file tree in unpack output (tree-style, consistent with install) - Log source -> target header, per-file destinations, and skipped files warning - Add unit tests for new fields and CLI logging output (20 tests, all passing) Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
…nsistently Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances apm unpack to emit per-dependency, tree-style file listings (similar to apm install) instead of only a final summary, by tracking deployed files per dependency during bundle unpacking.
Changes:
- Extend
UnpackResultto includedependency_filesandskipped_count, and populate these duringunpack_bundle(). - Update
apm unpackCLI output to print per-dependency file lists and warn when files are skipped due to--skip-verify. - Add unit tests covering dependency-level file tracking, skipped counts, and CLI output expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/apm_cli/bundle/unpacker.py |
Adds per-dependency file mapping + skipped-file counting to support detailed unpack logging. |
src/apm_cli/commands/pack.py |
Implements tree-style per-dependency logging for apm unpack output. |
tests/unit/test_unpacker.py |
Adds new unit tests for dependency_files, skipped_count, and unpack command logging output. |
Collaborator
|
@copilot address pr review comments |
…ed import, add virtual dep test Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Contributor
Author
All three review comments addressed in b574d32:
|
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
Adds verbose, per-dependency file-level logging to
apm unpack, consistent with the tree-style output used byapm install. Previously, the unpack command only showed a final summary count — now it shows exactly where each file is copied, grouped by dependency.Before:
After:
No emojis used in any output. Logging aesthetics are consistent with
apm install's tree-style (└─) pattern. Dependencies are keyed byget_unique_key()to correctly handle virtual dependencies (samerepo_urlwith differentvirtual_path).Type of change
Testing
New tests added (10):
test_unpack_dependency_files_single_dep— verifiesdependency_filesmaps repo_url to deployed filestest_unpack_dependency_files_multiple_deps— multi-dependency file trackingtest_unpack_dependency_files_virtual_deps— virtual deps from the same repo are tracked separately viaget_unique_key()test_unpack_dependency_files_dry_run—dependency_filespopulated in dry-runtest_unpack_skipped_count— tracks missing files withskip_verifytest_unpack_skipped_count_zero_when_all_present— zero skipped when completetest_unpack_cmd_logs_file_list— CLI output includes dependency name and file pathstest_unpack_cmd_dry_run_logs_files— dry-run CLI shows per-dependency breakdowntest_unpack_cmd_logs_skipped_files— skipped files warning in CLI outputtest_unpack_cmd_multi_dep_logging— multi-dependency CLI output📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.