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
932549bb
Commit
932549bb
authored
Dec 29, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4575 from CocoaPods/fix-duplicate-fwk-check
Unique the list of vendored frameworks.
parents
d21d7ec6
b7fe2a14
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
CHANGELOG.md
CHANGELOG.md
+6
-0
installer.rb
lib/cocoapods/installer.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+23
-1
No files found.
CHANGELOG.md
View file @
932549bb
...
@@ -178,6 +178,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -178,6 +178,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
being unable to set the base configuration XCConfig.
being unable to set the base configuration XCConfig.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
*
Ensure that linking multiple times against the same framework does not trigger
the duplicate module name check for frameworks.
[
Boris Bügling
](
https://github.com/neonichu
)
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#4550
](
https://github.com/CocoaPods/CocoaPods/issues/4550
)
## 0.39.0 (2015-10-09)
## 0.39.0 (2015-10-09)
...
...
lib/cocoapods/installer.rb
View file @
932549bb
...
@@ -390,7 +390,7 @@ module Pod
...
@@ -390,7 +390,7 @@ module Pod
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_targets
.
each
do
|
aggregate_target
|
aggregate_target
.
user_build_configurations
.
keys
.
each
do
|
config
|
aggregate_target
.
user_build_configurations
.
keys
.
each
do
|
config
|
pod_targets
=
aggregate_target
.
pod_targets_for_build_configuration
(
config
)
pod_targets
=
aggregate_target
.
pod_targets_for_build_configuration
(
config
)
vendored_frameworks
=
pod_targets
.
flat_map
(
&
:file_accessors
).
flat_map
(
&
:vendored_frameworks
)
vendored_frameworks
=
pod_targets
.
flat_map
(
&
:file_accessors
).
flat_map
(
&
:vendored_frameworks
)
.
uniq
frameworks
=
vendored_frameworks
.
map
{
|
fw
|
fw
.
basename
(
'.framework'
)
}
frameworks
=
vendored_frameworks
.
map
{
|
fw
|
fw
.
basename
(
'.framework'
)
}
frameworks
+=
pod_targets
.
select
{
|
pt
|
pt
.
should_build?
&&
pt
.
requires_frameworks?
}.
map
(
&
:product_module_name
)
frameworks
+=
pod_targets
.
select
{
|
pt
|
pt
.
should_build?
&&
pt
.
requires_frameworks?
}.
map
(
&
:product_module_name
)
...
...
spec/unit/installer_spec.rb
View file @
932549bb
...
@@ -250,7 +250,10 @@ module Pod
...
@@ -250,7 +250,10 @@ module Pod
describe
'#verify_no_duplicate_framework_names'
do
describe
'#verify_no_duplicate_framework_names'
do
it
'detects duplicate framework names'
do
it
'detects duplicate framework names'
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_frameworks
).
returns
([
Pathname
(
'monkey.framework'
)])
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_frameworks
).
returns
([
Pathname
(
'a/monkey.framework'
)]).
then
.
returns
([
Pathname
(
'b/monkey.framework'
)]).
then
.
returns
([
Pathname
(
'c/monkey.framework'
)])
fixture_path
=
ROOT
+
'spec/fixtures'
fixture_path
=
ROOT
+
'spec/fixtures'
config
.
repos_dir
=
fixture_path
+
'spec-repos'
config
.
repos_dir
=
fixture_path
+
'spec-repos'
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
...
@@ -266,6 +269,25 @@ module Pod
...
@@ -266,6 +269,25 @@ module Pod
@installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
,
lockfile
)
@installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
,
lockfile
)
should
.
raise
(
Informative
)
{
@installer
.
install!
}.
message
.
should
.
match
/conflict.*monkey/
should
.
raise
(
Informative
)
{
@installer
.
install!
}.
message
.
should
.
match
/conflict.*monkey/
end
end
it
'allows duplicate references to the same expanded framework path'
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_frameworks
).
returns
([
fixture
(
'monkey/dynamic-monkey.framework'
)])
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:dynamic_binary?
).
returns
(
true
)
fixture_path
=
ROOT
+
'spec/fixtures'
config
.
repos_dir
=
fixture_path
+
'spec-repos'
podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
,
'8.0'
xcodeproj
'SampleProject/SampleProject'
use_frameworks!
pod
'BananaLib'
,
:path
=>
(
fixture_path
+
'banana-lib'
).
to_s
pod
'monkey'
,
:path
=>
(
fixture_path
+
'monkey'
).
to_s
end
lockfile
=
generate_lockfile
config
.
integrate_targets
=
false
@installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
,
lockfile
)
should
.
not
.
raise
(
Informative
)
{
@installer
.
install!
}
end
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