Conversation
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (6)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
There was a problem hiding this comment.
Pull request overview
Implements support for deprecated packs by (1) adding a --deprecated option to the list command and (2) skipping downloads of deprecated PDSC files during init/update-index workflows.
Changes:
- Added
PdscTag.IsDeprecated()plus unit tests to interpret thedeprecated="YYYY-MM-DD"attribute. - Updated public-index download flows to optionally skip deprecated PDSC files, with installer test coverage.
- Added
list --deprecated/-dto show only deprecated packs from the public index (and hide deprecated packs by default in--publiclisting), plus updated design docs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/xml/pidx.go | Adds PdscTag.IsDeprecated() to evaluate deprecation based on a date string. |
| cmd/xml/pidx_test.go | Adds unit tests for IsDeprecated() date handling. |
| cmd/installer/root.go | Threads “skip deprecated” through index update / PDSC download paths; hides deprecated packs by default in public listing. |
| cmd/installer/root_test.go | Extends UpdatePublicIndex tests and adds coverage for skipping deprecated PDSCs during mass download. |
| cmd/installer/root_pack_list_test.go | Adds tests asserting deprecated packs are hidden/shown appropriately in list --public output. |
| cmd/commands/list.go | Introduces --deprecated/-d flag and wires it into ListInstalledPacks. |
| cmd/commands/update_index.go | Passes the new “skip deprecated” argument into UpdatePublicIndex for update-index behavior. |
| cmd/commands/init.go | Enables skipping deprecated PDSCs for init flows. |
| cmd/commands/root.go | Updates automatic index refresh call to include the new argument. |
| DESIGN.md | Documents new list behavior and skipping deprecated PDSC downloads. |
Comments suppressed due to low confidence (1)
cmd/installer/root.go:993
skipDeprecatedPdscFilesis currently only applied toDownloadPDSCFiles. Whensparseis false,UpdatePublicIndexcan still download updated PDSC files viaUpdateInstalledPDSCFiles(e.g., for deprecated packs already present in the cache index). If the intent is thatupdate-index/init -aignore deprecated<pdsc>entries entirely, consider propagatingskipDeprecatedPdscFilesinto the update path as well and filtering deprecated tags there too.
func UpdatePublicIndex(indexPath string, sparse, downloadPdsc, downloadRemainingPdscFiles, skipDeprecatedPdscFiles, updatePrivatePdsc, showInfo, insecureSkipVerify bool, concurrency int, timeout int) error {
// For backwards compatibility, allow indexPath to be a file, but ideally it should be empty
if indexPath == "" {
indexPath = strings.TrimSuffix(Installation.PublicIndexXML.URL, "/") + "/" + PublicIndexName
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/Open-CMSIS-Pack/cpackget/sessions/8327d776-f919-4106-9979-0892fca6c310 Co-authored-by: bgn42 <92579424+bgn42@users.noreply.github.com>
jkrech
left a comment
There was a problem hiding this comment.
I have installed the CI build for windows and validated the behavior:
a) the additional option -d and --deprecated are listed in the usage for cpackget list -h
b) cpackget list lists installed packs
cpackget list --public lists public packs (.Web/index.pidx) + indicator for installed
cpackget list --deprecated lists public deprecated packs (.Web/index.pidx) + indicator for installed
if specifying --public and --deprecated at the same time - only deprecated packs are listed
c) cpackget update-index -all-pdsc-files has been changed to exclude pdsc files of deprecated public packs. The description of the usage/help text must be modified
d) Question: does uVision pack installer require cpackget to download all pdsc files including the deprecated packs? This option does not currently exist. The packinstaller has a selection button to display deprecated packs in addition.
This would require an option like cpackget update-index --all-pdsc-files --deprecated

Fixes
fix #246
Changes
DownloadPDSCFilesso encoded progress reporting accurately reflects the actual number of downloadsIsDeprecated()once per entry in thelist --publicloop to avoid redundant date parsingDownloadPDSCFilesdoc comment to document theskipDeprecatedPdscFilesparameterChecklist