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

Issue 1365163002: Make the ninja generator handle symlinked paths correctly. (Closed)

Created:
5 years, 3 months ago by lindleyf
Modified:
5 years, 3 months ago
Reviewers:
Nico, scottmg
CC:
gyp-developer_googlegroups.com
Base URL:
https://chromium.googlesource.com/external/gyp@master
Target Ref:
refs/heads/master
Project:
gyp
Visibility:
Public.

Description

Make the ninja generator handle symlinked paths correctly. Re-spin of https://codereview.chromium.org/1236933002. Previously, RelativePath() was changed to use abspath instead of realpath unconditionally. This broke the XCode generator in some cases. This re-spin simply allows the caller to optionally specify that they do not want symlinks to be followed, and this is only done in the ninja generator. This approach is not ideal since it is not obvious why this option is needed for ninja but not elsewhere; but it is a much lower-risk change than the previous attempt. Patch from lindleyf@google.com. BUG= R=scottmg@chromium.org Committed: https://chromium.googlesource.com/external/gyp/+/7904ce96fd012ded9627172540e91a51025e3c08

Patch Set 1 #

Patch Set 2 : Added 'chdir=outdir' per Nico's suggestion on the last CL. #

Total comments: 6

Patch Set 3 : Added comments. #

Patch Set 4 : Revert CPPFLAGS_host, they will be moved to a separate CL. #

Total comments: 2

Patch Set 5 : Removed unnecessary import. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -9 lines) Patch
M pylib/gyp/common.py View 1 2 1 chunk +9 lines, -2 lines 0 comments Download
M pylib/gyp/generator/ninja.py View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download
A test/symlinks/gyptest-symlinks.py View 1 2 3 4 1 chunk +67 lines, -0 lines 0 comments Download
A + test/symlinks/hello.c View 1 chunk +1 line, -1 line 0 comments Download
A + test/symlinks/hello.gyp View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (2 generated)
lindleyf
Here's a lower-risk re-spin of the abspath-vs-realpath CL.
5 years, 3 months ago (2015-09-24 20:51:41 UTC) #2
Nico
(I'm away for the next ~2 weeks starting in a few minutes. if you want ...
5 years, 3 months ago (2015-09-24 21:13:35 UTC) #3
lindleyf
On 2015/09/24 20:51:41, lindleyf wrote: > Here's a lower-risk re-spin of the abspath-vs-realpath CL. I ...
5 years, 3 months ago (2015-09-24 21:28:53 UTC) #4
scottmg
https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/common.py File pylib/gyp/common.py (right): https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/common.py#newcode134 pylib/gyp/common.py:134: def RelativePath(path, relative_to, follow_path_symlink=True): could you add some explanation ...
5 years, 3 months ago (2015-09-24 21:30:51 UTC) #6
lindleyf
+scottmg since thakis is going on vacation
5 years, 3 months ago (2015-09-24 21:31:07 UTC) #7
lindleyf
https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/common.py File pylib/gyp/common.py (right): https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/common.py#newcode134 pylib/gyp/common.py:134: def RelativePath(path, relative_to, follow_path_symlink=True): On 2015/09/24 21:30:51, scottmg wrote: ...
5 years, 3 months ago (2015-09-24 21:47:14 UTC) #8
scottmg
The comments help a lot! lgtm with the .host change removed. https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): ...
5 years, 3 months ago (2015-09-24 21:59:09 UTC) #9
lindleyf
On 2015/09/24 21:59:09, scottmg wrote: > The comments help a lot! lgtm with the .host ...
5 years, 3 months ago (2015-09-24 22:10:20 UTC) #10
lindleyf
https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/1365163002/diff/20001/pylib/gyp/generator/ninja.py#newcode924 pylib/gyp/generator/ninja.py:924: elif self.toolset == 'host': On 2015/09/24 21:59:09, scottmg wrote: ...
5 years, 3 months ago (2015-09-24 22:10:26 UTC) #11
scottmg
https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py File test/symlinks/gyptest-symlinks.py (right): https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py#newcode28 test/symlinks/gyptest-symlinks.py:28: import gyp.common oh, what's this for?
5 years, 3 months ago (2015-09-24 22:12:16 UTC) #12
lindleyf
https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py File test/symlinks/gyptest-symlinks.py (right): https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py#newcode28 test/symlinks/gyptest-symlinks.py:28: import gyp.common On 2015/09/24 22:12:16, scottmg wrote: > oh, ...
5 years, 3 months ago (2015-09-24 22:15:50 UTC) #13
lindleyf
On 2015/09/24 22:15:50, lindleyf wrote: > https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py > File test/symlinks/gyptest-symlinks.py (right): > > https://codereview.chromium.org/1365163002/diff/60001/test/symlinks/gyptest-symlinks.py#newcode28 > ...
5 years, 3 months ago (2015-09-24 22:22:40 UTC) #14
scottmg
(removed blank line at end of gyptest-symlinks.py) I'll land once bots come back green. Thanks!
5 years, 3 months ago (2015-09-24 22:53:28 UTC) #15
scottmg
(fixed hello.c to pass git cl presubmit too. unfortunately i'm not allowed to upload to ...
5 years, 3 months ago (2015-09-24 23:13:26 UTC) #16
scottmg
Committed patchset #5 (id:80001) manually as 7904ce96fd012ded9627172540e91a51025e3c08 (presubmit successful).
5 years, 3 months ago (2015-09-24 23:13:56 UTC) #17
lindleyf
On 2015/09/24 23:13:26, scottmg wrote: > (fixed hello.c to pass git cl presubmit too. unfortunately ...
5 years, 3 months ago (2015-09-24 23:14:49 UTC) #18
scottmg
5 years, 3 months ago (2015-09-24 23:17:23 UTC) #19
Message was sent while issue was closed.
On 2015/09/24 23:14:49, lindleyf wrote:
> On 2015/09/24 23:13:26, scottmg wrote:
> > (fixed hello.c to pass git cl presubmit too. unfortunately i'm not allowed
to
> > upload to not-my-issue)
> 
> What was the fix? I stared at that error message for a while but couldn't
figure
> out what it was unhappy about.

Oh, sorry, I should have just commented instead.

The */ has to be on a separate line, apparently.

Powered by Google App Engine
This is Rietveld 408576698