Commit graph

365 commits

Author SHA1 Message Date
Daan Sprenkels
a01400734d tidy.py: split checking functions into {normal,line}-checking categories
This is done, because the majority of the functions splits the lines, and
it would be better to do this just once.
This commit also optimised the licence checking function slightly by only
checking the fist lines of the file (where the amount of lines is the
line span of the longest license)
2015-12-26 13:47:54 +01:00
Simon Martin
cec661fa86 Issue #9042: Report incorrect number of spaces around => in the style checker. 2015-12-23 20:54:26 +01:00
Matt Brubeck
d7ba536ad6 Update mach run to use android_params file 2015-12-18 10:09:48 -08:00
Corey Farwell
75d64d3b3f Print tidy errors as they happen instead of all-at-once 2015-12-14 18:07:11 -05:00
bors-servo
a1fb12616a Auto merge of #8891 - mbrubeck:mach-install, r=larsbergstrom
Android build system improvements

This PR adds a `mach install` command (a convenient way to run `adb install`), and does some minor code cleanup.

It also fixes parallelism in the OpenSSL build.  For [complicated reasons][1], a sub-Make will not inherit `-j` options from its parent process unless it is invoked directly from another Makefile.  This means we should run make from openssl.makefile rather than openssl.sh.

r? @larsbergstrom

[1]: http://make.mad-scientist.net/papers/jobserver-implementation/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8891)
<!-- Reviewable:end -->
2015-12-12 18:31:53 +05:30
Matt Brubeck
53871321a3 Add mach install command (Android-only for now) 2015-12-12 04:58:33 -08:00
Matt Brubeck
2a00eb6c08 Remove unused params from mach package command 2015-12-12 04:58:32 -08:00
Ms2ger
07d837bd03 Update bincode. 2015-12-08 14:49:38 -05:00
bors-servo
cad77d5f1c Auto merge of #8824 - Ms2ger:tidy-lock, r=Wafflespeanut
Rewrite the Cargo.lock tidy check.

Fixes #8691.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8824)
<!-- Reviewable:end -->
2015-12-08 10:21:55 +05:30
bors-servo
7d9a6a8397 Auto merge of #8750 - GuillaumeGomez:master, r=Wafflespeanut
Ensure that tidy follows the same procedure for sorting

Fixes #8734

cc @Wafflespeanut

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8750)
<!-- Reviewable:end -->
2015-12-06 17:23:43 +05:30
Guillaume Gomez
db3457e498 Improve checking algorithms 2015-12-06 03:34:59 +01:00
bors-servo
e774a69440 Auto merge of #8626 - mskrzypkows:build_commands_android, r=larsbergstrom
Draft,  Move OpenSSL Android build to the target directory #8568

I've created a draft, please give me feedback. Is it good direction?

Fixes #8568

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8626)
<!-- Reviewable:end -->
2015-12-05 18:44:32 +05:30
Ms2ger
b72c8e5e18 Rewrite the Cargo.lock tidy check. 2015-12-04 17:55:48 +01:00
bors-servo
3c0cd5eb06 Auto merge of #7734 - nerith:headless, r=metajack
Allow `./mach build` to enable Servo's headless mode

As mentioned in #7512 and #7637, the environment variable SERVO_HEADLESS
enables building the OSMesa version of Servo when it is set to 1.

Instead, this should be a command line option to mach's build command.

Fixes #7637.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7734)
<!-- Reviewable:end -->
2015-12-04 09:49:05 +05:30
bors-servo
8b95d7b8d8 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 -->
2015-12-03 12:58:29 +05:30
Brandon Fairchild
2342b1bc6f Allow ./mach build-tests to enable Servo's headless mode
This allows mach's build-tests command to use the option --headless
instead of checking for the value of SERVO_HEADLESS.
2015-12-03 00:39:33 -05:00
Brandon Fairchild
ff853e0d4a Allow ./mach build to enable Servo's headless mode
As mentioned in #7512 and #7637, the environment variable SERVO_HEADLESS
enables building the OSMesa version of Servo when it is set to 1.

