Commit graph

16 commits

Author SHA1 Message Date
Soonho Kong
4a03570bf5 fix(bin/linja): reset the output encoding to utf-8 globally
fix #598
2015-05-14 00:44:07 -04:00
Soonho Kong
5e05a25a5d fix(bin/linja): replace windows newline '\r\n' to unix newline '\n'
This should be handled by Python. However, when we use mingw-python
which acts like Unix Python with Native Windows Emacs, we have a problem
because mingw-python do not handle '\r'. This patch manually replace
'\r\n' with '\n' to solve the problem.

close #573
2015-05-04 05:39:54 -04:00
Soonho Kong
69f3f65ec9 fix(bin/linja): decode communicated result if not None 2015-05-04 04:35:42 -04:00
Sebastian Ullrich
24b00c3a73 fix(bin/linja): don't double-decode Popen output
After 8ca3ee48, `text` is always a `str` instance, which provokes an `AttributeError` in Python 3.
2015-05-03 06:13:38 -04:00
Soonho Kong
fa33f706f8 fix(bin/linja): indentation
close #515
2015-04-04 13:31:35 -04:00
Soonho Kong
8ca3ee4851 fix(bin/linja): decode the results from subprocess.Popen
http://stackoverflow.com/questions/606191/convert-bytes-to-a-python-string

fix #515
2015-04-04 13:30:10 -04:00
Soonho Kong
47c0ae5914 fix(bin/linja): download ninja to a temporary directory
Assume that we have two linja processes running on a system where there
is no ninja installed. Then, the first linja process downloads ninja
from github. If the internet is slow, the second linja process can pick
up the incomplete ninja binary and execute it, which causes an
exception (i.e. "Malformed Mach-o file" error on OSX). An example build
trace is at

    https://s3.amazonaws.com/archive.travis-ci.org/jobs/56366771/log.txt

This commit fixes the problem by downloading ninja to a temporary
directory and copy it to "lean/bin/ninja" when it's completed.
2015-03-30 01:20:24 -04:00
Soonho Kong
93a3ef1447 fix(bin/linja): escape ' ' in depfiles differently
' ' ==> '\\ ' in .d files

fix #515
2015-03-28 22:38:13 -04:00
Soonho Kong
f72f4cf441 fix(bin/linja): add '$' and ' ' cases to escape_ninja_char
This is related to #513
2015-03-28 22:38:13 -04:00
Soonho Kong
0cda3f7cbf fix(bin/linja): only strip flycheck message in linja
Removing empty lines for FlyCheck messages was added by
4266b8c7a3. We had somecases where
Flycheck messages start with an empty line instead of `FLYCHECK_BEGIN
ERROR` in Windows7 + Python2 env. I think it's because of the different
newline character problem (LF, LFCR). My solution was to remove all
empty lines, which was too much. Now, I think striping should be enoguh.

fix #512
2015-03-28 07:56:32 -04:00
Soonho Kong
d39478a028 fix(bin/linja): catch exception when parsing FlycheckItem
fix #452
2015-03-25 13:53:53 -04:00
Soonho Kong
d950338980 fix(bin/linja): which does not look for 'sbin'
Ubuntu-12/14 has two packages which provide a binary file `ninja`:

 1. ninja : http://forkbomb.org/ninja/
 2. ninja-build : http://martine.github.io/ninja/

We had a case where a user has ninja installed instead of ninja-build,
then linja confuses that it has ninja-build and tries to use it.

This commit excludes a directory whose name includes "sbin" in finding a
system program. As a result, `which` will not find ninja[1] which
resides at /usr/sbin.
2015-03-24 11:13:14 -04:00
Soonho Kong
4266b8c7a3 fix(bin/linja.in): filter empty lines at FlycheckItem.fromString
Found this bug while helping Andrew Zipperer. It happened in Windows7/8 + Python 2.7
2015-03-04 16:41:42 -05:00
Leonardo de Moura
c3e7b1f817 fix(bin/linja.in): problems on Python 3.4 for Windows 2015-02-09 18:25:31 -08:00
Leonardo de Moura
daa9bb70b7 fix(bin/linja): bug that only happens when uisng linja on Windows 2015-02-09 16:42:34 -08:00
Soonho Kong
ca16381892 feat(bin): add linja.in and LEAN_BIN_DEP cmake option
see the discussion in issue #422
2015-02-04 15:46:08 -08:00
Renamed from bin/linja (Browse further)