diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-08-17 13:22:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 13:22:52 -0500 |
commit | ec53136863f20b80caf165d2f15e8a77d614536e (patch) | |
tree | aea6b11eaa16dfcd2b5cc613e6b9678d3fd09253 /python/tidy/servo_tidy/tidy.py | |
parent | b61c45639a264943f8dec61c66b46d40f9d274a1 (diff) | |
parent | dd377164595a91cb5fb6eab5e354cf51814ff7d1 (diff) | |
download | servo-ec53136863f20b80caf165d2f15e8a77d614536e.tar.gz servo-ec53136863f20b80caf165d2f15e8a77d614536e.zip |
Auto merge of #11756 - vvuk:servo-msvc, r=larsbergstrom
MSVC support for Servo, and CMake builds for native code
This is the base PR for MSVC builds of servo and dependent crates. It's got replacements in the Cargo.toml to pull in the right versions, to make sure that crates were properly converted to CMake for all other platforms, not just Windows. (Servo builds with MSVC 2015 with this PR; also with 2013, though a manual change in rust-mozjs to select a different set of bindings is needed.)
This PR isn't quite ready yet, but I want bors-servo to do builds.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11756)
<!-- Reviewable:end -->
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index d6d6344db54..f4b893bda8c 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -202,8 +202,9 @@ def check_modeline(file_name, lines): def check_length(file_name, idx, line): - if file_name.endswith(".lock") or file_name.endswith(".json") or file_name.endswith(".html"): - raise StopIteration + for suffix in [".lock", ".json", ".html", ".toml"]: + if file_name.endswith(suffix): + raise StopIteration # Prefer shorter lines when shell scripting. if file_name.endswith(".sh"): max_length = 80 @@ -297,8 +298,18 @@ def check_lock(file_name, contents): # package names to be neglected (as named by cargo) exceptions = ["lazy_static"] - import toml - content = toml.loads(contents) + # toml.py has a bug(?) that we trip up in [metadata] sections; + # see https://github.com/uiri/toml/issues/61 + # This should only affect a very few lines (that have embedded ?branch=...), + # and most of them won't be in the repo + try: + import toml + content = toml.loads(contents) + except: + print "WARNING!" + print "WARNING! toml parsing failed for Cargo.lock, but ignoring..." + print "WARNING!" + raise StopIteration packages = {} for package in content.get("package", []): |