New issue
Advanced search Search tips

Issue 786982 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

GN does not escape spaces in paths on OSX

Reported by fly...@gmail.com, Nov 20 2017

Issue description

The current version of GN does not escape spaces in paths and generates incorrect ninja build files. The example I have is the Chromium build, in which it generates a rule for gn that includes paths to the project that are not escaped if the volume in which the project was installed has spaces in the name (such as "Mac 2TB" for my main drive.

This causes Ninja to fail every single time.
 

Comment 1 by rsesek@chromium.org, Nov 20 2017

Labels: -Pri-2 -Proj-GN-Migration Build-Tools-GN Pri-3
Status: Available (was: Untriaged)
Yes, spaces are not permitted in build paths: https://chromium.googlesource.com/chromium/src/+/eb841686b565f1ea839a5034e087a88c764ea29e/docs/mac_build_instructions.md#get-the-code

Making this Available, but it will probably be WontFix unless someone wants to contribute a patch.

Comment 2 by fly...@gmail.com, Nov 20 2017

It is extremely common for paths and things like volume names on OSX to
have spaces, and I'm sure the same goes for Windows. I can see no reason to
refuse to build for something as easy to fix as this, as it just requires
escaping. What are people supposed to do, change the volume names and break
everything else just so your small tool can generate proper build files?
Maybe GN should respect symlinks, as that would fix this. Instead, the
paths are put into the buildfile on the basis of the target of the symlink,
and not the symlink path.

Comment 3 by mark@chromium.org, Dec 19 2017

Unfortunately it’s probably not practical for GN to accept paths with spaces in them, but it should be possible to avoid making paths system-absolute in build files. If they stopped doing that, then it wouldn’t matter that you were running on “/Volumes/Mac 2TB” provided that there aren’t any spaces in Chromium’s own tree.

Comment 4 by fly...@gmail.com, Dec 19 2017

I am of the opinion that all paths should be escaped or quoted. Or, a
simple test for spaces, for example, could trigger escaping or quotes. To
make that makes more sense than telling someone to stop doing something
that is perfectly normal in OSX and Windows.

On Tue, Dec 19, 2017 at 6:46 PM, m… via monorail <monorail+v2.3957595039@
chromium.org> wrote:
Project Member

Comment 5 by sheriffbot@chromium.org, Dec 20

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Ok, so no chromium on Mac. Got it.
Status: WontFix (was: Untriaged)
No, just no spaces in paths. GN and the Chromium build work just fine on Mac.

If you want to contribute a fix for this issue we'd take it, but I'm going to WontFix this now.

Sign in to add a comment