diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-03 12:58:29 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-03 12:58:29 +0530 |
commit | 8b95d7b8d860ec4c0834192083361a9fb78ddbeb (patch) | |
tree | 1d3eeada1ed7398de9255e10b9380086a637397c /python/tidy.py | |
parent | 6ec454b7f5926d84099930292ebdcbc8f6d5e89c (diff) | |
parent | b8a3a646919b871620aeedffe48b97ac4fe4b0df (diff) | |
download | servo-8b95d7b8d860ec4c0834192083361a9fb78ddbeb.tar.gz servo-8b95d7b8d860ec4c0834192083361a9fb78ddbeb.zip |
Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.
This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.
Fix https://github.com/servo/skia/issues/70
This builds, but the at the moment causes a number of tidy errors for duplicated crates.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
Diffstat (limited to 'python/tidy.py')
-rw-r--r-- | python/tidy.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/python/tidy.py b/python/tidy.py index 6f8b023f5cb..7a2993cdb6d 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -48,6 +48,8 @@ ignored_files = [ def should_check(file_name): + if os.path.basename(file_name) == "Cargo.lock": + return True if ".#" in file_name: return False if os.path.splitext(file_name)[1] not in filetypes_to_check: @@ -181,12 +183,12 @@ def check_lock(file_name, contents): packages[name] = (version, idx + 1, base_name) elif all([packages[name][0] != version, name not in exceptions, base_name not in exceptions]): line = idx + 1 - version_1 = tuple(map(int, packages[name][0].split('.'))) - version_2 = tuple(map(int, version.split('.'))) + version_1 = tuple(map(maybe_int, packages[name][0].split('.'))) + version_2 = tuple(map(maybe_int, version.split('.'))) if version_1 < version_2: # get the line & base package containing the older version packages[name], (version, line, base_name) = (version, line, base_name), packages[name] - message = 'conflicting versions for package "%s"' % name + message = 'duplicate versions for package "%s"' % name error = '\n\t\033[93mexpected maximum version "{}"\033[0m'.format(packages[name][0]) + \ '\n\t\033[91mbut, "{}" demands "{}"\033[0m' \ .format(base_name, version) @@ -198,6 +200,13 @@ def check_lock(file_name, contents): idx += 1 +def maybe_int(value): + try: + return int(value) + except ValueError: + return value + + def check_toml(file_name, contents): if not file_name.endswith(".toml"): raise StopIteration |