Support `UseCachedPackages` flag to prioritize existing local files during installation

Open
#1,044 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
cli, tooling

Research direction

Start by tracing the zpm "install <module>" flow and how configuration flags are read. Inspect the standard <INSTALLEDDIR>/ipm/<module>/<version>/ path and the module.xml validation used during installation. Done means the default still downloads, while UseCachedPackages=1 uses a valid local package and falls back to the registry when it is absent or invalid.

Written by the indexing model from the issue text.

Description

Description

Currently, when a module is uninstalled via IPM, the physical source files often remain in the installation directory (e.g., <INSTALLEDDIR>/ipm/<module>/<version>/). However, if a user attempts to install that same module/version again, IPM ignores the existing local files and initiates a fresh download from the remote registry.

Proposed Solution

I propose a new configuration setting that allows IPM to detect and use existing local source files instead of redownloading them.

Name: UseCachedPackages

Logic:
When running zpm "install <module>":

  1. Check Setting: If UseCachedPackages is set to 1.
  2. Local Scan: IPM checks if the directory <INSTALLEDDIR>/ipm/<module>/<version>/ exists and contains a valid module.xml.
  3. Action:
  • If Local Files Exist: IPM skips download from registry and proceeds directly to loading/compiling the existing local files (similar to a load command).
  • If Local Files Do Not Exist: IPM performs the standard download from the registry.
Requested Flag Behavior:
  • 0 (Default): Maintain current behavior (always fetch from registry).
  • 1: Prefer local files if they exist in the standard IPM directory.
Dominant language
ObjectScript
Stars
41
Forks
33
Avg merge
23h 20m
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intersystems/ipm

All issues in intersystems/ipm

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.