[Discussion] Multiple package version support in pkgm, potential problems and feature creep

Open
#29 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
cli

Research direction

Start by reading issue #24 and the discussion about the planned uninstall feature. The issue identifies /usr/local/bin and /usr/local/lib as affected paths but names no implementation files or tests; work is not defined until the version-support policy is decided.

Written by the indexing model from the issue text.

Description

Following from #24 (which we cannot rely upon packages following semver unfortunately) I have hit several other issues thinking about this. I think we need to clarify this before #24 and starting an uninstall feature.

How do we want to support multiple versions?

some points:

  1. There can only be one version linked in /usr/local/bin using the packages name. Do we make it the highest version installed? how to run other versions?
  2. make symbolic links for /usr/local/bin/package-version/usr/local/pkgs/package folder/version/package-bin
  3. 2 above this would have to be done with other binaries in a package if they are made available. (pkgx. ‘provides:’ ?)
  4. 1 and 2 would also have to be done with libraries on /usr/local/lib
  5. If we want to support multiple versions how would this work with upgrades, upgrade only x or x.x what about patch versions ?
  6. How to keep versions we want to keep? Add a pin feature to stop upgrading and pruning of certain installed versions?
  7. do we want to be able to switch default version e.g change the symbolic link on /usr/local/bin/package
  8. How to deal with packages and versions removed from the pantry

As you can see this starts to become very messy and increases complexity.
Perhaps we only should have one version for each package or perhaps only the major or major and minor?
or perhaps only allow multiple versions for certain packages?

With libraries I would hope that libraries would be on path in the env and /usr/local/lib is just a fallback.
But we would have to think about this because its probably more likely that we want multiple versions of libraries.

Will pkgx's pantry be keeping multiple versions of everything?
I doubt it, maybe libraries, compilers and interpreters for an extended period of time.

Dominant language
TypeScript
Stars
60
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 pkgxdev/pkgm

All issues in pkgxdev/pkgm

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.