Instead, this should be a command line option to mach's build command.

Fixes #7637.
2015-12-02 23:40:31 -05:00
Simon Sapin
b8a3a64691 Tidy ports/cef/Cargo.lock
Despite the rest of ports/cef/ being ignored.
2015-12-02 19:11:08 +01:00
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
Maciej Skrzypkowski
62af4d36dd Move OpenSSL Android build to the target directory #8568 2015-12-02 09:34:58 +01:00
Sam Gibson
732ae5714f Fix the parsing of the chromium HSTS preload list
Urg! The Chromium HSTS preload JSON file contains single line comments. Previously these were filtered out with a very simple regex that just looked for '//' and removed the line. Now the file has added a couple fields that have URLs in them that were erroneously removed and caused the JSON parsing to fail. This commit slightly complicates the regex to fix this specific problem.

If this happens again, it's likely worth it to figure out how to use a real parser to remove the comments.

servo/servo#8760
2015-12-02 15:36:38 +11:00
jmr0
e301ff46b2 adding wpt lint script to tidy checks 2015-11-30 10:08:10 -05:00
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
Ms2ger
21f532758b Ensure the bootstrap-rust-docs and doc mach commands agree on the location of the Rust documentation. 2015-11-27 09:47:38 +01:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
bors-servo
bc618b0d53 Auto merge of #8689 - jdm:deps, r=frewsxcv
Remove remaining version-conflict exceptions in tidy.py.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8689)
<!-- Reviewable:end -->
2015-11-27 09:17:54 +05:30
Josh Matthews
c36cbf58e8 Remove remaining version-conflict exceptions in tidy.py. 2015-11-26 11:26:28 -05:00
jmr0
df49cf2b13 adding tidy rule to warn against use of &String and refactoring instances of &String in codebase 2015-11-25 21:49:12 -05:00
Yanir Seroussi
4b71bc5c42 Reduce duplication in binary path determinition for Android target (fixes issue #8349) 2015-11-19 14:35:10 +11:00
nxnfufunezn
c7fab07d03 Make test-wpt run with RUST_BACKTRACE=1 by default #8194 2015-11-19 01:32:12 +05:30
Simon Sapin
8051f2ff8c Very hackish support for ./mach run --android 2015-11-13 21:35:50 +01:00
Ms2ger
026994e4be Ignore sync directories in test-tidy. 2015-11-10 10:29:26 +01:00
bors-servo
5fda719fa8 Auto merge of #8415 - mrobinson:create-wpt-relative, r=frewsxcv
Form relative reference URLs during create-wpt

Instead of always using the absolute path to the reference file when
creating new reference tests, create-wpt now creates relative URLs if
the files are in the same directory. This is the most common case for
new Servo tests. Also fix some missing quotation marks in the
create-wpt template.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8415)
<!-- Reviewable:end -->
2015-11-09 22:43:25 +05:30
Martin Robinson
bebbc80129 Form relative reference URLs during create-wpt
Instead of always using the absolute path to the reference file when
creating new reference tests, create-wpt now creates relative URLs if
the files are in the same directory. This is the most common case for
new Servo tests. Also fix some missing quotation marks in the
create-wpt template.
2015-11-08 10:32:35 -08:00
Simon Martin
3b087d406a Avoid UnboundLocalError upon "bogus" usage of ./mach create-wpt 2015-11-08 14:48:02 +01:00
Corey Farwell
4ff8d3ad9c Make virtualenv more tolerant of spaces in directory names
Fixes #8390
2015-11-07 11:28:52 -05:00
bors-servo
d16ba51b47 Auto merge of #8366 - larsbergstrom:ccache, r=frewsxcv
Add CCACHE infra and turn it on in travis

r? @Manishearth

This lets devs configure their use of CCACHE with their .servobuild file, as usual. For build environments, they can either have a .servobuild file or set the CCACHE env var to point at the ccache binary to use.

It also adds support for ccache to our travis builds. Buildbot will come in a separate commit to the saltfs repo.

