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

TODO: the algorithm and caching mechanism used by pacquet install without lockfile is unnecessarily complicated #133

Open
KSXGitHub opened this issue Sep 28, 2023 · 0 comments

Comments

@KSXGitHub
Copy link
Contributor

KSXGitHub commented Sep 28, 2023

The current algorithm only symlinks after tarball is downloaded, extracted, and installed. But symlink operation does not require target to exist.

There is also a hidden assumption that the linking of dependencies of a package to be only performed after the package is installed. This makes the caching mechanism more complicated and convoluted than necessary: If a cache key is hit, it will wait for the cache value to be available to links its own dependencies (so-called auto_import in the code).

Separating the symlink operations from the tarball download/extract/install operation could potentially speed up the process. It would also allow early returns in case of a cache hit, simplifying the data structure of Cache and the algorithm used by the caching mechanism.

This endeavor should be easier after #128 is completed.

@KSXGitHub KSXGitHub changed the title TODO: fix the algorithm used by pacquet install The algorithm used by pacquet install without lockfile is unnecessarily complicated Sep 30, 2023
@KSXGitHub KSXGitHub changed the title The algorithm used by pacquet install without lockfile is unnecessarily complicated TODO: the algorithm used by pacquet install without lockfile is unnecessarily complicated Sep 30, 2023
@KSXGitHub KSXGitHub changed the title TODO: the algorithm used by pacquet install without lockfile is unnecessarily complicated TODO: the algorithm and caching mechanism used by pacquet install without lockfile is unnecessarily complicated Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant