chaseruskin / legoHDL

An experimental package manager and development tool for Hardware Description Languages (HDL).
https://c-rus.github.io/legoHDL
MIT License
14 stars 2 forks source link

Update partial version installations on uninstall #52

Closed chaseruskin closed 2 months ago

chaseruskin commented 2 years ago

The following will describe a scenario to illustrate this issue.

Versions 1.1.4 and 1.0.5 both exist as installations. Partial versions v1 and v1.1 point to v1.1.4, and partial version v1.0 points to v1.0.5. If a user were to uninstall v1.1.4, the pointer is no longer valid for v1 and v1.1. So,

This updates the partial version pointers when a specific version is uninstalled from the workspace cache.

chaseruskin commented 2 years ago

Some preliminary steps:

  1. Get the list of specific versions installed.

  2. Add constraints to the list based on the partial version in question (example: only look at [v1:v2] if a v1.x.x was uninstalled).

  3. Check if a version exists that can satisfy the constraint.

If so -> install version as the partial version.

Else -> do not replace partial version (does not exist anymore).