It is expected that the various cargo makefiles will look at this variable and do the "right thing" to tell their native build to instead use ccache. e.g., https://github.com/servo/mozjs/pull/62

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8366)
<!-- Reviewable:end -->
2015-11-07 07:01:54 +05:30
Lars Bergstrom
5c5acc0249 Add CCACHE infra and turn it on in travis 2015-11-05 14:47:23 -06:00
Benjamin Herr
a4fa004c39 mach_bootstrap: Don't get confused by interrupts
When mach_bootstrap got interrupted while it's setting up virtualenv or
calling out to pip, it wouldn't repeat that step on subsequent runs, and
mach fails because its environment isn't set up properly or dependencies
are missing.

So now we re-run virtualenv if activate_this.py doesn't exist, and only
create the marker file for required packages after pip has returned
successfully.
2015-11-05 21:04:53 +01:00
bors-servo
0699d38e80 Auto merge of #8288 - larsbergstrom:new_android_build, r=mbrubeck
New Android suppport

r/f? @mbrubeck

No need to r+ urgently; I want to do a little bit more testing of the release build, but I'm hoping to land this bit (moving to a more sane build process) next week.

The new version of building an APK:
1) Removes the glutin-based APK builder from the link step
2) Adds a build.rs step to the build of the final Servo library that adds the native code required by glutin's android_rs_glue (e.g., `ANativeActivity_onCreate` definition)
3) Replaces the link step with a `fake-ld.sh` script that instead creates a libservo.so
4) Adds a new mach `package` step to build the APK that has some Rust code that builds the library from a set of in-tree build files

This setup fixes a number of problems:
1) We can use gdb, because we use `ndk-build`, which adds the .gdbserver info, plus we keep around all of the build files (also required by the ndk gdb)
2) We can add more Java code & hooks to handle Android intents
3) We no longer have any git submodules or the awkward two-step build with android-rs-glue

Many other setups were tried (and failed). The most obvious ones is building a libservo.so from a `dylib` target from the servo build on Android. This doesn't work because you can't have a different default lib target on one platform than others in Cargo, and you also can't pass it in from the commandline (e.g., --lib does not have a dylib arg). Additionally, if you don't go through the intermediate libservo.rlib step (which removes unused symbols), then you end up with a TON of missing symbols because our -sys crates are super sloppy about that. I spent a few weeks beginning to clean them up, but since it's something we can't easily enforce (and new -sys packages will have this problem, too, since it's only an issue with the Android loader), it made more sense to me to just have the build set up to discard those unused bits of code before they ever get to the linker, much less the loader.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8288)
<!-- Reviewable:end -->
2015-11-05 05:51:48 +05:30
Lars Bergstrom
17a6cb5873 New Android suppport 2015-11-04 16:29:39 -06:00
Corey Farwell
d1824aea48 Expand tidy to lint parts of /tests/wpt 2015-11-03 17:11:44 -05:00
nxnfufunezn
03bf082fb3 Added support for using --features argument with --android 2015-10-30 22:08:04 +05:30
Brandon Fairchild
d1c2e79c89 Add clippy as a command to mach
This gives mach the ability to run clippy with `./mach clippy`.

Fixes #8134.
2015-10-21 19:21:20 -04:00
Anthony Ramine
bd363b009d Make test-tidy ignore braces surrounded by backticks 2015-10-21 10:59:36 +02:00
James Graham
9d41ddb72c Add create-wpt mach target to help with creating web-platform-tests 2015-10-20 10:43:55 +01:00
Till Schneidereit
499a847141 Whitelist drafts.fxtf.org in tidy.py's webidl spec link check 2015-10-17 22:25:21 +02:00
Gilles Leblanc
d99149701f Adds a tidy check for single-page HTML specification links
Flags links to the single-page WHATWG specification and suggests the URL
for the multi page one.

Fixes #7998
2015-10-15 21:03:58 -04:00
Tareq A Khandaker
4d994bbf4b Add clarity to missing notification module messages 2015-10-14 19:39:35 -04:00