Better caching during installations/pkgDeps#152
Merged
Conversation
type was collected by Install()/Require() but never threaded into the pak backbone, so pak did its default binary-preferring resolution. On Windows/Mac, when CRAN has the new source (e.g. reproducible 3.1.0) but only the old binary (3.0.0), pak would keep/install the stale binary -- either a no-op or a silent downgrade -- ignoring an explicit type="source". Thread type into pakDepsToPkgDT + pakInstallFiltered and pin pkg.platforms="source" for the resolve+install when type=="source" (pak ignores base R's pkgType; pkgdepends' platforms config is the real knob). on.exit restores prior options. No behavior change unless type is explicitly "source". PR #151's detection/warning unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The first fix threaded type into the pak path, but pakDepsCacheKey()
keyed only on {pkgs, wh, repos, userPkgs}. A type="source" call landed
on a stale binary-era cached pak_result (observed: "using cache (11
packages, 3.7h old)"), so pak::pkg_deps never re-ran under
pkg.platforms="source": deps got rebuilt from source but reproducible
itself was "kept" at the old 3.0.0 plan -> still the binary-lag
downgrade, with the same misleading "could not be installed" warning.
Fold a source-only discriminator into the cache key and thread type
through pakDepsResolve + pakDepsCacheInvalidate so read and invalidate
use the same key. Binary/both callers keep one shared key (one-time
miss on upgrade); source calls now miss the binary entry and re-resolve.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.