Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lockfile to prevent unexpected dependency changes #42

Closed
3 of 5 tasks
joshuacc opened this issue Oct 20, 2022 · 1 comment
Closed
3 of 5 tasks

Add lockfile to prevent unexpected dependency changes #42

joshuacc opened this issue Oct 20, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@joshuacc
Copy link
Owner

joshuacc commented Oct 20, 2022

Because ahkpm uses git for dependencies, almost everything that we rely on to identify the correct version of a dependency's code is mutable. That means that if a user reinstalls branch:main, the code may have changed out from under the user without their knowledge. To mitigate this, we should add a lockfile (ahkpm.lock?) which records, at a minimum, the exact commit that a dependency resolved to when it was first installed. And when reinstalling that dependency, we should use that commit rather than whatever commit version identifier now resolves to.

Upgrading direct dependencies should be a conscious choice, not accidental or automatic.

This involves the following:

  • Deciding on a lockfile format
  • Recording/updating the lockfile on installations
  • Install purely from the lockfile if there are no dependency changes
  • Using the contents of the lockfile to guide ahkpm install when a dependency's version has changed
  • Using the contents of the lockfile to guide ahkpm install when there is a new dependency
@joshuacc
Copy link
Owner Author

joshuacc commented Nov 1, 2022

With #74 merged, the biggest risk and annoyance has been mitigated, I am closing this as done. However, I am also opening #75 to continue tracking the remaining pieces.

@joshuacc joshuacc closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant