-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add a Podfile option to reuse an external source specification #585
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,7 @@ def abstract=(abstract) | |
# @return [String] the inheritance mode for this target definition. | ||
# | ||
def inheritance | ||
get_hash_value('inheritance', 'complete') | ||
get_hash_value('inheritance') || 'complete' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why these changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed several getters to avoid mutating the hash because iterating over deps mutated them. The code assumed, previously, (and implicitly) that deps only get evaluated after the However, going over previously added deps before the entire There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍. Is there a test that will fail if we accidentally go back to the old behavior later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. want to continue this @igor-makarov ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hadn't had the time to think about this yet.. Sorry 😭 |
||
end | ||
|
||
# Sets the inheritance mode for this target definition. | ||
|
@@ -907,7 +907,7 @@ def get_hash_value(key, base_value = nil) | |
unless HASH_KEYS.include?(key) | ||
raise StandardError, "Unsupported hash key `#{key}`" | ||
end | ||
internal_hash[key] = base_value if internal_hash[key].nil? | ||
internal_hash[key] ||= base_value unless base_value.nil? | ||
internal_hash[key] | ||
end | ||
|
||
|
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.
how will this linear scan perform on very large podfiled?
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.
There's a bit of a Shlemiel effect here, but ultimately it's all done in-memory and my profiling for 70 total pods shows an increase from 3% samples to 7%.
What do you think? Should I optimize now or can this be done later? I mean, I've made several optimizations recently that outweigh this by a margin 😂
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.
Probably fine for now, but we might want to eventually put it in a hash for constant-time lookup