-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Canonicalize $BUNDLE_PATH in cache keys
Ref: heroku/heroku-buildpack-ruby#979 Heroku buildpacks build the application in one location and then move it elsewhere. This cause all the paths to change, hence all bootsnap cache keys to be invalidated. By replacing $BUNDLE_PATH by a constant string in the cache keys, we allow the bundler directory to be moved without flushing the cache. Ideally we'd use a similar substitution for the "app root", but I need to put more thoughts into it, as I'm not too sure how best to infer it.
- Loading branch information
Showing
3 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,10 @@ def bundler? | |
|
||
false | ||
end | ||
|
||
BUNDLE_PATH = if bundler? | ||
-(Bundler.bundle_path.cleanpath.to_s << '/') | ||
else | ||
nil | ||
end | ||
end |
This file contains 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