Conversation
def source(source, *args, &blk) | ||
options = args.last.is_a?(Hash) ? args.pop.dup : {} | ||
options = normalize_hash(options) | ||
if options && options.key?("type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options can't be nil here
@@ -38,7 +39,6 @@ module Bundler | |||
autoload :MatchPlatform, "bundler/match_platform" | |||
autoload :Mirror, "bundler/mirror" | |||
autoload :Mirrors, "bundler/mirror" | |||
autoload :Plugin, "bundler/plugin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't this be autoloaded any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/bundler/bundler/pull/4674/files#diff-507c71857bb3b7292c61afb88df1c880L28
This change made starting of bundler
without API::Source
fail
☔ The latest upstream changes (presumably #4700) made this pull request unmergeable. Please resolve the merge conflicts. |
@@ -197,7 +197,16 @@ def load_plugin(name) | |||
# done to avoid conflicts | |||
path = index.plugin_path(name) | |||
|
|||
if insert_index = Bundler.rubygems.load_path_insert_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just be #activate
ing the spec here, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or using spec.add_self_to_load_path
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do that. But couldn't find a way to get spec
here.
Even if I store the spec's locations, add_self_to_load_path
depended on full_gem_path
, which itself depended on source
.
The alternative to hard coded lib
is, we can store the full_required_paths
with index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to do something, since it is totally valid for a gem to have a require path that isn't lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am working on extending the serializer to work with array. As soon as I get around that, will fix this.
@asutoshpalai I was trying to edit |
@allenzhao Yes, right! Sorry, will fix that with the next push! |
69bf74b
to
85d2a99
Compare
@asutoshpalai @indirect is this ready to merge? |
@homu r+ |
📌 Commit 57e8172 has been approved by |
[Plugin] Source plugins Adds source plugin. This is in continuation of #4608.
☀️ Test successful - status |
Adds source plugin. This is in continuation of #4608.