Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ninjia @*.rsp file in write_glyphmap.py #362

Merged
merged 3 commits into from
Nov 10, 2021

Conversation

anthrotype
Copy link
Member

otherwise I get 'ninja: fatal: posix_spawn: Argument list too long' on Linux

@anthrotype anthrotype force-pushed the write-glyphmap-ninja-response-file branch from 414b1ec to 8e2ac6e Compare November 9, 2021 13:56
otherwise I get 'ninja: fatal: posix_spawn: Argument list too long' on Linux
@anthrotype anthrotype force-pushed the write-glyphmap-ninja-response-file branch from 8e2ac6e to d35f170 Compare November 9, 2021 13:57
@anthrotype
Copy link
Member Author

no idea what's going on on windows.. I see things like:

FileNotFoundError: [Errno 2] No such file or directory: 'picosvgregularclipped61.svg'

maybe pathlib is not correctly joining the subpaths using windows-specific backslashes? No idea how to test this without a windows machine at hand..

… file

backslashes in posix=True mode are being eaten up by shlex.split: e.g. shlex.split(rabc) => abc. Set it to False on Windows to try fixing #362 (comment)
@anthrotype
Copy link
Member Author

the problem seems to be shlex.split function, used to split the content of the .rsp ninja file into back into a list of argv. Since it defaults to posix=True and the backslash is an escape character, a path like "picosvg\regular\61.svg" was getting eaten up on Windoes. At least setting posix=False (when os.name != "posix", e.g. when running on Windows) seems to make our tests pass.

But.. now the lint job is failing for an unrelated reason :(
pytype depends on typed_ast, and the latter seems to have some issues on Python 3.9
python/typed_ast#169

Not sure what to do.. Maybe I'll try to temporarily pin pytype to an earlier version. Or try to run on an earlier python vesion.. Why is it so hard... :(

@anthrotype
Copy link
Member Author

lint job passes with 3.9.7. I filed an issue upstream google/pytype#1044

@anthrotype anthrotype merged commit f395611 into main Nov 10, 2021
@anthrotype anthrotype deleted the write-glyphmap-ninja-response-file branch November 10, 2021 16:27
anthrotype added a commit to googlefonts/color-fonts that referenced this pull request Nov 10, 2021
Fixes issue 'ninja: fatal: posix_spawn: Argument list too long' on Linux
googlefonts/nanoemoji#362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants