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
16162de1
Unverified
Commit
16162de1
authored
Jan 17, 2018
by
Samuel Giddins
Committed by
GitHub
Jan 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7337 from CocoaPods/seg-resolver-sort-external-source-first
[Resolver] Sort external source dependencies first
parents
46e5eea6
4bc68064
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
resolver.rb
lib/cocoapods/resolver.rb
+1
-0
resolver_spec.rb
spec/unit/resolver_spec.rb
+23
-0
No files found.
CHANGELOG.md
View file @
16162de1
...
...
@@ -27,6 +27,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#7031
](
https://github.com/CocoaPods/CocoaPods/issues/7031
)
*
Ensure that externally-sourced (e.g. local & git) pods are allowed to resolve
to prerelease versions.
[
segiddins
](
https://github.com/segiddins
)
## 1.4.0.rc.1 (2017-12-16)
##### Enhancements
...
...
lib/cocoapods/resolver.rb
View file @
16162de1
...
...
@@ -261,6 +261,7 @@ module Pod
name
=
name_for
(
dependency
)
[
activated
.
vertex_named
(
name
).
payload
?
0
:
1
,
dependency
.
external_source
?
0
:
1
,
dependency
.
prerelease?
?
0
:
1
,
conflicts
[
name
]
?
0
:
1
,
search_for
(
dependency
).
count
,
...
...
spec/unit/resolver_spec.rb
View file @
16162de1
...
...
@@ -1019,6 +1019,29 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:spec
).
map
(
&
:to_s
).
sort
specs
.
should
==
[
'PrereleaseMonkey (1.0-beta1)'
]
end
it
'resolves when there is no prerelease dependency on an external source pod'
do
sandbox
=
config
.
sandbox
local_pod
=
Specification
.
from_hash
(
'name'
=>
'LocalPod'
,
'version'
=>
'1.0.0.LOCAL'
)
local_pod2
=
Specification
.
from_hash
(
'name'
=>
'LocalPod2'
,
'version'
=>
'1.0.0.LOCAL'
,
'dependencies'
=>
{
'LocalPod'
=>
[]
})
sandbox
.
stubs
(
:specification
).
with
(
'LocalPod'
).
returns
(
local_pod
)
sandbox
.
stubs
(
:specification
).
with
(
'LocalPod2'
).
returns
(
local_pod2
)
podfile
=
Podfile
.
new
do
target
'SampleProject'
do
platform
:ios
,
'9.0'
pod
'LocalPod'
,
:path
=>
'../'
pod
'LocalPod2'
,
:path
=>
'../'
end
end
locked_graph
=
dependency_graph_from_array
([
Dependency
.
new
(
'LocalPod'
,
'= 1.0.0.LOCAL'
),
Dependency
.
new
(
'LocalPod2'
,
'= 1.0.0.LOCAL'
),
])
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
locked_graph
,
config
.
sources_manager
.
all
)
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:spec
).
map
(
&
:to_s
).
sort
specs
.
should
==
[
'LocalPod (1.0.0.LOCAL)'
,
'LocalPod2 (1.0.0.LOCAL)'
]
end
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