servo/components/script
Alex Crichton e8eebc1111 Fix spurious rebuilds of the script crate
The script crate currently has a build script, and Cargo will consider all files
in the script crate as inputs to the build script as it otherwise doesn't know
[what the input files are][cargo-1162]. This means that if any file in the
source tree of the script crate changes (or is created) then Cargo will think it
needs to re-run the build script and rebuild the crate.

[cargo-1162]: https://github.com/rust-lang/cargo/issues/1162

The build script of the script crate is invoking python, and consequently Python
is generating some bytecode files in the source tree. On the second build of
Servo, Cargo will see these new files, think that something has changed, and
will re-run the build script of the script crate.

This change passes the `-B` flag to python to avoid generating these bytecode
files, which should avoid tampering with the source tree and appease Cargo by
ensuring that it doesn't get rebuilt.

---

As a helpful tip to if this comes up again, this was discovered by using the
changes in rust-lang/cargo@c447e9d plus the change in rust-lang/cargo#2044. Once
`RUST_LOG` was set to `cargo::ops::cargo_rustc::fingerprint=info`, the second
run of `./mach build` printed out:

```
precalculated components have changed:
  1444364448.000000000s (/build/servo/components/script/dom/bindings/codegen/parser/WebIDL.pyc) !=
  1444364235.000000000s (/build/servo/components/script/document_loader.rs)
```

Which should help easily diagnose these kinds of problems in the future!
2015-10-08 21:37:56 -07:00
..
dom Auto merge of #7899 - glennw:subpage-fixes-1, r=pcwalton 2015-10-07 18:36:35 -06:00
parse sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
build.rs
Cargo.toml Auto merge of #7777 - KiChjang:caseless-group-name-match, r=jdm 2015-10-02 13:26:05 -06:00
clipboard_provider.rs Fix reported test-tidy errors for unmerged import blocks 2015-09-19 12:50:14 -04:00
cors.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
devtools.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
document_loader.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
horribly_inefficient_timers.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
layout_interface.rs Handle <meta name=viewport> elements when added to document 2015-09-30 20:31:35 -07:00
lib.rs Auto merge of #7777 - KiChjang:caseless-group-name-match, r=jdm 2015-10-02 13:26:05 -06:00
makefile.cargo Fix spurious rebuilds of the script crate 2015-10-08 21:37:56 -07:00
mem.rs Introduce [Abstract] to mark non-leaf interfaces 2015-09-13 19:46:28 +02:00
network_listener.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
page.rs Fix reported test-tidy errors for unmerged import blocks 2015-09-19 12:50:14 -04:00
script_task.rs Make it possible for iframes to create their own pipeline ID. 2015-10-06 17:06:53 +10:00
textinput.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
timers.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
webdriver_handlers.rs script: Stop copying the document URL. 2015-09-24 18:54:53 -07:00