Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
e44c4258
Commit
e44c4258
authored
Feb 20, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide installation option to disable multiple pod sources warnings
parent
eca73fda
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
CHANGELOG.md
CHANGELOG.md
+4
-0
installation_options.rb
lib/cocoapods/installer/installation_options.rb
+1
-0
resolver.rb
lib/cocoapods/resolver.rb
+5
-1
lazy_specification.rb
lib/cocoapods/resolver/lazy_specification.rb
+10
-8
installation_options_spec.rb
spec/unit/installer/installation_options_spec.rb
+1
-0
No files found.
CHANGELOG.md
View file @
e44c4258
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6534
](
https://github.com/CocoaPods/CocoaPods/issues/6534
)
[
#6534
](
https://github.com/CocoaPods/CocoaPods/issues/6534
)
*
Provide installation option to disable multiple pod sources warnings.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6497
](
https://github.com/CocoaPods/CocoaPods/pull/6497
)
*
Use the colored2 gem instead of colored.
*
Use the colored2 gem instead of colored.
[
Orta Therox
](
https://github.com/orta
)
[
Orta Therox
](
https://github.com/orta
)
[
xcodeproj#463
](
https://github.com/CocoaPods/Xcodeproj/pull/463
)
[
xcodeproj#463
](
https://github.com/CocoaPods/Xcodeproj/pull/463
)
...
...
lib/cocoapods/installer/installation_options.rb
View file @
e44c4258
...
@@ -106,6 +106,7 @@ module Pod
...
@@ -106,6 +106,7 @@ module Pod
option
:deterministic_uuids
,
true
option
:deterministic_uuids
,
true
option
:integrate_targets
,
true
option
:integrate_targets
,
true
option
:lock_pod_sources
,
true
option
:lock_pod_sources
,
true
option
:warn_for_multiple_pod_sources
,
true
option
:share_schemes_for_development_pods
,
false
option
:share_schemes_for_development_pods
,
false
module
Mixin
module
Mixin
...
...
lib/cocoapods/resolver.rb
View file @
e44c4258
...
@@ -6,6 +6,10 @@ module Pod
...
@@ -6,6 +6,10 @@ module Pod
# by target for a given Podfile.
# by target for a given Podfile.
#
#
class
Resolver
class
Resolver
include
Pod
::
Installer
::
InstallationOptions
::
Mixin
delegate_installation_options
{
podfile
}
# @return [Sandbox] the Sandbox used by the resolver to find external
# @return [Sandbox] the Sandbox used by the resolver to find external
# dependencies.
# dependencies.
#
#
...
@@ -288,7 +292,7 @@ module Pod
...
@@ -288,7 +292,7 @@ module Pod
def
specifications_for_dependency
(
dependency
,
additional_requirements
=
[])
def
specifications_for_dependency
(
dependency
,
additional_requirements
=
[])
requirement
=
Requirement
.
new
(
dependency
.
requirement
.
as_list
+
additional_requirements
)
requirement
=
Requirement
.
new
(
dependency
.
requirement
.
as_list
+
additional_requirements
)
find_cached_set
(
dependency
).
find_cached_set
(
dependency
).
all_specifications
.
all_specifications
(
installation_options
.
warn_for_multiple_pod_sources
)
.
select
{
|
s
|
requirement
.
satisfied_by?
s
.
version
}.
select
{
|
s
|
requirement
.
satisfied_by?
s
.
version
}.
map
{
|
s
|
s
.
subspec_by_name
(
dependency
.
name
,
false
)
}.
map
{
|
s
|
s
.
subspec_by_name
(
dependency
.
name
,
false
)
}.
compact
.
compact
.
...
...
lib/cocoapods/resolver/lazy_specification.rb
View file @
e44c4258
...
@@ -32,12 +32,12 @@ module Pod
...
@@ -32,12 +32,12 @@ module Pod
end
end
class
External
class
External
def
all_specifications
def
all_specifications
(
_warn_for_multiple_pod_sources
)
[
specification
]
[
specification
]
end
end
end
end
def
all_specifications
def
all_specifications
(
warn_for_multiple_pod_sources
)
@all_specifications
||=
begin
@all_specifications
||=
begin
sources_by_version
=
{}
sources_by_version
=
{}
versions_by_source
.
each
do
|
source
,
versions
|
versions_by_source
.
each
do
|
source
,
versions
|
...
@@ -45,13 +45,15 @@ module Pod
...
@@ -45,13 +45,15 @@ module Pod
sources_by_version
sources_by_version
end
end
duplicate_versions
=
sources_by_version
.
select
{
|
_version
,
sources
|
sources
.
count
>
1
}
if
warn_for_multiple_pod_sources
duplicate_versions
=
sources_by_version
.
select
{
|
_version
,
sources
|
sources
.
count
>
1
}
duplicate_versions
.
each
do
|
version
,
sources
|
duplicate_versions
.
each
do
|
version
,
sources
|
UI
.
warn
"Found multiple specifications for `
#{
name
}
(
#{
version
}
)`:
\n
"
+
UI
.
warn
"Found multiple specifications for `
#{
name
}
(
#{
version
}
)`:
\n
"
+
sources
.
sources
.
map
{
|
s
|
s
.
specification_path
(
name
,
version
)
}.
map
{
|
s
|
s
.
specification_path
(
name
,
version
)
}.
map
{
|
v
|
"-
#{
v
}
"
}.
join
(
"
\n
"
)
map
{
|
v
|
"-
#{
v
}
"
}.
join
(
"
\n
"
)
end
end
end
versions_by_source
.
flat_map
do
|
source
,
versions
|
versions_by_source
.
flat_map
do
|
source
,
versions
|
...
...
spec/unit/installer/installation_options_spec.rb
View file @
e44c4258
...
@@ -63,6 +63,7 @@ module Pod
...
@@ -63,6 +63,7 @@ module Pod
'deterministic_uuids'
=>
false
,
'deterministic_uuids'
=>
false
,
'integrate_targets'
=>
true
,
'integrate_targets'
=>
true
,
'lock_pod_sources'
=>
true
,
'lock_pod_sources'
=>
true
,
'warn_for_multiple_pod_sources'
=>
true
,
'share_schemes_for_development_pods'
=>
false
,
'share_schemes_for_development_pods'
=>
false
,
}
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment