Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Issue 23875029: Handle conflicting os deps better in gclient. (Closed)

Created:
7 years, 3 months ago by Daniel Bratell
Modified:
7 years ago
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org, Ami GONE FROM CHROMIUM
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Visibility:
Public.

Description

Handle conflicting os deps better in gclient. It's possible in gclient to list multiple operating systems on the command line and while handling them all perfectly might not be possible it's possible to make it better than today. This patch makes sure None never overrides any previous value and it adds some output to indicate what kind of dangerous choices it made. BUG=248168 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=240892

Patch Set 1 #

Total comments: 3

Patch Set 2 : Addressed review issues. #

Total comments: 7

Patch Set 3 : After review. #

Total comments: 3

Patch Set 4 : Added comment and more. #

Total comments: 5

Patch Set 5 : Addressed nits #

Patch Set 6 : Now with unittests. #

Patch Set 7 : Now with unittests. #

Total comments: 1

Patch Set 8 : Fixing missing line in unittest. #

Total comments: 2

Patch Set 9 : Changed how the helper method returns the result. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -18 lines) Patch
M gclient.py View 1 2 3 4 5 6 7 8 2 chunks +43 lines, -16 lines 4 comments Download
M tests/gclient_test.py View 1 2 3 4 5 6 7 8 3 chunks +81 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Daniel Bratell
This solves a problem where a one os set a deps to None which made ...
7 years, 3 months ago (2013-09-16 15:11:24 UTC) #1
iannucci
On 2013/09/16 15:11:24, Daniel Bratell wrote: > This solves a problem where a one os ...
7 years, 3 months ago (2013-09-16 17:43:30 UTC) #2
Isaac (away)
The cld_2 deps was incorrectly setup. It should not have been removed from android, and ...
7 years, 3 months ago (2013-09-16 21:58:18 UTC) #3
iannucci
few more comments https://codereview.chromium.org/23875029/diff/1/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/1/gclient.py#newcode493 gclient.py:493: if len(self.target_os) > 0: what values ...
7 years, 3 months ago (2013-09-16 22:54:40 UTC) #4
Daniel Bratell
On 2013/09/16 17:43:30, iannucci wrote: > Does it make sense to pick the highest revision ...
7 years, 3 months ago (2013-09-17 08:11:58 UTC) #5
Daniel Bratell
iannucci, can you please take a new look.
7 years, 3 months ago (2013-09-18 18:23:11 UTC) #6
Ami GONE FROM CHROMIUM
@ilevy: can you review this for https://code.google.com/p/chromium/issues/detail?id=248168 ?
7 years ago (2013-11-27 17:39:05 UTC) #7
Daniel Bratell
On 2013/11/27 17:39:05, Ami Fischman wrote: > @ilevy: can you review this for > https://code.google.com/p/chromium/issues/detail?id=248168 ...
7 years ago (2013-12-09 09:07:52 UTC) #8
Isaac (away)
OK I took a look and sketched out some example code which I think is ...
7 years ago (2013-12-09 10:33:12 UTC) #9
Isaac (away)
two follow ups: - Looking at the code I sketched out -- 1 target_os dep ...
7 years ago (2013-12-09 10:40:25 UTC) #10
Daniel Bratell
Updated the code as sketched. https://codereview.chromium.org/23875029/diff/10001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/10001/gclient.py#newcode491 gclient.py:491: if 'deps_os' in local_scope ...
7 years ago (2013-12-11 18:09:48 UTC) #11
Isaac (away)
More comments just about the core algorithm https://codereview.chromium.org/23875029/diff/10001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/10001/gclient.py#newcode491 gclient.py:491: if 'deps_os' ...
7 years ago (2013-12-11 18:58:27 UTC) #12
Daniel Bratell
On 2013/12/11 18:58:27, Isaac wrote: > More comments just about the core algorithm > > ...
7 years ago (2013-12-12 08:53:25 UTC) #13
Isaac (away)
Sorry one last round of nits. This lgtm -- but needs approval from an OWNER. ...
7 years ago (2013-12-12 09:41:01 UTC) #14
M-A Ruel
It's the kind of tricky code I'd like to see unit tested. It could be ...
7 years ago (2013-12-12 14:14:53 UTC) #15
Daniel Bratell
Now better than ever. With tests. https://codereview.chromium.org/23875029/diff/33001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/33001/gclient.py#newcode527 gclient.py:527: if len(possible_values) == ...
7 years ago (2013-12-12 16:26:14 UTC) #16
Daniel Bratell
maruel (or some other code owner; dpranke?), does the last patch look good? It has ...
7 years ago (2013-12-13 07:53:16 UTC) #17
M-A Ruel
https://codereview.chromium.org/23875029/diff/93001/tests/gclient_test.py File tests/gclient_test.py (right): https://codereview.chromium.org/23875029/diff/93001/tests/gclient_test.py#newcode541 tests/gclient_test.py:541: {'os1': { 'bar': 'os1_bar' }}, I think you meant: ...
7 years ago (2013-12-13 15:33:35 UTC) #18
Daniel Bratell
Good catch. Added the missing line in the test and it passes. Is that the ...
7 years ago (2013-12-16 09:32:42 UTC) #19
M-A Ruel
https://codereview.chromium.org/23875029/diff/113001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/113001/gclient.py#newcode470 gclient.py:470: def UpdateWithOsDeps(deps, deps_os, target_os_list): The method doesn't make it ...
7 years ago (2013-12-16 13:18:18 UTC) #20
Daniel Bratell
Changed per request.
7 years ago (2013-12-16 13:56:08 UTC) #21
M-A Ruel
lgtm
7 years ago (2013-12-16 14:26:54 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/23875029/133001
7 years ago (2013-12-16 14:32:35 UTC) #23
commit-bot: I haz the power
Change committed as 240892
7 years ago (2013-12-16 14:34:14 UTC) #24
Ami GONE FROM CHROMIUM
post-commit drive-by https://codereview.chromium.org/23875029/diff/133001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/133001/gclient.py#newcode500 gclient.py:500: logging.error('Conflicting dependencies for %s: %s. (target_os=%s)', It's ...
7 years ago (2013-12-16 22:33:47 UTC) #25
M-A Ruel
https://codereview.chromium.org/23875029/diff/133001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/133001/gclient.py#newcode500 gclient.py:500: logging.error('Conflicting dependencies for %s: %s. (target_os=%s)', On 2013/12/16 22:33:47, ...
7 years ago (2013-12-16 23:20:52 UTC) #26
Isaac (away)
https://codereview.chromium.org/23875029/diff/133001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/133001/gclient.py#newcode503 gclient.py:503: target_os_deps[os_dep_key] = sorted(possible_values)[0] Also, this sorted call should be ...
7 years ago (2013-12-16 23:26:49 UTC) #27
Ami GONE FROM CHROMIUM
On Mon, Dec 16, 2013 at 3:20 PM, <maruel@chromium.org> wrote: > if len(set(possible_Values)) > 1: ...
7 years ago (2013-12-16 23:36:55 UTC) #28
M-A Ruel
Why? None is a perfectly valid value in a set. And you don't need to ...
7 years ago (2013-12-16 23:42:00 UTC) #29
Isaac (away)
https://codereview.chromium.org/23875029/diff/133001/gclient.py File gclient.py (right): https://codereview.chromium.org/23875029/diff/133001/gclient.py#newcode500 gclient.py:500: logging.error('Conflicting dependencies for %s: %s. (target_os=%s)', possible_values is already ...
7 years ago (2013-12-16 23:49:02 UTC) #30
Ami GONE FROM CHROMIUM
Sorry for being brief: I str()'ified the suggestion b/c otherwise the len/comparisons are seemingly by ...
7 years ago (2013-12-16 23:59:27 UTC) #31
Daniel Bratell
On 2013/12/16 22:33:47, Ami Fischman wrote: > post-commit drive-by > > https://codereview.chromium.org/23875029/diff/133001/gclient.py > File gclient.py ...
7 years ago (2013-12-17 08:04:58 UTC) #32
Daniel Bratell
7 years ago (2013-12-17 08:06:45 UTC) #33
Ami GONE FROM CHROMIUM
7 years ago (2013-12-17 17:48:41 UTC) #34
On Tue, Dec 17, 2013 at 12:04 AM, <bratell@opera.com> wrote:

> On 2013/12/16 22:33:47, Ami Fischman wrote:
>
>> post-commit drive-by
>>
>
>  https://codereview.chromium.org/23875029/diff/133001/gclient.py
>> File gclient.py (right):
>>
>
>  https://codereview.chromium.org/23875029/diff/133001/
>> gclient.py#newcode500
>> gclient.py:500: logging.error('Conflicting dependencies for %s: %s.
>> (target_os=%s)',
>> It's interesting that this is logged even when the two dependencies are
>>
> actually
>
>> the exact same (e.g. openssl in
>>
>
> https://code.google.com/p/webrtc/source/browse/trunk/
> DEPS?spec=svn5260&r=5260).
>
> I wonder why.
>

I think you figured it out in the reviewlog of
https://chromiumcodereview.appspot.com/101713003/ but FTR, the output was:
gclient(501) MergeWithOsDeps:Conflicting dependencies for
third_party/openssl: [('unix', <__main__.FromImpl object at 0x288e050>),
('android', <__main__.FromImpl object at 0x288e0d0>)]. (target_os=('unix',
'android'))

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698