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
563225d1
Commit
563225d1
authored
Mar 04, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3206 from CocoaPods/fix-static-binaries-check
Fix static binaries check
parents
2e081a3c
dba419fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
CHANGELOG.md
CHANGELOG.md
+4
-0
installer.rb
lib/cocoapods/installer.rb
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+15
-6
No files found.
CHANGELOG.md
View file @
563225d1
...
@@ -21,6 +21,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -21,6 +21,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#3212
](
https://github.com/CocoaPods/CocoaPods/issues/3212
)
[
#3212
](
https://github.com/CocoaPods/CocoaPods/issues/3212
)
*
Limit the check for transitive static binaries to those which are directly linked to the user target.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3194
](
https://github.com/CocoaPods/CocoaPods/issues/3194
)
## 0.36.0.rc.1
## 0.36.0.rc.1
...
...
lib/cocoapods/installer.rb
View file @
563225d1
...
@@ -355,7 +355,7 @@ module Pod
...
@@ -355,7 +355,7 @@ module Pod
pod_targets
=
aggregate_target
.
pod_targets_for_build_configuration
(
config
)
pod_targets
=
aggregate_target
.
pod_targets_for_build_configuration
(
config
)
dependencies
=
pod_targets
.
flat_map
(
&
:dependencies
)
dependencies
=
pod_targets
.
flat_map
(
&
:dependencies
)
dependended_upon_targets
=
pod_targets
.
select
{
|
t
|
dependencies
.
include?
(
t
.
pod_name
)
}
dependended_upon_targets
=
pod_targets
.
select
{
|
t
|
dependencies
.
include?
(
t
.
pod_name
)
&&
!
t
.
should_build?
}
static_libs
=
dependended_upon_targets
.
flat_map
(
&
:file_accessors
).
flat_map
do
|
fa
|
static_libs
=
dependended_upon_targets
.
flat_map
(
&
:file_accessors
).
flat_map
do
|
fa
|
static_frameworks
=
fa
.
vendored_frameworks
.
reject
{
|
fw
|
`file
#{
fw
+
fw
.
basename
(
'.framework'
)
}
2>&1`
=~
/dynamically linked/
}
static_frameworks
=
fa
.
vendored_frameworks
.
reject
{
|
fw
|
`file
#{
fw
+
fw
.
basename
(
'.framework'
)
}
2>&1`
=~
/dynamically linked/
}
...
...
spec/unit/installer_spec.rb
View file @
563225d1
...
@@ -172,11 +172,11 @@ module Pod
...
@@ -172,11 +172,11 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
describe
'#verify_no_static_framework_transitive_dependencies'
do
describe
'#verify_no_static_framework_transitive_dependencies'
do
it
'detects transitive static dependencies'
do
before
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_libraries
).
returns
([
Pathname
(
'libThing.a'
)])
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
config
.
integrate_targets
=
false
@podfile
=
Pod
::
Podfile
.
new
do
platform
:ios
,
'8.0'
platform
:ios
,
'8.0'
xcodeproj
'SampleProject/SampleProject'
xcodeproj
'SampleProject/SampleProject'
use_frameworks!
use_frameworks!
...
@@ -184,12 +184,21 @@ module Pod
...
@@ -184,12 +184,21 @@ module Pod
pod
'OrangeFramework'
,
:path
=>
(
fixture_path
+
'orange-framework'
).
to_s
pod
'OrangeFramework'
,
:path
=>
(
fixture_path
+
'orange-framework'
).
to_s
pod
'monkey'
,
:path
=>
(
fixture_path
+
'monkey'
).
to_s
pod
'monkey'
,
:path
=>
(
fixture_path
+
'monkey'
).
to_s
end
end
lockfile
=
generate_lockfile
@
lockfile
=
generate_lockfile
config
.
integrate_targets
=
false
end
@installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
,
lockfile
)
it
'detects transitive static dependencies which are linked directly to the user target'
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_libraries
).
returns
([
Pathname
(
'/libThing.a'
)])
@installer
=
Installer
.
new
(
config
.
sandbox
,
@podfile
,
@lockfile
)
should
.
raise
(
Informative
)
{
@installer
.
install!
}.
message
.
should
.
match
/transitive.*libThing/
should
.
raise
(
Informative
)
{
@installer
.
install!
}.
message
.
should
.
match
/transitive.*libThing/
end
end
it
'allows transitive static dependencies which contain other source code'
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:source_files
).
returns
([
Pathname
(
'/yolo.m'
)])
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:vendored_libraries
).
returns
([
Pathname
(
'/libThing.a'
)])
@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