Commit Graph

6 Commits

Author SHA1 Message Date
Alex Crichton
42a5de3792 servo: Merge #7936 - Fix spurious rebuilds of the script crate (from alexcrichton:script-rebuild); r=jdm
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!

Source-Repo: https://github.com/servo/servo
Source-Revision: bc5444067f7614ab7e3c83d8e131800d0db817b2
2015-10-09 13:23:41 -06:00
Corey Farwell
c8b19b1713 servo: Merge #7516 - Allow 'script' component to enter a 'built' state (from frewsxcv:dirty-script-dir); r=metajack
After this pull request merged:

https://github.com/servo/servo/pull/7209

the 'script' component would never enter a 'built' state. In other
words, if one calls `mach build`, lets it complete, then calls `mach
build` again, the 'script' component would rebuild even though we
supposedly just built it. This was due to the `ParserResults.pkl`
getting placed in the `components/script` directory instead of the
output directory, causing cargo to think that there were unbuilt files.

Source-Repo: https://github.com/servo/servo
Source-Revision: ded6159d48901fc814d4b4395102fdbe0d9e5817
2015-09-02 14:29:21 -06:00
Corey Farwell
f2d2d439ba servo: Merge #7209 - Cleanup/refactor build scripts for DOM codegen (from frewsxcv:codegen-build-cleanup); r=metajack
Prior to this commit, the script codegen makefile relied on an
intermediary pythonpath.py file that handled python dependencies and
incorporated a couple hacks to get the codegen building working. This
commit removes that intermediary file and attempts to make the script
codegen build process cleaner.

Source-Repo: https://github.com/servo/servo
Source-Revision: 493da96cae7cc0e3b533fc1f01cc0c5e38a27e02
2015-09-01 13:53:49 -06:00
Jack Moffitt
6017c835bc servo: Merge #6411 - Don't generate pyc files (from metajack:fix-script-out-dir); r=glennw
This eliminates the last bit of script crate generating in-tree
files. This now allows cargo target dir sharing to fully work.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5dc546b4cf19b3281ee10d2948a75984c62e3763
2015-06-17 21:18:42 -06:00
Jack Moffitt
ed7664058c servo: Merge #6408 - Generate code into OUT_DIR (from metajack:script-outdir); r=SimonSapin
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.

Source-Repo: https://github.com/servo/servo
Source-Revision: ff59e1b8de67f1988522d6b6e6c4adda957fad5b
2015-06-17 16:36:05 -06:00
Jack Moffitt
132ee35633 servo: Merge #3230 - Cargoify servo (from servo:cargoify)
Source-Repo: https://github.com/servo/servo
Source-Revision: b1305bb7d051f83850c51bb0da0ccc86a5e07922
2014-09-09 08:18:18 -06:00