Include prerelease gems in compact index during incremental update#108
Open
sudoremo wants to merge 1 commit intorubygems:mainfrom
Open
Include prerelease gems in compact index during incremental update#108sudoremo wants to merge 1 commit intorubygems:mainfrom
sudoremo wants to merge 1 commit intorubygems:mainfrom
Conversation
In `update_index`, the call to `update_compact_index` only received `released` specs, excluding prerelease gems from the compact index files (`versions`, `info/<gemname>`). Since modern Bundler prefers the compact index, prerelease gems were effectively invisible after an incremental `--update`. Fix by passing all specs (both released and prerelease) to `update_compact_index`. Fixes rubygems#48
75bc582 to
52966ab
Compare
Author
|
The latest addition should fix all unit tests. |
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.
Summary
Fixes #48.
In
update_index, the call toupdate_compact_indexonly receivedreleasedspecs, excluding prerelease gems from the compact index files (versions,info/<gemname>). Sincebuild_compactdefaults totrueand modern Bundler prefers the compact index over legacy specs files, prerelease gems were effectively invisible after an incrementalgem generate_index --update— even though they were correctly added toprerelease_specs.4.8.gz.The fix passes all specs (both released and prerelease) to
update_compact_index, consistent with howbuild_compact_indexalready handles both during a fullgenerate_index.Changes
lib/rubygems/indexer.rb: Passspecsinstead ofreleasedtoupdate_compact_indextest/rubygems/test_gem_indexer.rb: Add assertions for prerelease gemd-2.2.ain compact index afterupdate_index