{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/7936","labels_url":"https://api.github.com/repos/servo/servo/issues/7936/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/7936/comments","events_url":"https://api.github.com/repos/servo/servo/issues/7936/events","html_url":"https://github.com/servo/servo/pull/7936","id":110586705,"number":7936,"title":"Fix spurious rebuilds of the script crate","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/S-tests-failed","name":"S-tests-failed","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-10-09T04:43:06Z","updated_at":"2015-10-09T19:23:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/7936","html_url":"https://github.com/servo/servo/pull/7936","diff_url":"https://github.com/servo/servo/pull/7936.diff","patch_url":"https://github.com/servo/servo/pull/7936.patch"},"body":"The script crate currently has a build script, and Cargo will consider all files\r\nin the script crate as inputs to the build script as it otherwise doesn't know\r\n[what the input files are][cargo-1162]. This means that if any file in the\r\nsource tree of the script crate changes (or is created) then Cargo will think it\r\nneeds to re-run the build script and rebuild the crate.\r\n\r\n[cargo-1162]: https://github.com/rust-lang/cargo/issues/1162\r\n\r\nThe build script of the script crate is invoking python, and consequently Python\r\nis generating some bytecode files in the source tree. On the second build of\r\nServo, Cargo will see these new files, think that something has changed, and\r\nwill re-run the build script of the script crate.\r\n\r\nThis change passes the `-B` flag to python to avoid generating these bytecode\r\nfiles, which should avoid tampering with the source tree and appease Cargo by\r\nensuring that it doesn't get rebuilt.\r\n\r\n---\r\n\r\nAs a helpful tip to if this comes up again, this was discovered by using the\r\nchanges in rust-lang/cargo@c447e9d plus the change in rust-lang/cargo#2044. Once\r\n`RUST_LOG` was set to `cargo::ops::cargo_rustc::fingerprint=info`, the second\r\nrun of `./mach build` printed out:\r\n\r\n```\r\nprecalculated components have changed:\r\n  1444364448.000000000s (/build/servo/components/script/dom/bindings/codegen/parser/WebIDL.pyc) !=\r\n  1444364235.000000000s (/build/servo/components/script/document_loader.rs)\r\n```\r\n\r\nWhich should help easily diagnose these kinds of problems in the future!\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/7936)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/146966207","html_url":"https://github.com/servo/servo/pull/7936#issuecomment-146966207","issue_url":"https://api.github.com/repos/servo/servo/issues/7936","id":146966207,"user":{"login":"bors-servo","id":4368172,"avatar_url":"https://avatars.githubusercontent.com/u/4368172?v=3","gravatar_id":"","url":"https://api.github.com/users/bors-servo","html_url":"https://github.com/bors-servo","followers_url":"https://api.github.com/users/bors-servo/followers","following_url":"https://api.github.com/users/bors-servo/following{/other_user}","gists_url":"https://api.github.com/users/bors-servo/gists{/gist_id}","starred_url":"https://api.github.com/users/bors-servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors-servo/subscriptions","organizations_url":"https://api.github.com/users/bors-servo/orgs","repos_url":"https://api.github.com/users/bors-servo/repos","events_url":"https://api.github.com/users/bors-servo/events{/privacy}","received_events_url":"https://api.github.com/users/bors-servo/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T19:23:42Z","updated_at":"2015-10-09T19:23:42Z","body":":hourglass: Testing commit e8eebc1 with merge bc54440..."}}